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

GdipGetPathGradientCenterPointI

関数
パスグラデーションの中心点を整数座標で取得する。
DLLgdiplus.dll呼出規約winapi

シグネチャ

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

Status GdipGetPathGradientCenterPointI(
    GpPathGradient* brush,
    Point* points
);

パラメーター

名前方向
brushGpPathGradient*inout
pointsPoint*inout

戻り値の型: Status

各言語での呼び出し定義

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

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

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

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

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipGetPathGradientCenterPointI = gdiplus.NewProc("GdipGetPathGradientCenterPointI")
)

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