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