Win32 API 日本語リファレンス
ホームGraphics.GdiPlus › GdipResetPathGradientTransform

GdipResetPathGradientTransform

関数
パスグラデーションの変換行列を単位行列に戻す。
DLLgdiplus.dll呼出規約winapi

シグネチャ

// gdiplus.dll
#include <windows.h>

Status GdipResetPathGradientTransform(
    GpPathGradient* brush
);

パラメーター

名前方向
brushGpPathGradient*inout

戻り値の型: Status

各言語での呼び出し定義

// gdiplus.dll
#include <windows.h>

Status GdipResetPathGradientTransform(
    GpPathGradient* brush
);
[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipResetPathGradientTransform(
    IntPtr brush   // GpPathGradient* in/out
);
<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipResetPathGradientTransform(
    brush As IntPtr   ' GpPathGradient* in/out
) As Integer
End Function
' brush : GpPathGradient* in/out
Declare PtrSafe Function GdipResetPathGradientTransform Lib "gdiplus" ( _
    ByVal brush As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GdipResetPathGradientTransform = ctypes.windll.gdiplus.GdipResetPathGradientTransform
GdipResetPathGradientTransform.restype = ctypes.c_int
GdipResetPathGradientTransform.argtypes = [
    ctypes.c_void_p,  # brush : GpPathGradient* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('gdiplus.dll')
GdipResetPathGradientTransform = Fiddle::Function.new(
  lib['GdipResetPathGradientTransform'],
  [
    Fiddle::TYPE_VOIDP,  # brush : GpPathGradient* in/out
  ],
  Fiddle::TYPE_INT)
#[link(name = "gdiplus")]
extern "system" {
    fn GdipResetPathGradientTransform(
        brush: *mut GpPathGradient  // GpPathGradient* in/out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipResetPathGradientTransform(IntPtr brush);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipResetPathGradientTransform' -Namespace Win32 -PassThru
# $api::GdipResetPathGradientTransform(brush)
#uselib "gdiplus.dll"
#func global GdipResetPathGradientTransform "GdipResetPathGradientTransform" sptr
; GdipResetPathGradientTransform varptr(brush)   ; 戻り値は stat
; brush : GpPathGradient* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "gdiplus.dll"
#cfunc global GdipResetPathGradientTransform "GdipResetPathGradientTransform" var
; res = GdipResetPathGradientTransform(brush)
; brush : GpPathGradient* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; Status GdipResetPathGradientTransform(GpPathGradient* brush)
#uselib "gdiplus.dll"
#cfunc global GdipResetPathGradientTransform "GdipResetPathGradientTransform" var
; res = GdipResetPathGradientTransform(brush)
; brush : GpPathGradient* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipResetPathGradientTransform = gdiplus.NewProc("GdipResetPathGradientTransform")
)

// brush (GpPathGradient* in/out)
r1, _, err := procGdipResetPathGradientTransform.Call(
	uintptr(brush),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // Status
function GdipResetPathGradientTransform(
  brush: Pointer   // GpPathGradient* in/out
): Integer; stdcall;
  external 'gdiplus.dll' name 'GdipResetPathGradientTransform';
result := DllCall("gdiplus\GdipResetPathGradientTransform"
    , "Ptr", brush   ; GpPathGradient* in/out
    , "Int")   ; return: Status
●GdipResetPathGradientTransform(brush) = DLL("gdiplus.dll", "int GdipResetPathGradientTransform(void*)")
# 呼び出し: GdipResetPathGradientTransform(brush)
# brush : GpPathGradient* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。