ホーム › Graphics.GdiPlus › GdipEnumerateMetafileDestPoints
GdipEnumerateMetafileDestPoints
関数複数点を基準にメタファイルのレコードを列挙する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipEnumerateMetafileDestPoints(
GpGraphics* graphics,
const GpMetafile* metafile,
const PointF* destPoints,
INT count,
INT_PTR callback,
void* callbackData,
const GpImageAttributes* imageAttributes
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| graphics | GpGraphics* | inout |
| metafile | GpMetafile* | in |
| destPoints | PointF* | in |
| count | INT | in |
| callback | INT_PTR | in |
| callbackData | void* | inout |
| imageAttributes | GpImageAttributes* | in |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipEnumerateMetafileDestPoints(
GpGraphics* graphics,
const GpMetafile* metafile,
const PointF* destPoints,
INT count,
INT_PTR callback,
void* callbackData,
const GpImageAttributes* imageAttributes
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipEnumerateMetafileDestPoints(
IntPtr graphics, // GpGraphics* in/out
IntPtr metafile, // GpMetafile*
IntPtr destPoints, // PointF*
int count, // INT
IntPtr callback, // INT_PTR
IntPtr callbackData, // void* in/out
IntPtr imageAttributes // GpImageAttributes*
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipEnumerateMetafileDestPoints(
graphics As IntPtr, ' GpGraphics* in/out
metafile As IntPtr, ' GpMetafile*
destPoints As IntPtr, ' PointF*
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 : PointF*
' count : INT
' callback : INT_PTR
' callbackData : void* in/out
' imageAttributes : GpImageAttributes*
Declare PtrSafe Function GdipEnumerateMetafileDestPoints 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
GdipEnumerateMetafileDestPoints = ctypes.windll.gdiplus.GdipEnumerateMetafileDestPoints
GdipEnumerateMetafileDestPoints.restype = ctypes.c_int
GdipEnumerateMetafileDestPoints.argtypes = [
ctypes.c_void_p, # graphics : GpGraphics* in/out
ctypes.c_void_p, # metafile : GpMetafile*
ctypes.c_void_p, # destPoints : PointF*
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')
GdipEnumerateMetafileDestPoints = Fiddle::Function.new(
lib['GdipEnumerateMetafileDestPoints'],
[
Fiddle::TYPE_VOIDP, # graphics : GpGraphics* in/out
Fiddle::TYPE_VOIDP, # metafile : GpMetafile*
Fiddle::TYPE_VOIDP, # destPoints : PointF*
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 GdipEnumerateMetafileDestPoints(
graphics: *mut GpGraphics, // GpGraphics* in/out
metafile: *const GpMetafile, // GpMetafile*
destPoints: *const PointF, // PointF*
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 GdipEnumerateMetafileDestPoints(IntPtr graphics, IntPtr metafile, IntPtr destPoints, int count, IntPtr callback, IntPtr callbackData, IntPtr imageAttributes);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipEnumerateMetafileDestPoints' -Namespace Win32 -PassThru
# $api::GdipEnumerateMetafileDestPoints(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes)#uselib "gdiplus.dll"
#func global GdipEnumerateMetafileDestPoints "GdipEnumerateMetafileDestPoints" sptr, sptr, sptr, sptr, sptr, sptr, sptr
; GdipEnumerateMetafileDestPoints varptr(graphics), varptr(metafile), varptr(destPoints), count, callback, callbackData, varptr(imageAttributes) ; 戻り値は stat
; graphics : GpGraphics* in/out -> "sptr"
; metafile : GpMetafile* -> "sptr"
; destPoints : PointF* -> "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 GdipEnumerateMetafileDestPoints "GdipEnumerateMetafileDestPoints" var, var, var, int, sptr, sptr, var ; res = GdipEnumerateMetafileDestPoints(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes) ; graphics : GpGraphics* in/out -> "var" ; metafile : GpMetafile* -> "var" ; destPoints : PointF* -> "var" ; count : INT -> "int" ; callback : INT_PTR -> "sptr" ; callbackData : void* in/out -> "sptr" ; imageAttributes : GpImageAttributes* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileDestPoints "GdipEnumerateMetafileDestPoints" sptr, sptr, sptr, int, sptr, sptr, sptr ; res = GdipEnumerateMetafileDestPoints(varptr(graphics), varptr(metafile), varptr(destPoints), count, callback, callbackData, varptr(imageAttributes)) ; graphics : GpGraphics* in/out -> "sptr" ; metafile : GpMetafile* -> "sptr" ; destPoints : PointF* -> "sptr" ; count : INT -> "int" ; callback : INT_PTR -> "sptr" ; callbackData : void* in/out -> "sptr" ; imageAttributes : GpImageAttributes* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipEnumerateMetafileDestPoints(GpGraphics* graphics, GpMetafile* metafile, PointF* destPoints, INT count, INT_PTR callback, void* callbackData, GpImageAttributes* imageAttributes) #uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileDestPoints "GdipEnumerateMetafileDestPoints" var, var, var, int, intptr, intptr, var ; res = GdipEnumerateMetafileDestPoints(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes) ; graphics : GpGraphics* in/out -> "var" ; metafile : GpMetafile* -> "var" ; destPoints : PointF* -> "var" ; count : INT -> "int" ; callback : INT_PTR -> "intptr" ; callbackData : void* in/out -> "intptr" ; imageAttributes : GpImageAttributes* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipEnumerateMetafileDestPoints(GpGraphics* graphics, GpMetafile* metafile, PointF* destPoints, INT count, INT_PTR callback, void* callbackData, GpImageAttributes* imageAttributes) #uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileDestPoints "GdipEnumerateMetafileDestPoints" intptr, intptr, intptr, int, intptr, intptr, intptr ; res = GdipEnumerateMetafileDestPoints(varptr(graphics), varptr(metafile), varptr(destPoints), count, callback, callbackData, varptr(imageAttributes)) ; graphics : GpGraphics* in/out -> "intptr" ; metafile : GpMetafile* -> "intptr" ; destPoints : PointF* -> "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")
procGdipEnumerateMetafileDestPoints = gdiplus.NewProc("GdipEnumerateMetafileDestPoints")
)
// graphics (GpGraphics* in/out), metafile (GpMetafile*), destPoints (PointF*), count (INT), callback (INT_PTR), callbackData (void* in/out), imageAttributes (GpImageAttributes*)
r1, _, err := procGdipEnumerateMetafileDestPoints.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 GdipEnumerateMetafileDestPoints(
graphics: Pointer; // GpGraphics* in/out
metafile: Pointer; // GpMetafile*
destPoints: Pointer; // PointF*
count: Integer; // INT
callback: NativeInt; // INT_PTR
callbackData: Pointer; // void* in/out
imageAttributes: Pointer // GpImageAttributes*
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipEnumerateMetafileDestPoints';result := DllCall("gdiplus\GdipEnumerateMetafileDestPoints"
, "Ptr", graphics ; GpGraphics* in/out
, "Ptr", metafile ; GpMetafile*
, "Ptr", destPoints ; PointF*
, "Int", count ; INT
, "Ptr", callback ; INT_PTR
, "Ptr", callbackData ; void* in/out
, "Ptr", imageAttributes ; GpImageAttributes*
, "Int") ; return: Status●GdipEnumerateMetafileDestPoints(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes) = DLL("gdiplus.dll", "int GdipEnumerateMetafileDestPoints(void*, void*, void*, int, int, void*, void*)")
# 呼び出し: GdipEnumerateMetafileDestPoints(graphics, metafile, destPoints, count, callback, callbackData, imageAttributes)
# graphics : GpGraphics* in/out -> "void*"
# metafile : GpMetafile* -> "void*"
# destPoints : PointF* -> "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)。