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