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

GdipResetPenTransform

関数
ペンの変換行列を単位行列にリセットする。
DLLgdiplus.dll呼出規約winapi

シグネチャ

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

Status GdipResetPenTransform(
    GpPen* pen
);

パラメーター

名前方向
penGpPen*inout

戻り値の型: Status

各言語での呼び出し定義

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

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

GdipResetPenTransform = ctypes.windll.gdiplus.GdipResetPenTransform
GdipResetPenTransform.restype = ctypes.c_int
GdipResetPenTransform.argtypes = [
    ctypes.c_void_p,  # pen : GpPen* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipResetPenTransform = gdiplus.NewProc("GdipResetPenTransform")
)

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