ホーム › Graphics.GdiPlus › GdipSetAdjustableArrowCapHeight
GdipSetAdjustableArrowCapHeight
関数調整可能な矢印キャップの高さを設定する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipSetAdjustableArrowCapHeight(
GpAdjustableArrowCap* cap,
FLOAT height
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| cap | GpAdjustableArrowCap* | inout |
| height | FLOAT | in |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipSetAdjustableArrowCapHeight(
GpAdjustableArrowCap* cap,
FLOAT height
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipSetAdjustableArrowCapHeight(
IntPtr cap, // GpAdjustableArrowCap* in/out
float height // FLOAT
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipSetAdjustableArrowCapHeight(
cap As IntPtr, ' GpAdjustableArrowCap* in/out
height As Single ' FLOAT
) As Integer
End Function' cap : GpAdjustableArrowCap* in/out
' height : FLOAT
Declare PtrSafe Function GdipSetAdjustableArrowCapHeight Lib "gdiplus" ( _
ByVal cap As LongPtr, _
ByVal height As Single) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GdipSetAdjustableArrowCapHeight = ctypes.windll.gdiplus.GdipSetAdjustableArrowCapHeight
GdipSetAdjustableArrowCapHeight.restype = ctypes.c_int
GdipSetAdjustableArrowCapHeight.argtypes = [
ctypes.c_void_p, # cap : GpAdjustableArrowCap* in/out
ctypes.c_float, # height : FLOAT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('gdiplus.dll')
GdipSetAdjustableArrowCapHeight = Fiddle::Function.new(
lib['GdipSetAdjustableArrowCapHeight'],
[
Fiddle::TYPE_VOIDP, # cap : GpAdjustableArrowCap* in/out
Fiddle::TYPE_FLOAT, # height : FLOAT
],
Fiddle::TYPE_INT)#[link(name = "gdiplus")]
extern "system" {
fn GdipSetAdjustableArrowCapHeight(
cap: *mut GpAdjustableArrowCap, // GpAdjustableArrowCap* in/out
height: f32 // FLOAT
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipSetAdjustableArrowCapHeight(IntPtr cap, float height);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipSetAdjustableArrowCapHeight' -Namespace Win32 -PassThru
# $api::GdipSetAdjustableArrowCapHeight(cap, height)#uselib "gdiplus.dll"
#func global GdipSetAdjustableArrowCapHeight "GdipSetAdjustableArrowCapHeight" sptr, float
; GdipSetAdjustableArrowCapHeight varptr(cap), height ; 戻り値は stat
; cap : GpAdjustableArrowCap* in/out -> "sptr"
; height : FLOAT -> "float"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "gdiplus.dll" #cfunc global GdipSetAdjustableArrowCapHeight "GdipSetAdjustableArrowCapHeight" var, float ; res = GdipSetAdjustableArrowCapHeight(cap, height) ; cap : GpAdjustableArrowCap* in/out -> "var" ; height : FLOAT -> "float" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipSetAdjustableArrowCapHeight "GdipSetAdjustableArrowCapHeight" sptr, float ; res = GdipSetAdjustableArrowCapHeight(varptr(cap), height) ; cap : GpAdjustableArrowCap* in/out -> "sptr" ; height : FLOAT -> "float" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, FLOAT height) #uselib "gdiplus.dll" #cfunc global GdipSetAdjustableArrowCapHeight "GdipSetAdjustableArrowCapHeight" var, float ; res = GdipSetAdjustableArrowCapHeight(cap, height) ; cap : GpAdjustableArrowCap* in/out -> "var" ; height : FLOAT -> "float" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, FLOAT height) #uselib "gdiplus.dll" #cfunc global GdipSetAdjustableArrowCapHeight "GdipSetAdjustableArrowCapHeight" intptr, float ; res = GdipSetAdjustableArrowCapHeight(varptr(cap), height) ; cap : GpAdjustableArrowCap* in/out -> "intptr" ; height : FLOAT -> "float" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"math"
"golang.org/x/sys/windows"
"unsafe"
)
var (
gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
procGdipSetAdjustableArrowCapHeight = gdiplus.NewProc("GdipSetAdjustableArrowCapHeight")
)
// cap (GpAdjustableArrowCap* in/out), height (FLOAT)
r1, _, err := procGdipSetAdjustableArrowCapHeight.Call(
uintptr(cap),
uintptr(math.Float32bits(height)),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // Status
// 注意: float/double 引数は proc.Call では XMM レジスタに渡せません。
// windows.SyscallN(proc.Addr(), math.Float64bits(x), ...) もしくは cgo を使用してください。function GdipSetAdjustableArrowCapHeight(
cap: Pointer; // GpAdjustableArrowCap* in/out
height: Single // FLOAT
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipSetAdjustableArrowCapHeight';result := DllCall("gdiplus\GdipSetAdjustableArrowCapHeight"
, "Ptr", cap ; GpAdjustableArrowCap* in/out
, "Float", height ; FLOAT
, "Int") ; return: Status●GdipSetAdjustableArrowCapHeight(cap, height) = DLL("gdiplus.dll", "int GdipSetAdjustableArrowCapHeight(void*, float)")
# 呼び出し: GdipSetAdjustableArrowCapHeight(cap, height)
# cap : GpAdjustableArrowCap* in/out -> "void*"
# height : FLOAT -> "float"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。