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