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