Win32 API 日本語リファレンス
ホームGraphics.GdiPlus › GdipTransformMatrixPointsI

GdipTransformMatrixPointsI

関数
変換行列を整数座標の点配列に適用して変換する。
DLLgdiplus.dll呼出規約winapi

シグネチャ

// gdiplus.dll
#include <windows.h>

Status GdipTransformMatrixPointsI(
    Matrix* matrix,
    Point* pts,
    INT count
);

パラメーター

名前方向
matrixMatrix*inout
ptsPoint*inout
countINTin

戻り値の型: Status

各言語での呼び出し定義

// gdiplus.dll
#include <windows.h>

Status GdipTransformMatrixPointsI(
    Matrix* matrix,
    Point* pts,
    INT count
);
[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipTransformMatrixPointsI(
    ref IntPtr matrix,   // Matrix* in/out
    IntPtr pts,   // Point* in/out
    int count   // INT
);
<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipTransformMatrixPointsI(
    ByRef matrix As IntPtr,   ' Matrix* in/out
    pts As IntPtr,   ' Point* in/out
    count As Integer   ' INT
) As Integer
End Function
' matrix : Matrix* in/out
' pts : Point* in/out
' count : INT
Declare PtrSafe Function GdipTransformMatrixPointsI Lib "gdiplus" ( _
    ByRef matrix As LongPtr, _
    ByVal pts As LongPtr, _
    ByVal count As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GdipTransformMatrixPointsI = ctypes.windll.gdiplus.GdipTransformMatrixPointsI
GdipTransformMatrixPointsI.restype = ctypes.c_int
GdipTransformMatrixPointsI.argtypes = [
    ctypes.c_void_p,  # matrix : Matrix* in/out
    ctypes.c_void_p,  # pts : Point* in/out
    ctypes.c_int,  # count : INT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('gdiplus.dll')
GdipTransformMatrixPointsI = Fiddle::Function.new(
  lib['GdipTransformMatrixPointsI'],
  [
    Fiddle::TYPE_VOIDP,  # matrix : Matrix* in/out
    Fiddle::TYPE_VOIDP,  # pts : Point* in/out
    Fiddle::TYPE_INT,  # count : INT
  ],
  Fiddle::TYPE_INT)
#[link(name = "gdiplus")]
extern "system" {
    fn GdipTransformMatrixPointsI(
        matrix: *mut isize,  // Matrix* in/out
        pts: *mut Point,  // Point* in/out
        count: i32  // INT
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipTransformMatrixPointsI(ref IntPtr matrix, IntPtr pts, int count);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipTransformMatrixPointsI' -Namespace Win32 -PassThru
# $api::GdipTransformMatrixPointsI(matrix, pts, count)
#uselib "gdiplus.dll"
#func global GdipTransformMatrixPointsI "GdipTransformMatrixPointsI" sptr, sptr, sptr
; GdipTransformMatrixPointsI matrix, varptr(pts), count   ; 戻り値は stat
; matrix : Matrix* in/out -> "sptr"
; pts : Point* in/out -> "sptr"
; count : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "gdiplus.dll"
#cfunc global GdipTransformMatrixPointsI "GdipTransformMatrixPointsI" int, var, int
; res = GdipTransformMatrixPointsI(matrix, pts, count)
; matrix : Matrix* in/out -> "int"
; pts : Point* in/out -> "var"
; count : INT -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; Status GdipTransformMatrixPointsI(Matrix* matrix, Point* pts, INT count)
#uselib "gdiplus.dll"
#cfunc global GdipTransformMatrixPointsI "GdipTransformMatrixPointsI" int, var, int
; res = GdipTransformMatrixPointsI(matrix, pts, count)
; matrix : Matrix* in/out -> "int"
; pts : Point* in/out -> "var"
; count : INT -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipTransformMatrixPointsI = gdiplus.NewProc("GdipTransformMatrixPointsI")
)

// matrix (Matrix* in/out), pts (Point* in/out), count (INT)
r1, _, err := procGdipTransformMatrixPointsI.Call(
	uintptr(matrix),
	uintptr(pts),
	uintptr(count),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // Status
function GdipTransformMatrixPointsI(
  matrix: Pointer;   // Matrix* in/out
  pts: Pointer;   // Point* in/out
  count: Integer   // INT
): Integer; stdcall;
  external 'gdiplus.dll' name 'GdipTransformMatrixPointsI';
result := DllCall("gdiplus\GdipTransformMatrixPointsI"
    , "Ptr", matrix   ; Matrix* in/out
    , "Ptr", pts   ; Point* in/out
    , "Int", count   ; INT
    , "Int")   ; return: Status
●GdipTransformMatrixPointsI(matrix, pts, count) = DLL("gdiplus.dll", "int GdipTransformMatrixPointsI(void*, void*, int)")
# 呼び出し: GdipTransformMatrixPointsI(matrix, pts, count)
# matrix : Matrix* in/out -> "void*"
# pts : Point* in/out -> "void*"
# count : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。