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