ホーム › Devices.Display › EngStrokeAndFillPath
EngStrokeAndFillPath
関数サーフェス上のパスの輪郭描画と塗りつぶしを行う。
シグネチャ
// GDI32.dll
#include <windows.h>
BOOL EngStrokeAndFillPath(
SURFOBJ* pso,
PATHOBJ* ppo,
CLIPOBJ* pco,
XFORMOBJ* pxo,
BRUSHOBJ* pboStroke,
LINEATTRS* plineattrs,
BRUSHOBJ* pboFill,
POINTL* pptlBrushOrg,
DWORD mixFill,
DWORD flOptions
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pso | SURFOBJ* | inout |
| ppo | PATHOBJ* | inout |
| pco | CLIPOBJ* | inout |
| pxo | XFORMOBJ* | inout |
| pboStroke | BRUSHOBJ* | inout |
| plineattrs | LINEATTRS* | inout |
| pboFill | BRUSHOBJ* | inout |
| pptlBrushOrg | POINTL* | inout |
| mixFill | DWORD | in |
| flOptions | DWORD | in |
戻り値の型: BOOL
各言語での呼び出し定義
// GDI32.dll
#include <windows.h>
BOOL EngStrokeAndFillPath(
SURFOBJ* pso,
PATHOBJ* ppo,
CLIPOBJ* pco,
XFORMOBJ* pxo,
BRUSHOBJ* pboStroke,
LINEATTRS* plineattrs,
BRUSHOBJ* pboFill,
POINTL* pptlBrushOrg,
DWORD mixFill,
DWORD flOptions
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("GDI32.dll", ExactSpelling = true)]
static extern bool EngStrokeAndFillPath(
IntPtr pso, // SURFOBJ* in/out
IntPtr ppo, // PATHOBJ* in/out
IntPtr pco, // CLIPOBJ* in/out
IntPtr pxo, // XFORMOBJ* in/out
IntPtr pboStroke, // BRUSHOBJ* in/out
IntPtr plineattrs, // LINEATTRS* in/out
IntPtr pboFill, // BRUSHOBJ* in/out
IntPtr pptlBrushOrg, // POINTL* in/out
uint mixFill, // DWORD
uint flOptions // DWORD
);<DllImport("GDI32.dll", ExactSpelling:=True)>
Public Shared Function EngStrokeAndFillPath(
pso As IntPtr, ' SURFOBJ* in/out
ppo As IntPtr, ' PATHOBJ* in/out
pco As IntPtr, ' CLIPOBJ* in/out
pxo As IntPtr, ' XFORMOBJ* in/out
pboStroke As IntPtr, ' BRUSHOBJ* in/out
plineattrs As IntPtr, ' LINEATTRS* in/out
pboFill As IntPtr, ' BRUSHOBJ* in/out
pptlBrushOrg As IntPtr, ' POINTL* in/out
mixFill As UInteger, ' DWORD
flOptions As UInteger ' DWORD
) As Boolean
End Function' pso : SURFOBJ* in/out
' ppo : PATHOBJ* in/out
' pco : CLIPOBJ* in/out
' pxo : XFORMOBJ* in/out
' pboStroke : BRUSHOBJ* in/out
' plineattrs : LINEATTRS* in/out
' pboFill : BRUSHOBJ* in/out
' pptlBrushOrg : POINTL* in/out
' mixFill : DWORD
' flOptions : DWORD
Declare PtrSafe Function EngStrokeAndFillPath Lib "gdi32" ( _
ByVal pso As LongPtr, _
ByVal ppo As LongPtr, _
ByVal pco As LongPtr, _
ByVal pxo As LongPtr, _
ByVal pboStroke As LongPtr, _
ByVal plineattrs As LongPtr, _
ByVal pboFill As LongPtr, _
ByVal pptlBrushOrg As LongPtr, _
ByVal mixFill As Long, _
ByVal flOptions As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
EngStrokeAndFillPath = ctypes.windll.gdi32.EngStrokeAndFillPath
EngStrokeAndFillPath.restype = wintypes.BOOL
EngStrokeAndFillPath.argtypes = [
ctypes.c_void_p, # pso : SURFOBJ* in/out
ctypes.c_void_p, # ppo : PATHOBJ* in/out
ctypes.c_void_p, # pco : CLIPOBJ* in/out
ctypes.c_void_p, # pxo : XFORMOBJ* in/out
ctypes.c_void_p, # pboStroke : BRUSHOBJ* in/out
ctypes.c_void_p, # plineattrs : LINEATTRS* in/out
ctypes.c_void_p, # pboFill : BRUSHOBJ* in/out
ctypes.c_void_p, # pptlBrushOrg : POINTL* in/out
wintypes.DWORD, # mixFill : DWORD
wintypes.DWORD, # flOptions : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('GDI32.dll')
EngStrokeAndFillPath = Fiddle::Function.new(
lib['EngStrokeAndFillPath'],
[
Fiddle::TYPE_VOIDP, # pso : SURFOBJ* in/out
Fiddle::TYPE_VOIDP, # ppo : PATHOBJ* in/out
Fiddle::TYPE_VOIDP, # pco : CLIPOBJ* in/out
Fiddle::TYPE_VOIDP, # pxo : XFORMOBJ* in/out
Fiddle::TYPE_VOIDP, # pboStroke : BRUSHOBJ* in/out
Fiddle::TYPE_VOIDP, # plineattrs : LINEATTRS* in/out
Fiddle::TYPE_VOIDP, # pboFill : BRUSHOBJ* in/out
Fiddle::TYPE_VOIDP, # pptlBrushOrg : POINTL* in/out
-Fiddle::TYPE_INT, # mixFill : DWORD
-Fiddle::TYPE_INT, # flOptions : DWORD
],
Fiddle::TYPE_INT)#[link(name = "gdi32")]
extern "system" {
fn EngStrokeAndFillPath(
pso: *mut SURFOBJ, // SURFOBJ* in/out
ppo: *mut PATHOBJ, // PATHOBJ* in/out
pco: *mut CLIPOBJ, // CLIPOBJ* in/out
pxo: *mut XFORMOBJ, // XFORMOBJ* in/out
pboStroke: *mut BRUSHOBJ, // BRUSHOBJ* in/out
plineattrs: *mut LINEATTRS, // LINEATTRS* in/out
pboFill: *mut BRUSHOBJ, // BRUSHOBJ* in/out
pptlBrushOrg: *mut POINTL, // POINTL* in/out
mixFill: u32, // DWORD
flOptions: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("GDI32.dll")]
public static extern bool EngStrokeAndFillPath(IntPtr pso, IntPtr ppo, IntPtr pco, IntPtr pxo, IntPtr pboStroke, IntPtr plineattrs, IntPtr pboFill, IntPtr pptlBrushOrg, uint mixFill, uint flOptions);
"@
$api = Add-Type -MemberDefinition $sig -Name 'GDI32_EngStrokeAndFillPath' -Namespace Win32 -PassThru
# $api::EngStrokeAndFillPath(pso, ppo, pco, pxo, pboStroke, plineattrs, pboFill, pptlBrushOrg, mixFill, flOptions)#uselib "GDI32.dll"
#func global EngStrokeAndFillPath "EngStrokeAndFillPath" sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr
; EngStrokeAndFillPath varptr(pso), varptr(ppo), varptr(pco), varptr(pxo), varptr(pboStroke), varptr(plineattrs), varptr(pboFill), varptr(pptlBrushOrg), mixFill, flOptions ; 戻り値は stat
; pso : SURFOBJ* in/out -> "sptr"
; ppo : PATHOBJ* in/out -> "sptr"
; pco : CLIPOBJ* in/out -> "sptr"
; pxo : XFORMOBJ* in/out -> "sptr"
; pboStroke : BRUSHOBJ* in/out -> "sptr"
; plineattrs : LINEATTRS* in/out -> "sptr"
; pboFill : BRUSHOBJ* in/out -> "sptr"
; pptlBrushOrg : POINTL* in/out -> "sptr"
; mixFill : DWORD -> "sptr"
; flOptions : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "GDI32.dll" #cfunc global EngStrokeAndFillPath "EngStrokeAndFillPath" var, var, var, var, var, var, var, var, int, int ; res = EngStrokeAndFillPath(pso, ppo, pco, pxo, pboStroke, plineattrs, pboFill, pptlBrushOrg, mixFill, flOptions) ; pso : SURFOBJ* in/out -> "var" ; ppo : PATHOBJ* in/out -> "var" ; pco : CLIPOBJ* in/out -> "var" ; pxo : XFORMOBJ* in/out -> "var" ; pboStroke : BRUSHOBJ* in/out -> "var" ; plineattrs : LINEATTRS* in/out -> "var" ; pboFill : BRUSHOBJ* in/out -> "var" ; pptlBrushOrg : POINTL* in/out -> "var" ; mixFill : DWORD -> "int" ; flOptions : DWORD -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "GDI32.dll" #cfunc global EngStrokeAndFillPath "EngStrokeAndFillPath" sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, int, int ; res = EngStrokeAndFillPath(varptr(pso), varptr(ppo), varptr(pco), varptr(pxo), varptr(pboStroke), varptr(plineattrs), varptr(pboFill), varptr(pptlBrushOrg), mixFill, flOptions) ; pso : SURFOBJ* in/out -> "sptr" ; ppo : PATHOBJ* in/out -> "sptr" ; pco : CLIPOBJ* in/out -> "sptr" ; pxo : XFORMOBJ* in/out -> "sptr" ; pboStroke : BRUSHOBJ* in/out -> "sptr" ; plineattrs : LINEATTRS* in/out -> "sptr" ; pboFill : BRUSHOBJ* in/out -> "sptr" ; pptlBrushOrg : POINTL* in/out -> "sptr" ; mixFill : DWORD -> "int" ; flOptions : DWORD -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; BOOL EngStrokeAndFillPath(SURFOBJ* pso, PATHOBJ* ppo, CLIPOBJ* pco, XFORMOBJ* pxo, BRUSHOBJ* pboStroke, LINEATTRS* plineattrs, BRUSHOBJ* pboFill, POINTL* pptlBrushOrg, DWORD mixFill, DWORD flOptions) #uselib "GDI32.dll" #cfunc global EngStrokeAndFillPath "EngStrokeAndFillPath" var, var, var, var, var, var, var, var, int, int ; res = EngStrokeAndFillPath(pso, ppo, pco, pxo, pboStroke, plineattrs, pboFill, pptlBrushOrg, mixFill, flOptions) ; pso : SURFOBJ* in/out -> "var" ; ppo : PATHOBJ* in/out -> "var" ; pco : CLIPOBJ* in/out -> "var" ; pxo : XFORMOBJ* in/out -> "var" ; pboStroke : BRUSHOBJ* in/out -> "var" ; plineattrs : LINEATTRS* in/out -> "var" ; pboFill : BRUSHOBJ* in/out -> "var" ; pptlBrushOrg : POINTL* in/out -> "var" ; mixFill : DWORD -> "int" ; flOptions : DWORD -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOL EngStrokeAndFillPath(SURFOBJ* pso, PATHOBJ* ppo, CLIPOBJ* pco, XFORMOBJ* pxo, BRUSHOBJ* pboStroke, LINEATTRS* plineattrs, BRUSHOBJ* pboFill, POINTL* pptlBrushOrg, DWORD mixFill, DWORD flOptions) #uselib "GDI32.dll" #cfunc global EngStrokeAndFillPath "EngStrokeAndFillPath" intptr, intptr, intptr, intptr, intptr, intptr, intptr, intptr, int, int ; res = EngStrokeAndFillPath(varptr(pso), varptr(ppo), varptr(pco), varptr(pxo), varptr(pboStroke), varptr(plineattrs), varptr(pboFill), varptr(pptlBrushOrg), mixFill, flOptions) ; pso : SURFOBJ* in/out -> "intptr" ; ppo : PATHOBJ* in/out -> "intptr" ; pco : CLIPOBJ* in/out -> "intptr" ; pxo : XFORMOBJ* in/out -> "intptr" ; pboStroke : BRUSHOBJ* in/out -> "intptr" ; plineattrs : LINEATTRS* in/out -> "intptr" ; pboFill : BRUSHOBJ* in/out -> "intptr" ; pptlBrushOrg : POINTL* in/out -> "intptr" ; mixFill : DWORD -> "int" ; flOptions : DWORD -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
gdi32 = windows.NewLazySystemDLL("GDI32.dll")
procEngStrokeAndFillPath = gdi32.NewProc("EngStrokeAndFillPath")
)
// pso (SURFOBJ* in/out), ppo (PATHOBJ* in/out), pco (CLIPOBJ* in/out), pxo (XFORMOBJ* in/out), pboStroke (BRUSHOBJ* in/out), plineattrs (LINEATTRS* in/out), pboFill (BRUSHOBJ* in/out), pptlBrushOrg (POINTL* in/out), mixFill (DWORD), flOptions (DWORD)
r1, _, err := procEngStrokeAndFillPath.Call(
uintptr(pso),
uintptr(ppo),
uintptr(pco),
uintptr(pxo),
uintptr(pboStroke),
uintptr(plineattrs),
uintptr(pboFill),
uintptr(pptlBrushOrg),
uintptr(mixFill),
uintptr(flOptions),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction EngStrokeAndFillPath(
pso: Pointer; // SURFOBJ* in/out
ppo: Pointer; // PATHOBJ* in/out
pco: Pointer; // CLIPOBJ* in/out
pxo: Pointer; // XFORMOBJ* in/out
pboStroke: Pointer; // BRUSHOBJ* in/out
plineattrs: Pointer; // LINEATTRS* in/out
pboFill: Pointer; // BRUSHOBJ* in/out
pptlBrushOrg: Pointer; // POINTL* in/out
mixFill: DWORD; // DWORD
flOptions: DWORD // DWORD
): BOOL; stdcall;
external 'GDI32.dll' name 'EngStrokeAndFillPath';result := DllCall("GDI32\EngStrokeAndFillPath"
, "Ptr", pso ; SURFOBJ* in/out
, "Ptr", ppo ; PATHOBJ* in/out
, "Ptr", pco ; CLIPOBJ* in/out
, "Ptr", pxo ; XFORMOBJ* in/out
, "Ptr", pboStroke ; BRUSHOBJ* in/out
, "Ptr", plineattrs ; LINEATTRS* in/out
, "Ptr", pboFill ; BRUSHOBJ* in/out
, "Ptr", pptlBrushOrg ; POINTL* in/out
, "UInt", mixFill ; DWORD
, "UInt", flOptions ; DWORD
, "Int") ; return: BOOL●EngStrokeAndFillPath(pso, ppo, pco, pxo, pboStroke, plineattrs, pboFill, pptlBrushOrg, mixFill, flOptions) = DLL("GDI32.dll", "bool EngStrokeAndFillPath(void*, void*, void*, void*, void*, void*, void*, void*, dword, dword)")
# 呼び出し: EngStrokeAndFillPath(pso, ppo, pco, pxo, pboStroke, plineattrs, pboFill, pptlBrushOrg, mixFill, flOptions)
# pso : SURFOBJ* in/out -> "void*"
# ppo : PATHOBJ* in/out -> "void*"
# pco : CLIPOBJ* in/out -> "void*"
# pxo : XFORMOBJ* in/out -> "void*"
# pboStroke : BRUSHOBJ* in/out -> "void*"
# plineattrs : LINEATTRS* in/out -> "void*"
# pboFill : BRUSHOBJ* in/out -> "void*"
# pptlBrushOrg : POINTL* in/out -> "void*"
# mixFill : DWORD -> "dword"
# flOptions : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。