ホーム › Graphics.GdiPlus › GdipEnumerateMetafileDestPointsI
GdipEnumerateMetafileDestPointsI
関数整数複数点を基準にメタファイルのレコードを列挙する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipEnumerateMetafileDestPointsI(
GpGraphics* graphics,
const GpMetafile* metafile,
const Point* destPoints,
INT count,
INT_PTR callback,
void* callbackData,
const GpImageAttributes* imageAttributes
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| graphics | GpGraphics* | inout | 再生先のGDI+グラフィックスオブジェクトへのポインタ。 |
| metafile | GpMetafile* | in | 列挙対象のメタファイルオブジェクトへのポインタ。 |
| destPoints | Point* | in | 描画先の平行四辺形を定義する点配列(Point、整数)。3点を指定する。 |
| count | INT | in | destPoints配列内の点の個数。通常は3。 |
| callback | INT_PTR | in | 各メタファイルレコードごとに呼ばれるEnumerateMetafileProcへのアドレス。 |
| callbackData | void* | inout | コールバックへ渡す任意データへのポインタ。NULL可。 |
| imageAttributes | GpImageAttributes* | in | 色調整など描画属性を指定するImageAttributesへのポインタ。NULL可。 |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipEnumerateMetafileDestPointsI(
GpGraphics* graphics,
const GpMetafile* metafile,
const Point* destPoints,
INT count,
INT_PTR callback,
void* callbackData,
const GpImageAttributes* imageAttributes
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipEnumerateMetafileDestPointsI(
IntPtr graphics, // GpGraphics* in/out
IntPtr metafile, // GpMetafile*
IntPtr destPoints, // Point*
int count, // INT
IntPtr callback, // INT_PTR
IntPtr callbackData, // void* in/out
IntPtr imageAttributes // GpImageAttributes*
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipEnumerateMetafileDestPointsI(
graphics As IntPtr, ' GpGraphics* in/out
metafile As IntPtr, ' GpMetafile*
destPoints As IntPtr, ' Point*
count As Integer, ' INT
callback As IntPtr, ' INT_PTR
callbackData As IntPtr, ' void* in/out
imageAttributes As IntPtr ' GpImageAttributes*
) As Integer
End Function' graphics : GpGraphics* in/out
' metafile : GpMetafile*
' destPoints : Point*
' count : INT
' callback : INT_PTR
' callbackData : void* in/out
' imageAttributes : GpImageAttributes*
Declare PtrSafe Function GdipEnumerateMetafileDestPointsI Lib "gdiplus" ( _
ByVal graphics As LongPtr, _
ByVal metafile As LongPtr, _
ByVal destPoints As LongPtr, _
ByVal count As Long, _
ByVal callback As LongPtr, _
ByVal callbackData As LongPtr, _
ByVal imageAttributes As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GdipEnumerateMetafileDestPointsI = ctypes.windll.gdiplus.GdipEnumerateMetafileDestPointsI
GdipEnumerateMetafileDestPointsI.restype = ctypes.c_int
GdipEnumerateMetafileDestPointsI.argtypes = [
ctypes.c_void_p, # graphics : GpGraphics* in/out
ctypes.c_void_p, # metafile : GpMetafile*
ctypes.c_void_p, # destPoints : Point*
ctypes.c_int, # count : INT
ctypes.c_ssize_t, # callback : INT_PTR
ctypes.POINTER(None), # callbackData : void* in/out
ctypes.c_void_p, # imageAttributes : GpImageAttributes*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('gdiplus.dll')
GdipEnumerateMetafileDestPointsI = Fiddle::Function.new(
lib['GdipEnumerateMetafileDestPointsI'],
[
Fiddle::TYPE_VOIDP, # graphics : GpGraphics* in/out
Fiddle::TYPE_VOIDP, # metafile : GpMetafile*
Fiddle::TYPE_VOIDP, # destPoints : Point*
Fiddle::TYPE_INT, # count : INT
Fiddle::TYPE_INTPTR_T, # callback : INT_PTR
Fiddle::TYPE_VOIDP, # callbackData : void* in/out
Fiddle::TYPE_VOIDP, # imageAttributes : GpImageAttributes*
],
Fiddle::TYPE_INT)#[link(name = "gdiplus")]
extern "system" {
fn GdipEnumerateMetafileDestPointsI(
graphics: *mut GpGraphics, // GpGraphics* in/out
metafile: *const GpMetafile, // GpMetafile*
destPoints: *const Point, // Point*
count: i32, // INT
callback: isize, // INT_PTR
callbackData: *mut (), // void* in/out
imageAttributes: *const GpImageAttributes // GpImageAttributes*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipEnumerateMetafileDestPointsI(IntPtr graphics, IntPtr metafile, IntPtr destPoints, int count, IntPtr callback, IntPtr callbackData, IntPtr imageAttributes);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipEnumerateMetafileDestPointsI' -Namespace Win32 -PassThru
# $api::GdipEnumerateMetafileDestPointsI(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes)#uselib "gdiplus.dll"
#func global GdipEnumerateMetafileDestPointsI "GdipEnumerateMetafileDestPointsI" sptr, sptr, sptr, sptr, sptr, sptr, sptr
; GdipEnumerateMetafileDestPointsI varptr(graphics), varptr(metafile), varptr(destPoints), count, callback, callbackData, varptr(imageAttributes) ; 戻り値は stat
; graphics : GpGraphics* in/out -> "sptr"
; metafile : GpMetafile* -> "sptr"
; destPoints : Point* -> "sptr"
; count : INT -> "sptr"
; callback : INT_PTR -> "sptr"
; callbackData : void* in/out -> "sptr"
; imageAttributes : GpImageAttributes* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileDestPointsI "GdipEnumerateMetafileDestPointsI" var, var, var, int, sptr, sptr, var ; res = GdipEnumerateMetafileDestPointsI(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes) ; graphics : GpGraphics* in/out -> "var" ; metafile : GpMetafile* -> "var" ; destPoints : Point* -> "var" ; count : INT -> "int" ; callback : INT_PTR -> "sptr" ; callbackData : void* in/out -> "sptr" ; imageAttributes : GpImageAttributes* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileDestPointsI "GdipEnumerateMetafileDestPointsI" sptr, sptr, sptr, int, sptr, sptr, sptr ; res = GdipEnumerateMetafileDestPointsI(varptr(graphics), varptr(metafile), varptr(destPoints), count, callback, callbackData, varptr(imageAttributes)) ; graphics : GpGraphics* in/out -> "sptr" ; metafile : GpMetafile* -> "sptr" ; destPoints : Point* -> "sptr" ; count : INT -> "int" ; callback : INT_PTR -> "sptr" ; callbackData : void* in/out -> "sptr" ; imageAttributes : GpImageAttributes* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipEnumerateMetafileDestPointsI(GpGraphics* graphics, GpMetafile* metafile, Point* destPoints, INT count, INT_PTR callback, void* callbackData, GpImageAttributes* imageAttributes) #uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileDestPointsI "GdipEnumerateMetafileDestPointsI" var, var, var, int, intptr, intptr, var ; res = GdipEnumerateMetafileDestPointsI(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes) ; graphics : GpGraphics* in/out -> "var" ; metafile : GpMetafile* -> "var" ; destPoints : Point* -> "var" ; count : INT -> "int" ; callback : INT_PTR -> "intptr" ; callbackData : void* in/out -> "intptr" ; imageAttributes : GpImageAttributes* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipEnumerateMetafileDestPointsI(GpGraphics* graphics, GpMetafile* metafile, Point* destPoints, INT count, INT_PTR callback, void* callbackData, GpImageAttributes* imageAttributes) #uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileDestPointsI "GdipEnumerateMetafileDestPointsI" intptr, intptr, intptr, int, intptr, intptr, intptr ; res = GdipEnumerateMetafileDestPointsI(varptr(graphics), varptr(metafile), varptr(destPoints), count, callback, callbackData, varptr(imageAttributes)) ; graphics : GpGraphics* in/out -> "intptr" ; metafile : GpMetafile* -> "intptr" ; destPoints : Point* -> "intptr" ; count : INT -> "int" ; callback : INT_PTR -> "intptr" ; callbackData : void* in/out -> "intptr" ; imageAttributes : GpImageAttributes* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
procGdipEnumerateMetafileDestPointsI = gdiplus.NewProc("GdipEnumerateMetafileDestPointsI")
)
// graphics (GpGraphics* in/out), metafile (GpMetafile*), destPoints (Point*), count (INT), callback (INT_PTR), callbackData (void* in/out), imageAttributes (GpImageAttributes*)
r1, _, err := procGdipEnumerateMetafileDestPointsI.Call(
uintptr(graphics),
uintptr(metafile),
uintptr(destPoints),
uintptr(count),
uintptr(callback),
uintptr(callbackData),
uintptr(imageAttributes),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // Statusfunction GdipEnumerateMetafileDestPointsI(
graphics: Pointer; // GpGraphics* in/out
metafile: Pointer; // GpMetafile*
destPoints: Pointer; // Point*
count: Integer; // INT
callback: NativeInt; // INT_PTR
callbackData: Pointer; // void* in/out
imageAttributes: Pointer // GpImageAttributes*
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipEnumerateMetafileDestPointsI';result := DllCall("gdiplus\GdipEnumerateMetafileDestPointsI"
, "Ptr", graphics ; GpGraphics* in/out
, "Ptr", metafile ; GpMetafile*
, "Ptr", destPoints ; Point*
, "Int", count ; INT
, "Ptr", callback ; INT_PTR
, "Ptr", callbackData ; void* in/out
, "Ptr", imageAttributes ; GpImageAttributes*
, "Int") ; return: Status●GdipEnumerateMetafileDestPointsI(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes) = DLL("gdiplus.dll", "int GdipEnumerateMetafileDestPointsI(void*, void*, void*, int, int, void*, void*)")
# 呼び出し: GdipEnumerateMetafileDestPointsI(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes)
# graphics : GpGraphics* in/out -> "void*"
# metafile : GpMetafile* -> "void*"
# destPoints : Point* -> "void*"
# count : INT -> "int"
# callback : INT_PTR -> "int"
# callbackData : void* in/out -> "void*"
# imageAttributes : GpImageAttributes* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。