Win32 API 日本語リファレンス
ホームGraphics.GdiPlus › GdipSetAdjustableArrowCapMiddleInset

GdipSetAdjustableArrowCapMiddleInset

関数
調整可能な矢印キャップの中央のくぼみ量を設定する。
DLLgdiplus.dll呼出規約winapi

シグネチャ

// gdiplus.dll
#include <windows.h>

Status GdipSetAdjustableArrowCapMiddleInset(
    GpAdjustableArrowCap* cap,
    FLOAT middleInset
);

パラメーター

名前方向
capGpAdjustableArrowCap*inout
middleInsetFLOATin

戻り値の型: Status

各言語での呼び出し定義

// gdiplus.dll
#include <windows.h>

Status GdipSetAdjustableArrowCapMiddleInset(
    GpAdjustableArrowCap* cap,
    FLOAT middleInset
);
[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipSetAdjustableArrowCapMiddleInset(
    IntPtr cap,   // GpAdjustableArrowCap* in/out
    float middleInset   // FLOAT
);
<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipSetAdjustableArrowCapMiddleInset(
    cap As IntPtr,   ' GpAdjustableArrowCap* in/out
    middleInset As Single   ' FLOAT
) As Integer
End Function
' cap : GpAdjustableArrowCap* in/out
' middleInset : FLOAT
Declare PtrSafe Function GdipSetAdjustableArrowCapMiddleInset Lib "gdiplus" ( _
    ByVal cap As LongPtr, _
    ByVal middleInset As Single) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GdipSetAdjustableArrowCapMiddleInset = ctypes.windll.gdiplus.GdipSetAdjustableArrowCapMiddleInset
GdipSetAdjustableArrowCapMiddleInset.restype = ctypes.c_int
GdipSetAdjustableArrowCapMiddleInset.argtypes = [
    ctypes.c_void_p,  # cap : GpAdjustableArrowCap* in/out
    ctypes.c_float,  # middleInset : FLOAT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('gdiplus.dll')
GdipSetAdjustableArrowCapMiddleInset = Fiddle::Function.new(
  lib['GdipSetAdjustableArrowCapMiddleInset'],
  [
    Fiddle::TYPE_VOIDP,  # cap : GpAdjustableArrowCap* in/out
    Fiddle::TYPE_FLOAT,  # middleInset : FLOAT
  ],
  Fiddle::TYPE_INT)
#[link(name = "gdiplus")]
extern "system" {
    fn GdipSetAdjustableArrowCapMiddleInset(
        cap: *mut GpAdjustableArrowCap,  // GpAdjustableArrowCap* in/out
        middleInset: f32  // FLOAT
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipSetAdjustableArrowCapMiddleInset(IntPtr cap, float middleInset);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipSetAdjustableArrowCapMiddleInset' -Namespace Win32 -PassThru
# $api::GdipSetAdjustableArrowCapMiddleInset(cap, middleInset)
#uselib "gdiplus.dll"
#func global GdipSetAdjustableArrowCapMiddleInset "GdipSetAdjustableArrowCapMiddleInset" sptr, float
; GdipSetAdjustableArrowCapMiddleInset varptr(cap), middleInset   ; 戻り値は stat
; cap : GpAdjustableArrowCap* in/out -> "sptr"
; middleInset : FLOAT -> "float"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "gdiplus.dll"
#cfunc global GdipSetAdjustableArrowCapMiddleInset "GdipSetAdjustableArrowCapMiddleInset" var, float
; res = GdipSetAdjustableArrowCapMiddleInset(cap, middleInset)
; cap : GpAdjustableArrowCap* in/out -> "var"
; middleInset : FLOAT -> "float"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; Status GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap, FLOAT middleInset)
#uselib "gdiplus.dll"
#cfunc global GdipSetAdjustableArrowCapMiddleInset "GdipSetAdjustableArrowCapMiddleInset" var, float
; res = GdipSetAdjustableArrowCapMiddleInset(cap, middleInset)
; cap : GpAdjustableArrowCap* in/out -> "var"
; middleInset : FLOAT -> "float"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"math"
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipSetAdjustableArrowCapMiddleInset = gdiplus.NewProc("GdipSetAdjustableArrowCapMiddleInset")
)

// cap (GpAdjustableArrowCap* in/out), middleInset (FLOAT)
r1, _, err := procGdipSetAdjustableArrowCapMiddleInset.Call(
	uintptr(cap),
	uintptr(math.Float32bits(middleInset)),
)
_ = 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 GdipSetAdjustableArrowCapMiddleInset(
  cap: Pointer;   // GpAdjustableArrowCap* in/out
  middleInset: Single   // FLOAT
): Integer; stdcall;
  external 'gdiplus.dll' name 'GdipSetAdjustableArrowCapMiddleInset';
result := DllCall("gdiplus\GdipSetAdjustableArrowCapMiddleInset"
    , "Ptr", cap   ; GpAdjustableArrowCap* in/out
    , "Float", middleInset   ; FLOAT
    , "Int")   ; return: Status
●GdipSetAdjustableArrowCapMiddleInset(cap, middleInset) = DLL("gdiplus.dll", "int GdipSetAdjustableArrowCapMiddleInset(void*, float)")
# 呼び出し: GdipSetAdjustableArrowCapMiddleInset(cap, middleInset)
# cap : GpAdjustableArrowCap* in/out -> "void*"
# middleInset : FLOAT -> "float"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。