ホーム › Graphics.GdiPlus › GdipEnumerateMetafileSrcRectDestPointsI
GdipEnumerateMetafileSrcRectDestPointsI
関数元矩形と整数描画先複数点を指定してメタファイルを列挙する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipEnumerateMetafileSrcRectDestPointsI(
GpGraphics* graphics,
const GpMetafile* metafile,
const Point* destPoints,
INT count,
const Rect* srcRect,
Unit srcUnit,
INT_PTR callback,
void* callbackData,
const GpImageAttributes* imageAttributes
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| graphics | GpGraphics* | inout |
| metafile | GpMetafile* | in |
| destPoints | Point* | in |
| count | INT | in |
| srcRect | Rect* | in |
| srcUnit | Unit | in |
| callback | INT_PTR | in |
| callbackData | void* | inout |
| imageAttributes | GpImageAttributes* | in |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipEnumerateMetafileSrcRectDestPointsI(
GpGraphics* graphics,
const GpMetafile* metafile,
const Point* destPoints,
INT count,
const Rect* srcRect,
Unit srcUnit,
INT_PTR callback,
void* callbackData,
const GpImageAttributes* imageAttributes
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipEnumerateMetafileSrcRectDestPointsI(
IntPtr graphics, // GpGraphics* in/out
IntPtr metafile, // GpMetafile*
IntPtr destPoints, // Point*
int count, // INT
IntPtr srcRect, // Rect*
int srcUnit, // Unit
IntPtr callback, // INT_PTR
IntPtr callbackData, // void* in/out
IntPtr imageAttributes // GpImageAttributes*
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipEnumerateMetafileSrcRectDestPointsI(
graphics As IntPtr, ' GpGraphics* in/out
metafile As IntPtr, ' GpMetafile*
destPoints As IntPtr, ' Point*
count As Integer, ' INT
srcRect As IntPtr, ' Rect*
srcUnit As Integer, ' Unit
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
' srcRect : Rect*
' srcUnit : Unit
' callback : INT_PTR
' callbackData : void* in/out
' imageAttributes : GpImageAttributes*
Declare PtrSafe Function GdipEnumerateMetafileSrcRectDestPointsI Lib "gdiplus" ( _
ByVal graphics As LongPtr, _
ByVal metafile As LongPtr, _
ByVal destPoints As LongPtr, _
ByVal count As Long, _
ByVal srcRect As LongPtr, _
ByVal srcUnit 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
GdipEnumerateMetafileSrcRectDestPointsI = ctypes.windll.gdiplus.GdipEnumerateMetafileSrcRectDestPointsI
GdipEnumerateMetafileSrcRectDestPointsI.restype = ctypes.c_int
GdipEnumerateMetafileSrcRectDestPointsI.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_void_p, # srcRect : Rect*
ctypes.c_int, # srcUnit : Unit
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')
GdipEnumerateMetafileSrcRectDestPointsI = Fiddle::Function.new(
lib['GdipEnumerateMetafileSrcRectDestPointsI'],
[
Fiddle::TYPE_VOIDP, # graphics : GpGraphics* in/out
Fiddle::TYPE_VOIDP, # metafile : GpMetafile*
Fiddle::TYPE_VOIDP, # destPoints : Point*
Fiddle::TYPE_INT, # count : INT
Fiddle::TYPE_VOIDP, # srcRect : Rect*
Fiddle::TYPE_INT, # srcUnit : Unit
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 GdipEnumerateMetafileSrcRectDestPointsI(
graphics: *mut GpGraphics, // GpGraphics* in/out
metafile: *const GpMetafile, // GpMetafile*
destPoints: *const Point, // Point*
count: i32, // INT
srcRect: *const Rect, // Rect*
srcUnit: i32, // Unit
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 GdipEnumerateMetafileSrcRectDestPointsI(IntPtr graphics, IntPtr metafile, IntPtr destPoints, int count, IntPtr srcRect, int srcUnit, IntPtr callback, IntPtr callbackData, IntPtr imageAttributes);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipEnumerateMetafileSrcRectDestPointsI' -Namespace Win32 -PassThru
# $api::GdipEnumerateMetafileSrcRectDestPointsI(graphics, metafile, destPoints, count, srcRect, srcUnit, callback, callbackData, imageAttributes)#uselib "gdiplus.dll"
#func global GdipEnumerateMetafileSrcRectDestPointsI "GdipEnumerateMetafileSrcRectDestPointsI" sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr
; GdipEnumerateMetafileSrcRectDestPointsI varptr(graphics), varptr(metafile), varptr(destPoints), count, varptr(srcRect), srcUnit, callback, callbackData, varptr(imageAttributes) ; 戻り値は stat
; graphics : GpGraphics* in/out -> "sptr"
; metafile : GpMetafile* -> "sptr"
; destPoints : Point* -> "sptr"
; count : INT -> "sptr"
; srcRect : Rect* -> "sptr"
; srcUnit : Unit -> "sptr"
; callback : INT_PTR -> "sptr"
; callbackData : void* in/out -> "sptr"
; imageAttributes : GpImageAttributes* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileSrcRectDestPointsI "GdipEnumerateMetafileSrcRectDestPointsI" var, var, var, int, var, int, sptr, sptr, var ; res = GdipEnumerateMetafileSrcRectDestPointsI(graphics, metafile, destPoints, count, srcRect, srcUnit, callback, callbackData, imageAttributes) ; graphics : GpGraphics* in/out -> "var" ; metafile : GpMetafile* -> "var" ; destPoints : Point* -> "var" ; count : INT -> "int" ; srcRect : Rect* -> "var" ; srcUnit : Unit -> "int" ; callback : INT_PTR -> "sptr" ; callbackData : void* in/out -> "sptr" ; imageAttributes : GpImageAttributes* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileSrcRectDestPointsI "GdipEnumerateMetafileSrcRectDestPointsI" sptr, sptr, sptr, int, sptr, int, sptr, sptr, sptr ; res = GdipEnumerateMetafileSrcRectDestPointsI(varptr(graphics), varptr(metafile), varptr(destPoints), count, varptr(srcRect), srcUnit, callback, callbackData, varptr(imageAttributes)) ; graphics : GpGraphics* in/out -> "sptr" ; metafile : GpMetafile* -> "sptr" ; destPoints : Point* -> "sptr" ; count : INT -> "int" ; srcRect : Rect* -> "sptr" ; srcUnit : Unit -> "int" ; callback : INT_PTR -> "sptr" ; callbackData : void* in/out -> "sptr" ; imageAttributes : GpImageAttributes* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipEnumerateMetafileSrcRectDestPointsI(GpGraphics* graphics, GpMetafile* metafile, Point* destPoints, INT count, Rect* srcRect, Unit srcUnit, INT_PTR callback, void* callbackData, GpImageAttributes* imageAttributes) #uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileSrcRectDestPointsI "GdipEnumerateMetafileSrcRectDestPointsI" var, var, var, int, var, int, intptr, intptr, var ; res = GdipEnumerateMetafileSrcRectDestPointsI(graphics, metafile, destPoints, count, srcRect, srcUnit, callback, callbackData, imageAttributes) ; graphics : GpGraphics* in/out -> "var" ; metafile : GpMetafile* -> "var" ; destPoints : Point* -> "var" ; count : INT -> "int" ; srcRect : Rect* -> "var" ; srcUnit : Unit -> "int" ; callback : INT_PTR -> "intptr" ; callbackData : void* in/out -> "intptr" ; imageAttributes : GpImageAttributes* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipEnumerateMetafileSrcRectDestPointsI(GpGraphics* graphics, GpMetafile* metafile, Point* destPoints, INT count, Rect* srcRect, Unit srcUnit, INT_PTR callback, void* callbackData, GpImageAttributes* imageAttributes) #uselib "gdiplus.dll" #cfunc global GdipEnumerateMetafileSrcRectDestPointsI "GdipEnumerateMetafileSrcRectDestPointsI" intptr, intptr, intptr, int, intptr, int, intptr, intptr, intptr ; res = GdipEnumerateMetafileSrcRectDestPointsI(varptr(graphics), varptr(metafile), varptr(destPoints), count, varptr(srcRect), srcUnit, callback, callbackData, varptr(imageAttributes)) ; graphics : GpGraphics* in/out -> "intptr" ; metafile : GpMetafile* -> "intptr" ; destPoints : Point* -> "intptr" ; count : INT -> "int" ; srcRect : Rect* -> "intptr" ; srcUnit : Unit -> "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")
procGdipEnumerateMetafileSrcRectDestPointsI = gdiplus.NewProc("GdipEnumerateMetafileSrcRectDestPointsI")
)
// graphics (GpGraphics* in/out), metafile (GpMetafile*), destPoints (Point*), count (INT), srcRect (Rect*), srcUnit (Unit), callback (INT_PTR), callbackData (void* in/out), imageAttributes (GpImageAttributes*)
r1, _, err := procGdipEnumerateMetafileSrcRectDestPointsI.Call(
uintptr(graphics),
uintptr(metafile),
uintptr(destPoints),
uintptr(count),
uintptr(srcRect),
uintptr(srcUnit),
uintptr(callback),
uintptr(callbackData),
uintptr(imageAttributes),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // Statusfunction GdipEnumerateMetafileSrcRectDestPointsI(
graphics: Pointer; // GpGraphics* in/out
metafile: Pointer; // GpMetafile*
destPoints: Pointer; // Point*
count: Integer; // INT
srcRect: Pointer; // Rect*
srcUnit: Integer; // Unit
callback: NativeInt; // INT_PTR
callbackData: Pointer; // void* in/out
imageAttributes: Pointer // GpImageAttributes*
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipEnumerateMetafileSrcRectDestPointsI';result := DllCall("gdiplus\GdipEnumerateMetafileSrcRectDestPointsI"
, "Ptr", graphics ; GpGraphics* in/out
, "Ptr", metafile ; GpMetafile*
, "Ptr", destPoints ; Point*
, "Int", count ; INT
, "Ptr", srcRect ; Rect*
, "Int", srcUnit ; Unit
, "Ptr", callback ; INT_PTR
, "Ptr", callbackData ; void* in/out
, "Ptr", imageAttributes ; GpImageAttributes*
, "Int") ; return: Status●GdipEnumerateMetafileSrcRectDestPointsI(graphics, metafile, destPoints, count, srcRect, srcUnit, callback, callbackData, imageAttributes) = DLL("gdiplus.dll", "int GdipEnumerateMetafileSrcRectDestPointsI(void*, void*, void*, int, void*, int, int, void*, void*)")
# 呼び出し: GdipEnumerateMetafileSrcRectDestPointsI(graphics, metafile, destPoints, count, srcRect, srcUnit, callback, callbackData, imageAttributes)
# graphics : GpGraphics* in/out -> "void*"
# metafile : GpMetafile* -> "void*"
# destPoints : Point* -> "void*"
# count : INT -> "int"
# srcRect : Rect* -> "void*"
# srcUnit : Unit -> "int"
# callback : INT_PTR -> "int"
# callbackData : void* in/out -> "void*"
# imageAttributes : GpImageAttributes* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。