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

GdipIsVisiblePathPointI

関数
指定した点がGDI+パスの内部に含まれるか判定する(整数版)。
DLLgdiplus.dll呼出規約winapi

シグネチャ

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

Status GdipIsVisiblePathPointI(
    GpPath* path,
    INT x,
    INT y,
    GpGraphics* graphics,
    BOOL* result
);

パラメーター

名前方向
pathGpPath*inout
xINTin
yINTin
graphicsGpGraphics*inout
resultBOOL*inout

戻り値の型: Status

各言語での呼び出し定義

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

Status GdipIsVisiblePathPointI(
    GpPath* path,
    INT x,
    INT y,
    GpGraphics* graphics,
    BOOL* result
);
[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipIsVisiblePathPointI(
    IntPtr path,   // GpPath* in/out
    int x,   // INT
    int y,   // INT
    IntPtr graphics,   // GpGraphics* in/out
    ref int result   // BOOL* in/out
);
<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipIsVisiblePathPointI(
    path As IntPtr,   ' GpPath* in/out
    x As Integer,   ' INT
    y As Integer,   ' INT
    graphics As IntPtr,   ' GpGraphics* in/out
    ByRef result As Integer   ' BOOL* in/out
) As Integer
End Function
' path : GpPath* in/out
' x : INT
' y : INT
' graphics : GpGraphics* in/out
' result : BOOL* in/out
Declare PtrSafe Function GdipIsVisiblePathPointI Lib "gdiplus" ( _
    ByVal path As LongPtr, _
    ByVal x As Long, _
    ByVal y As Long, _
    ByVal graphics As LongPtr, _
    ByRef result As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GdipIsVisiblePathPointI = ctypes.windll.gdiplus.GdipIsVisiblePathPointI
GdipIsVisiblePathPointI.restype = ctypes.c_int
GdipIsVisiblePathPointI.argtypes = [
    ctypes.c_void_p,  # path : GpPath* in/out
    ctypes.c_int,  # x : INT
    ctypes.c_int,  # y : INT
    ctypes.c_void_p,  # graphics : GpGraphics* in/out
    ctypes.c_void_p,  # result : BOOL* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipIsVisiblePathPointI = gdiplus.NewProc("GdipIsVisiblePathPointI")
)

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