ホーム › Graphics.GdiPlus › GdipGetPathGradientCenterPointI
GdipGetPathGradientCenterPointI
関数パスグラデーションの中心点を整数座標で取得する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipGetPathGradientCenterPointI(
GpPathGradient* brush,
Point* points
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| brush | GpPathGradient* | inout |
| points | Point* | 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 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipGetPathGradientCenterPointI "GdipGetPathGradientCenterPointI" sptr, sptr ; res = GdipGetPathGradientCenterPointI(varptr(brush), varptr(points)) ; brush : GpPathGradient* in/out -> "sptr" ; points : Point* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは 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 方式にも切替可。; Status GdipGetPathGradientCenterPointI(GpPathGradient* brush, Point* points) #uselib "gdiplus.dll" #cfunc global GdipGetPathGradientCenterPointI "GdipGetPathGradientCenterPointI" intptr, intptr ; res = GdipGetPathGradientCenterPointI(varptr(brush), varptr(points)) ; brush : GpPathGradient* in/out -> "intptr" ; points : Point* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは 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 // Statusfunction 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)。