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