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