ホーム › Graphics.GdiPlus › GdipSetAdjustableArrowCapFillState
GdipSetAdjustableArrowCapFillState
関数調整可能な矢印キャップを塗りつぶすかどうかの状態を設定する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipSetAdjustableArrowCapFillState(
GpAdjustableArrowCap* cap,
BOOL fillState
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| cap | GpAdjustableArrowCap* | inout | 対象の可変矢印キャップへのポインタ。 |
| fillState | BOOL | in | 矢印を塗りつぶすかを示すBOOL。TRUEで塗りつぶし。 |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipSetAdjustableArrowCapFillState(
GpAdjustableArrowCap* cap,
BOOL fillState
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipSetAdjustableArrowCapFillState(
IntPtr cap, // GpAdjustableArrowCap* in/out
bool fillState // BOOL
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipSetAdjustableArrowCapFillState(
cap As IntPtr, ' GpAdjustableArrowCap* in/out
fillState As Boolean ' BOOL
) As Integer
End Function' cap : GpAdjustableArrowCap* in/out
' fillState : BOOL
Declare PtrSafe Function GdipSetAdjustableArrowCapFillState Lib "gdiplus" ( _
ByVal cap As LongPtr, _
ByVal fillState As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GdipSetAdjustableArrowCapFillState = ctypes.windll.gdiplus.GdipSetAdjustableArrowCapFillState
GdipSetAdjustableArrowCapFillState.restype = ctypes.c_int
GdipSetAdjustableArrowCapFillState.argtypes = [
ctypes.c_void_p, # cap : GpAdjustableArrowCap* in/out
wintypes.BOOL, # fillState : BOOL
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('gdiplus.dll')
GdipSetAdjustableArrowCapFillState = Fiddle::Function.new(
lib['GdipSetAdjustableArrowCapFillState'],
[
Fiddle::TYPE_VOIDP, # cap : GpAdjustableArrowCap* in/out
Fiddle::TYPE_INT, # fillState : BOOL
],
Fiddle::TYPE_INT)#[link(name = "gdiplus")]
extern "system" {
fn GdipSetAdjustableArrowCapFillState(
cap: *mut GpAdjustableArrowCap, // GpAdjustableArrowCap* in/out
fillState: i32 // BOOL
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipSetAdjustableArrowCapFillState(IntPtr cap, bool fillState);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipSetAdjustableArrowCapFillState' -Namespace Win32 -PassThru
# $api::GdipSetAdjustableArrowCapFillState(cap, fillState)#uselib "gdiplus.dll"
#func global GdipSetAdjustableArrowCapFillState "GdipSetAdjustableArrowCapFillState" sptr, sptr
; GdipSetAdjustableArrowCapFillState varptr(cap), fillState ; 戻り値は stat
; cap : GpAdjustableArrowCap* in/out -> "sptr"
; fillState : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "gdiplus.dll" #cfunc global GdipSetAdjustableArrowCapFillState "GdipSetAdjustableArrowCapFillState" var, int ; res = GdipSetAdjustableArrowCapFillState(cap, fillState) ; cap : GpAdjustableArrowCap* in/out -> "var" ; fillState : BOOL -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipSetAdjustableArrowCapFillState "GdipSetAdjustableArrowCapFillState" sptr, int ; res = GdipSetAdjustableArrowCapFillState(varptr(cap), fillState) ; cap : GpAdjustableArrowCap* in/out -> "sptr" ; fillState : BOOL -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL fillState) #uselib "gdiplus.dll" #cfunc global GdipSetAdjustableArrowCapFillState "GdipSetAdjustableArrowCapFillState" var, int ; res = GdipSetAdjustableArrowCapFillState(cap, fillState) ; cap : GpAdjustableArrowCap* in/out -> "var" ; fillState : BOOL -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL fillState) #uselib "gdiplus.dll" #cfunc global GdipSetAdjustableArrowCapFillState "GdipSetAdjustableArrowCapFillState" intptr, int ; res = GdipSetAdjustableArrowCapFillState(varptr(cap), fillState) ; cap : GpAdjustableArrowCap* in/out -> "intptr" ; fillState : BOOL -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
procGdipSetAdjustableArrowCapFillState = gdiplus.NewProc("GdipSetAdjustableArrowCapFillState")
)
// cap (GpAdjustableArrowCap* in/out), fillState (BOOL)
r1, _, err := procGdipSetAdjustableArrowCapFillState.Call(
uintptr(cap),
uintptr(fillState),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // Statusfunction GdipSetAdjustableArrowCapFillState(
cap: Pointer; // GpAdjustableArrowCap* in/out
fillState: BOOL // BOOL
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipSetAdjustableArrowCapFillState';result := DllCall("gdiplus\GdipSetAdjustableArrowCapFillState"
, "Ptr", cap ; GpAdjustableArrowCap* in/out
, "Int", fillState ; BOOL
, "Int") ; return: Status●GdipSetAdjustableArrowCapFillState(cap, fillState) = DLL("gdiplus.dll", "int GdipSetAdjustableArrowCapFillState(void*, bool)")
# 呼び出し: GdipSetAdjustableArrowCapFillState(cap, fillState)
# cap : GpAdjustableArrowCap* in/out -> "void*"
# fillState : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "gdiplus" fn GdipSetAdjustableArrowCapFillState(
cap: [*c]GpAdjustableArrowCap, // GpAdjustableArrowCap* in/out
fillState: i32 // BOOL
) callconv(std.os.windows.WINAPI) i32;proc GdipSetAdjustableArrowCapFillState(
cap: ptr GpAdjustableArrowCap, # GpAdjustableArrowCap* in/out
fillState: int32 # BOOL
): int32 {.importc: "GdipSetAdjustableArrowCapFillState", stdcall, dynlib: "gdiplus.dll".}pragma(lib, "gdiplus");
extern(Windows)
int GdipSetAdjustableArrowCapFillState(
GpAdjustableArrowCap* cap, // GpAdjustableArrowCap* in/out
int fillState // BOOL
);ccall((:GdipSetAdjustableArrowCapFillState, "gdiplus.dll"), stdcall, Int32,
(Ptr{GpAdjustableArrowCap}, Int32),
cap, fillState)
# cap : GpAdjustableArrowCap* in/out -> Ptr{GpAdjustableArrowCap}
# fillState : BOOL -> Int32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t GdipSetAdjustableArrowCapFillState(
void* cap,
int32_t fillState);
]]
local gdiplus = ffi.load("gdiplus")
-- gdiplus.GdipSetAdjustableArrowCapFillState(cap, fillState)
-- cap : GpAdjustableArrowCap* in/out
-- fillState : BOOL
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('gdiplus.dll');
const GdipSetAdjustableArrowCapFillState = lib.func('__stdcall', 'GdipSetAdjustableArrowCapFillState', 'int32_t', ['void *', 'int32_t']);
// GdipSetAdjustableArrowCapFillState(cap, fillState)
// cap : GpAdjustableArrowCap* in/out -> 'void *'
// fillState : BOOL -> 'int32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("gdiplus.dll", {
GdipSetAdjustableArrowCapFillState: { parameters: ["pointer", "i32"], result: "i32" },
});
// lib.symbols.GdipSetAdjustableArrowCapFillState(cap, fillState)
// cap : GpAdjustableArrowCap* in/out -> "pointer"
// fillState : BOOL -> "i32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t GdipSetAdjustableArrowCapFillState(
void* cap,
int32_t fillState);
C, "gdiplus.dll");
// $ffi->GdipSetAdjustableArrowCapFillState(cap, fillState);
// cap : GpAdjustableArrowCap* in/out
// fillState : BOOL
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Gdiplus extends StdCallLibrary {
Gdiplus INSTANCE = Native.load("gdiplus", Gdiplus.class);
int GdipSetAdjustableArrowCapFillState(
Pointer cap, // GpAdjustableArrowCap* in/out
boolean fillState // BOOL
);
}@[Link("gdiplus")]
lib Libgdiplus
fun GdipSetAdjustableArrowCapFillState = GdipSetAdjustableArrowCapFillState(
cap : GpAdjustableArrowCap*, # GpAdjustableArrowCap* in/out
fillState : Int32 # BOOL
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef GdipSetAdjustableArrowCapFillStateNative = Int32 Function(Pointer<Void>, Int32);
typedef GdipSetAdjustableArrowCapFillStateDart = int Function(Pointer<Void>, int);
final GdipSetAdjustableArrowCapFillState = DynamicLibrary.open('gdiplus.dll')
.lookupFunction<GdipSetAdjustableArrowCapFillStateNative, GdipSetAdjustableArrowCapFillStateDart>('GdipSetAdjustableArrowCapFillState');
// cap : GpAdjustableArrowCap* in/out -> Pointer<Void>
// fillState : BOOL -> Int32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function GdipSetAdjustableArrowCapFillState(
cap: Pointer; // GpAdjustableArrowCap* in/out
fillState: BOOL // BOOL
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipSetAdjustableArrowCapFillState';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "GdipSetAdjustableArrowCapFillState"
c_GdipSetAdjustableArrowCapFillState :: Ptr () -> CInt -> IO Int32
-- cap : GpAdjustableArrowCap* in/out -> Ptr ()
-- fillState : BOOL -> CInt
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let gdipsetadjustablearrowcapfillstate =
foreign "GdipSetAdjustableArrowCapFillState"
((ptr void) @-> int32_t @-> returning int32_t)
(* cap : GpAdjustableArrowCap* in/out -> (ptr void) *)
(* fillState : BOOL -> int32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library gdiplus (t "gdiplus.dll"))
(cffi:use-foreign-library gdiplus)
(cffi:defcfun ("GdipSetAdjustableArrowCapFillState" gdip-set-adjustable-arrow-cap-fill-state :convention :stdcall) :int32
(cap :pointer) ; GpAdjustableArrowCap* in/out
(fill-state :int32)) ; BOOL
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $GdipSetAdjustableArrowCapFillState = Win32::API::More->new('gdiplus',
'int GdipSetAdjustableArrowCapFillState(LPVOID cap, BOOL fillState)');
# my $ret = $GdipSetAdjustableArrowCapFillState->Call($cap, $fillState);
# cap : GpAdjustableArrowCap* in/out -> LPVOID
# fillState : BOOL -> BOOL
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。