ホーム › Graphics.GdiPlus › GdipGetCustomLineCapStrokeCaps
GdipGetCustomLineCapStrokeCaps
関数カスタム端点キャップの輪郭線の始点・終点キャップ形状を取得する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipGetCustomLineCapStrokeCaps(
GpCustomLineCap* customCap,
LineCap* startCap,
LineCap* endCap
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| customCap | GpCustomLineCap* | inout |
| startCap | LineCap* | inout |
| endCap | LineCap* | inout |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipGetCustomLineCapStrokeCaps(
GpCustomLineCap* customCap,
LineCap* startCap,
LineCap* endCap
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipGetCustomLineCapStrokeCaps(
IntPtr customCap, // GpCustomLineCap* in/out
ref int startCap, // LineCap* in/out
ref int endCap // LineCap* in/out
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipGetCustomLineCapStrokeCaps(
customCap As IntPtr, ' GpCustomLineCap* in/out
ByRef startCap As Integer, ' LineCap* in/out
ByRef endCap As Integer ' LineCap* in/out
) As Integer
End Function' customCap : GpCustomLineCap* in/out
' startCap : LineCap* in/out
' endCap : LineCap* in/out
Declare PtrSafe Function GdipGetCustomLineCapStrokeCaps Lib "gdiplus" ( _
ByVal customCap As LongPtr, _
ByRef startCap As Long, _
ByRef endCap As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GdipGetCustomLineCapStrokeCaps = ctypes.windll.gdiplus.GdipGetCustomLineCapStrokeCaps
GdipGetCustomLineCapStrokeCaps.restype = ctypes.c_int
GdipGetCustomLineCapStrokeCaps.argtypes = [
ctypes.c_void_p, # customCap : GpCustomLineCap* in/out
ctypes.c_void_p, # startCap : LineCap* in/out
ctypes.c_void_p, # endCap : LineCap* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('gdiplus.dll')
GdipGetCustomLineCapStrokeCaps = Fiddle::Function.new(
lib['GdipGetCustomLineCapStrokeCaps'],
[
Fiddle::TYPE_VOIDP, # customCap : GpCustomLineCap* in/out
Fiddle::TYPE_VOIDP, # startCap : LineCap* in/out
Fiddle::TYPE_VOIDP, # endCap : LineCap* in/out
],
Fiddle::TYPE_INT)#[link(name = "gdiplus")]
extern "system" {
fn GdipGetCustomLineCapStrokeCaps(
customCap: *mut GpCustomLineCap, // GpCustomLineCap* in/out
startCap: *mut i32, // LineCap* in/out
endCap: *mut i32 // LineCap* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipGetCustomLineCapStrokeCaps(IntPtr customCap, ref int startCap, ref int endCap);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipGetCustomLineCapStrokeCaps' -Namespace Win32 -PassThru
# $api::GdipGetCustomLineCapStrokeCaps(customCap, startCap, endCap)#uselib "gdiplus.dll"
#func global GdipGetCustomLineCapStrokeCaps "GdipGetCustomLineCapStrokeCaps" sptr, sptr, sptr
; GdipGetCustomLineCapStrokeCaps varptr(customCap), startCap, endCap ; 戻り値は stat
; customCap : GpCustomLineCap* in/out -> "sptr"
; startCap : LineCap* in/out -> "sptr"
; endCap : LineCap* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "gdiplus.dll" #cfunc global GdipGetCustomLineCapStrokeCaps "GdipGetCustomLineCapStrokeCaps" var, int, int ; res = GdipGetCustomLineCapStrokeCaps(customCap, startCap, endCap) ; customCap : GpCustomLineCap* in/out -> "var" ; startCap : LineCap* in/out -> "int" ; endCap : LineCap* in/out -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipGetCustomLineCapStrokeCaps "GdipGetCustomLineCapStrokeCaps" sptr, int, int ; res = GdipGetCustomLineCapStrokeCaps(varptr(customCap), startCap, endCap) ; customCap : GpCustomLineCap* in/out -> "sptr" ; startCap : LineCap* in/out -> "int" ; endCap : LineCap* in/out -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipGetCustomLineCapStrokeCaps(GpCustomLineCap* customCap, LineCap* startCap, LineCap* endCap) #uselib "gdiplus.dll" #cfunc global GdipGetCustomLineCapStrokeCaps "GdipGetCustomLineCapStrokeCaps" var, int, int ; res = GdipGetCustomLineCapStrokeCaps(customCap, startCap, endCap) ; customCap : GpCustomLineCap* in/out -> "var" ; startCap : LineCap* in/out -> "int" ; endCap : LineCap* in/out -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipGetCustomLineCapStrokeCaps(GpCustomLineCap* customCap, LineCap* startCap, LineCap* endCap) #uselib "gdiplus.dll" #cfunc global GdipGetCustomLineCapStrokeCaps "GdipGetCustomLineCapStrokeCaps" intptr, int, int ; res = GdipGetCustomLineCapStrokeCaps(varptr(customCap), startCap, endCap) ; customCap : GpCustomLineCap* in/out -> "intptr" ; startCap : LineCap* in/out -> "int" ; endCap : LineCap* in/out -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
procGdipGetCustomLineCapStrokeCaps = gdiplus.NewProc("GdipGetCustomLineCapStrokeCaps")
)
// customCap (GpCustomLineCap* in/out), startCap (LineCap* in/out), endCap (LineCap* in/out)
r1, _, err := procGdipGetCustomLineCapStrokeCaps.Call(
uintptr(customCap),
uintptr(startCap),
uintptr(endCap),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // Statusfunction GdipGetCustomLineCapStrokeCaps(
customCap: Pointer; // GpCustomLineCap* in/out
startCap: Pointer; // LineCap* in/out
endCap: Pointer // LineCap* in/out
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipGetCustomLineCapStrokeCaps';result := DllCall("gdiplus\GdipGetCustomLineCapStrokeCaps"
, "Ptr", customCap ; GpCustomLineCap* in/out
, "Ptr", startCap ; LineCap* in/out
, "Ptr", endCap ; LineCap* in/out
, "Int") ; return: Status●GdipGetCustomLineCapStrokeCaps(customCap, startCap, endCap) = DLL("gdiplus.dll", "int GdipGetCustomLineCapStrokeCaps(void*, void*, void*)")
# 呼び出し: GdipGetCustomLineCapStrokeCaps(customCap, startCap, endCap)
# customCap : GpCustomLineCap* in/out -> "void*"
# startCap : LineCap* in/out -> "void*"
# endCap : LineCap* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。