// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0 > or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT >, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
//! Mappings for the contents of d2d1_3.h
use ctypes::c_void;
use shared::basetsd::{UINT16, UINT32, UINT64};
use shared::dxgi::{IDXGIDevice, IDXGISurface};
use shared::dxgitype::DXGI_COLOR_SPACE_TYPE;
use shared::minwindef::{BOOL, BYTE, DWORD, FLOAT};
use shared::ntdef::WCHAR;
use shared::winerror::HRESULT;
use um::d2d1::{
D2D1_BITMAP_INTERPOLATION_MODE, D2D1_COLOR_F, D2D1_DRAW_TEXT_OPTIONS, D2D1_GAMMA_1_
0,
D2D1_GAMMA_2_2, D2D1_MATRIX_3X2_F, D2D1_POINT_2F, D2D1_RECT_F, D2D1_RECT_U, D2D1_SIZE_F,
ID2D1Bitmap, ID2D1Brush, ID2D1Image, ID2D1ImageVtbl, ID2D1Resource, ID2D1ResourceVtbl,
ID2D1SimplifiedGeometrySink,
};
use um::d2d1_1::{
D2D1_BUFFER_PRECISION, D2D1_DEVICE_CONTEXT_OPTIONS, D2D1_INTERPOLATION_MODE,
D2D1_PRIMITIVE_BLEND, ID2D1ColorContext, ID2D1ColorContextVtbl, ID2D1CommandList,
ID2D1GdiMetafile, ID2D1GdiMetafileSink, ID2D1GdiMetafileSinkVtbl, ID2D1GdiMetafileVtbl,
};
use um::d2d1_2::{
ID2D1CommandSink1, ID2D1CommandSink1Vtbl, ID2D1Device1, ID2D1Device1Vtbl, ID2D1DeviceContext1,
ID2D1DeviceContext1Vtbl, ID2D1Factory2, ID2D1Factory2Vtbl,
};
use um::d2d1effects::D2D1_BLEND_MODE;
use um::d2d1svg::ID2D1SvgDocument;
use um::dcommon::{D2D1_ALPHA_MODE, DWRITE_GLYPH_IMAGE_FORMATS, DWRITE_MEASURING_MODE};
use um::dwrite::{DWRITE_GLYPH_RUN, IDWriteFontFace, IDWriteTextFormat, IDWriteTextLayout};
use um::objidlbase::IStream;
use um::wincodec::IWICBitmapSource;
ENUM !{enum D2D1_INK_NIB_SHAPE {
D2D1_INK_NIB_SHAPE_ROUND = 0 ,
D2D1_INK_NIB_SHAPE_SQUARE = 1 ,
}}
ENUM !{enum D2D1_ORIENTATION {
D2D1_ORIENTATION_DEFAULT = 1 ,
D2D1_ORIENTATION_FLIP_HORIZONTAL = 2 ,
D2D1_ORIENTATION_ROTATE_CLOCKWISE180 = 3 ,
D2D1_ORIENTATION_ROTATE_CLOCKWISE180_FLIP_HORIZONTAL = 4 ,
D2D1_ORIENTATION_ROTATE_CLOCKWISE90_FLIP_HORIZONTAL = 5 ,
D2D1_ORIENTATION_ROTATE_CLOCKWISE270 = 6 ,
D2D1_ORIENTATION_ROTATE_CLOCKWISE270_FLIP_HORIZONTAL = 7 ,
D2D1_ORIENTATION_ROTATE_CLOCKWISE90 = 8 ,
}}
ENUM !{enum D2D1_IMAGE_SOURCE_LOADING_OPTIONS {
D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE = 0 ,
D2D1_IMAGE_SOURCE_LOADING_OPTIONS_RELEASE_SOURCE = 1 ,
D2D1_IMAGE_SOURCE_LOADING_OPTIONS_CACHE_ON_DEMAND = 2 ,
}}
ENUM !{enum D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS {
D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_NONE = 0 ,
D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_LOW_QUALITY_PRIMARY_CONVERSION = 1 ,
}}
ENUM !{enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS {
D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_NONE = 0 ,
D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_DISABLE_DPI_SCALE = 1 ,
}}
STRUCT !{struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES {
orientation: D2D1_ORIENTATION,
scaleX: FLOAT,
scaleY: FLOAT,
interpolationMode: D2D1_INTERPOLATION_MODE,
options: D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS,
}}
STRUCT !{struct D2D1_INK_POINT {
x: FLOAT,
y: FLOAT,
radius: FLOAT,
}}
STRUCT !{struct D2D1_INK_BEZIER_SEGMENT {
point1: D2D1_INK_POINT,
point2: D2D1_INK_POINT,
point3: D2D1_INK_POINT,
}}
STRUCT !{struct D2D1_INK_STYLE_PROPERTIES {
nibShape: D2D1_INK_NIB_SHAPE,
nibTransform: D2D1_MATRIX_3X2_F,
}}
ENUM !{enum D2D1_PATCH_EDGE_MODE {
D2D1_PATCH_EDGE_MODE_ALIASED = 0 ,
D2D1_PATCH_EDGE_MODE_ANTIALIASED = 1 ,
D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED = 2 ,
}}
STRUCT !{struct D2D1_GRADIENT_MESH_PATCH {
point00: D2D1_POINT_2F,
point01: D2D1_POINT_2F,
point02: D2D1_POINT_2F,
point03: D2D1_POINT_2F,
point10: D2D1_POINT_2F,
point11: D2D1_POINT_2F,
point12: D2D1_POINT_2F,
point13: D2D1_POINT_2F,
point20: D2D1_POINT_2F,
point21: D2D1_POINT_2F,
point22: D2D1_POINT_2F,
point23: D2D1_POINT_2F,
point30: D2D1_POINT_2F,
point31: D2D1_POINT_2F,
point32: D2D1_POINT_2F,
point33: D2D1_POINT_2F,
color00: D2D1_COLOR_F,
color03: D2D1_COLOR_F,
color30: D2D1_COLOR_F,
color33: D2D1_COLOR_F,
topEdgeMode: D2D1_PATCH_EDGE_MODE,
leftEdgeMode: D2D1_PATCH_EDGE_MODE,
bottomEdgeMode: D2D1_PATCH_EDGE_MODE,
rightEdgeMode: D2D1_PATCH_EDGE_MODE,
}}
ENUM !{enum D2D1_SPRITE_OPTIONS {
D2D1_SPRITE_OPTIONS_NONE = 0 ,
D2D1_SPRITE_OPTIONS_CLAMP_TO_SOURCE_RECTANGLE = 1 ,
}}
ENUM !{enum D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION {
D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DEFAULT = 0 ,
D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DISABLE = 1 ,
}}
ENUM !{enum D2D1_GAMMA1 {
D2D1_GAMMA1_G22 = D2D1_GAMMA_2_2,
D2D1_GAMMA1_G10 = D2D1_GAMMA_1_0,
D2D1_GAMMA1_G2084 = 2 ,
}}
STRUCT !{struct D2D1_SIMPLE_COLOR_PROFILE {
redPrimary: D2D1_POINT_2F,
greenPrimary: D2D1_POINT_2F,
bluePrimary: D2D1_POINT_2F,
whitePointXZ: D2D1_POINT_2F,
gamma: D2D1_GAMMA1,
}}
ENUM !{enum D2D1_COLOR_CONTEXT_TYPE {
D2D1_COLOR_CONTEXT_TYPE_ICC = 0 ,
D2D1_COLOR_CONTEXT_TYPE_SIMPLE = 1 ,
D2D1_COLOR_CONTEXT_TYPE_DXGI = 2 ,
}}
DEFINE_GUID!{IID_ID2D1InkStyle,
0 xbae8b344, 0 x23fc, 0 x4071, 0 x8c, 0 xb5, 0 xd0, 0 x5d, 0 x6f, 0 x07, 0 x38, 0 x48}
DEFINE_GUID!{IID_ID2D1Ink,
0 xb499923b, 0 x7029, 0 x478f, 0 xa8, 0 xb3, 0 x43, 0 x2c, 0 x7c, 0 x5f, 0 x53, 0 x12}
DEFINE_GUID!{IID_ID2D1GradientMesh,
0 xf292e401, 0 xc050, 0 x4cde, 0 x83, 0 xd7, 0 x04, 0 x96, 0 x2d, 0 x3b, 0 x23, 0 xc2}
DEFINE_GUID!{IID_ID2D1ImageSource,
0 xc9b664e5, 0 x74a1, 0 x4378, 0 x9a, 0 xc2, 0 xee, 0 xfc, 0 x37, 0 xa3, 0 xf4, 0 xd8}
DEFINE_GUID!{IID_ID2D1ImageSourceFromWic,
0 x77395441, 0 x1c8f, 0 x4555, 0 x86, 0 x83, 0 xf5, 0 x0d, 0 xab, 0 x0f, 0 xe7, 0 x92}
DEFINE_GUID!{IID_ID2D1TransformedImageSource,
0 x7f1f79e5, 0 x2796, 0 x416c, 0 x8f, 0 x55, 0 x70, 0 x0f, 0 x91, 0 x14, 0 x45, 0 xe5}
DEFINE_GUID!{IID_ID2D1LookupTable3D,
0 x53dd9855, 0 xa3b0, 0 x4d5b, 0 x82, 0 xe1, 0 x26, 0 xe2, 0 x5c, 0 x5e, 0 x57, 0 x97}
DEFINE_GUID!{IID_ID2D1DeviceContext2,
0 x394ea6a3, 0 x0c34, 0 x4321, 0 x95, 0 x0b, 0 x6c, 0 xa2, 0 x0f, 0 x0b, 0 xe6, 0 xc7}
DEFINE_GUID!{IID_ID2D1Device2,
0 xa44472e1, 0 x8dfb, 0 x4e60, 0 x84, 0 x92, 0 x6e, 0 x28, 0 x61, 0 xc9, 0 xca, 0 x8b}
DEFINE_GUID!{IID_ID2D1Factory3,
0 x0869759f, 0 x4f00, 0 x413f, 0 xb0, 0 x3e, 0 x2b, 0 xda, 0 x45, 0 x40, 0 x4d, 0 x0f}
DEFINE_GUID!{IID_ID2D1CommandSink2,
0 x3bab440e, 0 x417e, 0 x47df, 0 xa2, 0 xe2, 0 xbc, 0 x0b, 0 xe6, 0 xa0, 0 x09, 0 x16}
DEFINE_GUID!{IID_ID2D1GdiMetafile1,
0 x2e69f9e8, 0 xdd3f, 0 x4bf9, 0 x95, 0 xba, 0 xc0, 0 x4f, 0 x49, 0 xd7, 0 x88, 0 xdf}
DEFINE_GUID!{IID_ID2D1GdiMetafileSink1,
0 xfd0ecb6b, 0 x91e6, 0 x411e, 0 x86, 0 x55, 0 x39, 0 x5e, 0 x76, 0 x0f, 0 x91, 0 xb4}
DEFINE_GUID!{IID_ID2D1SpriteBatch,
0 x4dc583bf, 0 x3a10, 0 x438a, 0 x87, 0 x22, 0 xe9, 0 x76, 0 x52, 0 x24, 0 xf1, 0 xf1}
DEFINE_GUID!{IID_ID2D1DeviceContext3,
0 x235a7496, 0 x8351, 0 x414c, 0 xbc, 0 xd4, 0 x66, 0 x72, 0 xab, 0 x2d, 0 x8e, 0 x00}
DEFINE_GUID!{IID_ID2D1Device3,
0 x852f2087, 0 x802c, 0 x4037, 0 xab, 0 x60, 0 xff, 0 x2e, 0 x7e, 0 xe6, 0 xfc, 0 x01}
DEFINE_GUID!{IID_ID2D1Factory4,
0 xbd4ec2d2, 0 x0662, 0 x4bee, 0 xba, 0 x8e, 0 x6f, 0 x29, 0 xf0, 0 x32, 0 xe0, 0 x96}
DEFINE_GUID!{IID_ID2D1CommandSink3,
0 x18079135, 0 x4cf3, 0 x4868, 0 xbc, 0 x8e, 0 x06, 0 x06, 0 x7e, 0 x6d, 0 x24, 0 x2d}
DEFINE_GUID!{IID_ID2D1SvgGlyphStyle,
0 xaf671749, 0 xd241, 0 x4db8, 0 x8e, 0 x41, 0 xdc, 0 xc2, 0 xe5, 0 xc1, 0 xa4, 0 x38}
DEFINE_GUID!{IID_ID2D1DeviceContext4,
0 x8c427831, 0 x3d90, 0 x4476, 0 xb6, 0 x47, 0 xc4, 0 xfa, 0 xe3, 0 x49, 0 xe4, 0 xdb}
DEFINE_GUID!{IID_ID2D1Device4,
0 xd7bdb159, 0 x5683, 0 x4a46, 0 xbc, 0 x9c, 0 x72, 0 xdc, 0 x72, 0 x0b, 0 x85, 0 x8b}
DEFINE_GUID!{IID_ID2D1Factory5,
0 xc4349994, 0 x838e, 0 x4b0f, 0 x8c, 0 xab, 0 x44, 0 x99, 0 x7d, 0 x9e, 0 xea, 0 xcc}
DEFINE_GUID!{IID_ID2D1CommandSink4,
0 xc78a6519, 0 x40d6, 0 x4218, 0 xb2, 0 xde, 0 xbe, 0 xee, 0 xb7, 0 x44, 0 xbb, 0 x3e}
DEFINE_GUID!{IID_ID2D1ColorContext1,
0 x1ab42875, 0 xc57f, 0 x4be9, 0 xbd, 0 x85, 0 x9c, 0 xd7, 0 x8d, 0 x6f, 0 x55, 0 xee}
DEFINE_GUID!{IID_ID2D1DeviceContext5,
0 x7836d248, 0 x68cc, 0 x4df6, 0 xb9, 0 xe8, 0 xde, 0 x99, 0 x1b, 0 xf6, 0 x2e, 0 xb7}
DEFINE_GUID!{IID_ID2D1Device5,
0 xd55ba0a4, 0 x6405, 0 x4694, 0 xae, 0 xf5, 0 x08, 0 xee, 0 x1a, 0 x43, 0 x58, 0 xb4}
DEFINE_GUID!{IID_ID2D1Factory6,
0 xf9976f46, 0 xf642, 0 x44c1, 0 x97, 0 xca, 0 xda, 0 x32, 0 xea, 0 x2a, 0 x26, 0 x35}
DEFINE_GUID!{IID_ID2D1CommandSink5,
0 x7047dd26, 0 xb1e7, 0 x44a7, 0 x95, 0 x9a, 0 x83, 0 x49, 0 xe2, 0 x14, 0 x4f, 0 xa8}
DEFINE_GUID!{IID_ID2D1DeviceContext6,
0 x985f7e37, 0 x4ed0, 0 x4a19, 0 x98, 0 xa3, 0 x15, 0 xb0, 0 xed, 0 xfd, 0 xe3, 0 x06}
DEFINE_GUID!{IID_ID2D1Device6,
0 x7bfef914, 0 x2d75, 0 x4bad, 0 xbe, 0 x87, 0 xe1, 0 x8d, 0 xdb, 0 x07, 0 x7b, 0 x6d}
DEFINE_GUID!{IID_ID2D1Factory7,
0 xbdc2bdd3, 0 xb96c, 0 x4de6, 0 xbd, 0 xf7, 0 x99, 0 xd4, 0 x74, 0 x54, 0 x54, 0 xde}
RIDL!{#[ uuid(0 xbae8b344, 0 x23fc, 0 x4071, 0 x8c, 0 xb5, 0 xd0, 0 x5d, 0 x6f, 0 x07, 0 x38, 0 x48)]
interface ID2D1InkStyle(ID2D1InkStyleVtbl): ID2D1Resource(ID2D1ResourceVtbl) {
fn SetNibTransform(
transform: *const D2D1_MATRIX_3X2_F,
) -> (),
fn GetNibTransform(
transform: *mut D2D1_MATRIX_3X2_F,
) -> (),
fn SetNibShape(
nibShape: D2D1_INK_NIB_SHAPE,
) -> (),
fn GetNibShape() -> D2D1_INK_NIB_SHAPE,
}}
RIDL!{#[ uuid(0 xb499923b, 0 x7029, 0 x478f, 0 xa8, 0 xb3, 0 x43, 0 x2c, 0 x7c, 0 x5f, 0 x53, 0 x12)]
interface ID2D1Ink(ID2D1InkVtbl): ID2D1Resource(ID2D1ResourceVtbl) {
fn SetStartPoint(
startPoint: *const D2D1_INK_POINT,
) -> (),
fn GetStartPoint() -> D2D1_INK_POINT,
fn AddSegments(
segments: *const D2D1_INK_BEZIER_SEGMENT,
segmentsCount: UINT32,
) -> HRESULT,
fn RemoveSegmentsAtEnd(
segmentsCount: UINT32,
) -> HRESULT,
fn SetSegments(
startSegment: UINT32,
segments: *const D2D1_INK_BEZIER_SEGMENT,
segmentsCount: UINT32,
) -> HRESULT,
fn SetSegmentAtEnd(
segment: *const D2D1_INK_BEZIER_SEGMENT,
) -> HRESULT,
fn GetSegmentCount() -> UINT32,
fn GetSegments(
startSegment: UINT32,
segments: *mut D2D1_INK_BEZIER_SEGMENT,
segmentsCount: UINT32,
) -> HRESULT,
fn StreamAsGeometry(
inkStyle: *mut ID2D1InkStyle,
worldTransform: *const D2D1_MATRIX_3X2_F,
flatteningTolerance: FLOAT,
geometrySink: *mut ID2D1SimplifiedGeometrySink,
) -> HRESULT,
fn GetBounds(
inkStyle: *mut ID2D1InkStyle,
worldTransform: *const D2D1_MATRIX_3X2_F,
bounds: *mut D2D1_RECT_F,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xf292e401, 0 xc050, 0 x4cde, 0 x83, 0 xd7, 0 x04, 0 x96, 0 x2d, 0 x3b, 0 x23, 0 xc2)]
interface ID2D1GradientMesh(ID2D1GradientMeshVtbl): ID2D1Resource(ID2D1ResourceVtbl) {
fn GetPatchCount() -> UINT32,
fn GetPatches(
startIndex: UINT32,
patches: *mut D2D1_GRADIENT_MESH_PATCH,
patchesCount: UINT32,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xc9b664e5, 0 x74a1, 0 x4378, 0 x9a, 0 xc2, 0 xee, 0 xfc, 0 x37, 0 xa3, 0 xf4, 0 xd8)]
interface ID2D1ImageSource(ID2D1ImageSourceVtbl): ID2D1Image(ID2D1ImageVtbl) {
fn OfferResources() -> HRESULT,
fn TryReclaimResources(
resourcesDiscarded: *mut BOOL,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x77395441, 0 x1c8f, 0 x4555, 0 x86, 0 x83, 0 xf5, 0 x0d, 0 xab, 0 x0f, 0 xe7, 0 x92)]
interface ID2D1ImageSourceFromWic(ID2D1ImageSourceFromWicVtbl):
ID2D1ImageSource(ID2D1ImageSourceVtbl) {
fn EnsureCached(
rectangleToFill: *const D2D1_RECT_U,
) -> HRESULT,
fn TrimCache(
rectangleToPreserve: *const D2D1_RECT_U,
) -> HRESULT,
fn GetSource(
wicBitmapSource: *mut *mut IWICBitmapSource,
) -> (),
}}
RIDL!{#[ uuid(0 x7f1f79e5, 0 x2796, 0 x416c, 0 x8f, 0 x55, 0 x70, 0 x0f, 0 x91, 0 x14, 0 x45, 0 xe5)]
interface ID2D1TransformedImageSource(ID2D1TransformedImageSourceVtbl):
ID2D1Image(ID2D1ImageVtbl) {
fn GetSource(
imageSource: *mut *mut ID2D1ImageSource,
) -> (),
fn GetProperties(
properties: *mut D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES,
) -> (),
}}
RIDL!{#[ uuid(0 x53dd9855, 0 xa3b0, 0 x4d5b, 0 x82, 0 xe1, 0 x26, 0 xe2, 0 x5c, 0 x5e, 0 x57, 0 x97)]
interface ID2D1LookupTable3D(ID2D1LookupTable3DVtbl): ID2D1Resource(ID2D1ResourceVtbl) {}}
RIDL!{#[ uuid(0 x394ea6a3, 0 x0c34, 0 x4321, 0 x95, 0 x0b, 0 x6c, 0 xa2, 0 x0f, 0 x0b, 0 xe6, 0 xc7)]
interface ID2D1DeviceContext2(ID2D1DeviceContext2Vtbl):
ID2D1DeviceContext1(ID2D1DeviceContext1Vtbl) {
fn CreateInk(
startPoint: *const D2D1_INK_POINT,
ink: *mut *mut ID2D1Ink,
) -> HRESULT,
fn CreateInkStyle(
inkStyleProperties: *const D2D1_INK_STYLE_PROPERTIES,
inkStyle: *mut *mut ID2D1InkStyle,
) -> HRESULT,
fn CreateGradientMesh(
patches: *const D2D1_GRADIENT_MESH_PATCH,
patchesCount: UINT32,
gradientMesh: *mut *mut ID2D1GradientMesh,
) -> HRESULT,
fn CreateImageSourceFromWic(
wicBitmapSource: *mut IWICBitmapSource,
loadingOptions: D2D1_IMAGE_SOURCE_LOADING_OPTIONS,
alphaMode: D2D1_ALPHA_MODE,
imageSource: *mut *mut ID2D1ImageSourceFromWic,
) -> HRESULT,
fn CreateLookupTable3D(
precision: D2D1_BUFFER_PRECISION,
extents: *const UINT32,
data: *const BYTE,
dataCount: UINT32,
strides: *const UINT32,
lookupTable: *mut *mut ID2D1LookupTable3D,
) -> HRESULT,
fn CreateImageSourceFromDxgi(
surfaces: *const *mut IDXGISurface,
surfaceCount: UINT32,
colorSpace: DXGI_COLOR_SPACE_TYPE,
options: D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS,
imageSource: *mut *mut ID2D1ImageSource,
) -> HRESULT,
fn GetGradientMeshWorldBounds(
gradientMesh: *mut ID2D1GradientMesh,
pBounds: *mut D2D1_RECT_F,
) -> HRESULT,
fn DrawInk(
ink: *mut ID2D1Ink,
brush: *mut ID2D1Brush,
inkStyle: *mut ID2D1InkStyle,
) -> (),
fn DrawGradientMesh(
gradientMesh: *mut ID2D1GradientMesh,
) -> (),
fn DrawGdiMetafile(
gdiMetafile: *mut ID2D1GdiMetafile,
destinationRectangle: *const D2D1_RECT_F,
sourceRectangle: *const D2D1_RECT_F,
) -> (),
fn CreateTransformedImageSource(
imageSource: *mut ID2D1ImageSource,
properties: *const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES,
transformedImageSource: *mut *mut ID2D1TransformedImageSource,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xa44472e1, 0 x8dfb, 0 x4e60, 0 x84, 0 x92, 0 x6e, 0 x28, 0 x61, 0 xc9, 0 xca, 0 x8b)]
interface ID2D1Device2(ID2D1Device2Vtbl): ID2D1Device1(ID2D1Device1Vtbl) {
fn CreateDeviceContext(
options: D2D1_DEVICE_CONTEXT_OPTIONS,
deviceContext2: *mut *mut ID2D1DeviceContext2,
) -> HRESULT,
fn FlushDeviceContexts(
bitmap: *mut ID2D1Bitmap,
) -> (),
fn GetDxgiDevice(
dxgiDevice: *mut *mut IDXGIDevice,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x0869759f, 0 x4f00, 0 x413f, 0 xb0, 0 x3e, 0 x2b, 0 xda, 0 x45, 0 x40, 0 x4d, 0 x0f)]
interface ID2D1Factory3(ID2D1Factory3Vtbl): ID2D1Factory2(ID2D1Factory2Vtbl) {
fn CreateDevice(
dxgiDevice: *mut IDXGIDevice,
d2dDevice2: *mut *mut ID2D1Device2,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x3bab440e, 0 x417e, 0 x47df, 0 xa2, 0 xe2, 0 xbc, 0 x0b, 0 xe6, 0 xa0, 0 x09, 0 x16)]
interface ID2D1CommandSink2(ID2D1CommandSink2Vtbl): ID2D1CommandSink1(ID2D1CommandSink1Vtbl) {
fn DrawInk(
ink: *mut ID2D1Ink,
brush: *mut ID2D1Brush,
inkStyle: *mut ID2D1InkStyle,
) -> (),
fn DrawGradientMesh(
gradientMesh: *mut ID2D1GradientMesh,
) -> (),
fn DrawGdiMetafile(
gdiMetafile: *mut ID2D1GdiMetafile,
destinationRectangle: *const D2D1_RECT_F,
sourceRectangle: *const D2D1_RECT_F,
) -> (),
}}
RIDL!{#[ uuid(0 x2e69f9e8, 0 xdd3f, 0 x4bf9, 0 x95, 0 xba, 0 xc0, 0 x4f, 0 x49, 0 xd7, 0 x88, 0 xdf)]
interface ID2D1GdiMetafile1(ID2D1GdiMetafile1Vtbl): ID2D1GdiMetafile(ID2D1GdiMetafileVtbl) {
fn GetDpi(
dpiX: *mut FLOAT,
dpiY: *mut FLOAT,
) -> HRESULT,
fn GetSourceBounds(
bounds: *mut D2D1_RECT_F,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xfd0ecb6b, 0 x91e6, 0 x411e, 0 x86, 0 x55, 0 x39, 0 x5e, 0 x76, 0 x0f, 0 x91, 0 xb4)]
interface ID2D1GdiMetafileSink1(ID2D1GdiMetafileSink1Vtbl):
ID2D1GdiMetafileSink(ID2D1GdiMetafileSinkVtbl) {
fn ProcessRecord(
recordType: DWORD,
recordData: *const c_void,
recordDataSize: DWORD,
flags: UINT32,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x4dc583bf, 0 x3a10, 0 x438a, 0 x87, 0 x22, 0 xe9, 0 x76, 0 x52, 0 x24, 0 xf1, 0 xf1)]
interface ID2D1SpriteBatch(ID2D1SpriteBatchVtbl): ID2D1Resource(ID2D1ResourceVtbl) {
fn AddSprites(
spriteCount: UINT32,
destinationRectangle: *const D2D1_RECT_F,
sourceRectangles: *const D2D1_RECT_U,
colors: *const D2D1_COLOR_F,
transforms: *const D2D1_MATRIX_3X2_F,
destinationRectanglesStride: UINT32,
sourceRectanglesStride: UINT32,
colorsStride: UINT32,
transformsStride: D2D1_MATRIX_3X2_F,
) -> HRESULT,
fn SetSprites(
startIndex: UINT32,
spriteCount: UINT32,
destinationRectangle: *const D2D1_RECT_F,
sourceRectangles: *const D2D1_RECT_U,
colors: *const D2D1_COLOR_F,
transforms: *const D2D1_MATRIX_3X2_F,
destinationRectanglesStride: UINT32,
sourceRectanglesStride: UINT32,
colorsStride: UINT32,
transformsStride: D2D1_MATRIX_3X2_F,
) -> HRESULT,
fn GetSprites(
startIndex: UINT32,
spriteCount: UINT32,
destinationRectangle: *mut D2D1_RECT_F,
sourceRectangles: *mut D2D1_RECT_U,
colors: *mut D2D1_COLOR_F,
transforms: *mut D2D1_MATRIX_3X2_F,
) -> HRESULT,
fn GetSpriteCount() -> UINT32,
fn Clear() -> (),
}}
RIDL!{#[ uuid(0 x235a7496, 0 x8351, 0 x414c, 0 xbc, 0 xd4, 0 x66, 0 x72, 0 xab, 0 x2d, 0 x8e, 0 x00)]
interface ID2D1DeviceContext3(ID2D1DeviceContext3Vtbl):
ID2D1DeviceContext2(ID2D1DeviceContext2Vtbl) {
fn CreateSpriteBatch(
spriteBatch: *mut *mut ID2D1SpriteBatch,
) -> HRESULT,
fn DrawSpriteBatch(
spriteBatch: *mut ID2D1SpriteBatch,
startIndex: UINT32,
spriteCount: UINT32,
bitmap: *mut ID2D1Bitmap,
interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE,
spriteOptions: D2D1_SPRITE_OPTIONS,
) -> (),
}}
RIDL!{#[ uuid(0 x852f2087, 0 x802c, 0 x4037, 0 xab, 0 x60, 0 xff, 0 x2e, 0 x7e, 0 xe6, 0 xfc, 0 x01)]
interface ID2D1Device3(ID2D1Device3Vtbl): ID2D1Device2(ID2D1Device2Vtbl) {
fn CreateDeviceContext(
options: D2D1_DEVICE_CONTEXT_OPTIONS,
deviceContext3: *mut *mut ID2D1DeviceContext3,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xbd4ec2d2, 0 x0662, 0 x4bee, 0 xba, 0 x8e, 0 x6f, 0 x29, 0 xf0, 0 x32, 0 xe0, 0 x96)]
interface ID2D1Factory4(ID2D1Factory4Vtbl): ID2D1Factory3(ID2D1Factory3Vtbl) {
fn CreateDevice(
dxgiDevice: *mut IDXGIDevice,
d2dDevice3: *mut *mut ID2D1Device3,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x18079135, 0 x4cf3, 0 x4868, 0 xbc, 0 x8e, 0 x06, 0 x06, 0 x7e, 0 x6d, 0 x24, 0 x2d)]
interface ID2D1CommandSink3(ID2D1CommandSink3Vtbl): ID2D1CommandSink2(ID2D1CommandSink2Vtbl) {
fn DrawSpriteBatch(
spriteBatch: *mut ID2D1SpriteBatch,
startIndex: UINT32,
spriteCount: UINT32,
bitmap: *mut ID2D1Bitmap,
interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE,
spriteOptions: D2D1_SPRITE_OPTIONS,
) -> (),
}}
RIDL!{#[ uuid(0 xaf671749, 0 xd241, 0 x4db8, 0 x8e, 0 x41, 0 xdc, 0 xc2, 0 xe5, 0 xc1, 0 xa4, 0 x38)]
interface ID2D1SvgGlyphStyle(ID2D1SvgGlyphStyleVtbl): ID2D1Resource(ID2D1ResourceVtbl) {
fn SetFill(
brush: *mut ID2D1Brush,
) -> HRESULT,
fn GetFill(
brush: *mut *mut ID2D1Brush,
) -> (),
fn SetStroke(
brush: *mut ID2D1Brush,
strokeWidth: FLOAT,
dashes: *const FLOAT,
dashesCount: UINT32,
dashOffset: FLOAT,
) -> HRESULT,
fn GetStrokeDashesCount() -> UINT32,
fn GetStroke(
brush: *mut *mut ID2D1Brush,
strokeWidth: *mut FLOAT,
dashes: *mut FLOAT,
dashesCount: UINT32,
dashOffset: *mut FLOAT,
) -> (),
}}
RIDL!{#[ uuid(0 x8c427831, 0 x3d90, 0 x4476, 0 xb6, 0 x47, 0 xc4, 0 xfa, 0 xe3, 0 x49, 0 xe4, 0 xdb)]
interface ID2D1DeviceContext4(ID2D1DeviceContext4Vtbl):
ID2D1DeviceContext3(ID2D1DeviceContext3Vtbl) {
fn CreateSvgGlyphStyle(
svgGlyphStyle: *mut *mut ID2D1SvgGlyphStyle,
) -> HRESULT,
fn DrawText(
string: *const WCHAR,
stringLength: UINT32,
textFormat: *mut IDWriteTextFormat,
layoutRect: *const D2D1_RECT_F,
defaultFillBrush: *mut ID2D1Brush,
svgGlyphStyle: *mut ID2D1SvgGlyphStyle,
colorPaletteIndex: UINT32,
options: D2D1_DRAW_TEXT_OPTIONS,
measuringMode: DWRITE_MEASURING_MODE,
) -> (),
fn DrawTextLayout(
origin: D2D1_POINT_2F,
textLayout: *mut IDWriteTextLayout,
defaultFillBrush: *mut ID2D1Brush,
svgGlyphStyle: *mut ID2D1SvgGlyphStyle,
colorPaletteIndex: UINT32,
options: D2D1_DRAW_TEXT_OPTIONS,
) -> (),
fn DrawColorBitmapGlyphRun(
glyphImageFormat: DWRITE_GLYPH_IMAGE_FORMATS,
baselineOrigin: D2D1_POINT_2F,
glyphRun: *const DWRITE_GLYPH_RUN,
measuringMode: DWRITE_MEASURING_MODE,
bitmapSnapOption: D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION,
) -> (),
fn DrawSvgGlyphRun(
baselineOrigin: D2D1_POINT_2F,
glyphRun: *const DWRITE_GLYPH_RUN,
defaultFillBrush: *mut ID2D1Brush,
svgGlyphStyle: *mut ID2D1SvgGlyphStyle,
colorPaletteIndex: UINT32,
measuringMode: DWRITE_MEASURING_MODE,
) -> (),
fn GetColorBitmapGlyphImage(
glyphImageFormat: DWRITE_GLYPH_IMAGE_FORMATS,
glyphOrigin: D2D1_POINT_2F,
fontFace: *mut IDWriteFontFace,
fontEmSize: FLOAT,
glyphIndex: UINT16,
isSideways: BOOL,
worldTransform: *const D2D1_MATRIX_3X2_F,
dpiX: FLOAT,
dpiY: FLOAT,
glyphTransform: *mut D2D1_MATRIX_3X2_F,
glyphImage: *mut *mut ID2D1Image,
) -> HRESULT,
fn GetSvgGlyphImage(
glyphImageFormat: DWRITE_GLYPH_IMAGE_FORMATS,
glyphOrigin: D2D1_POINT_2F,
fontFace: *mut IDWriteFontFace,
fontEmSize: FLOAT,
glyphIndex: UINT16,
isSideways: BOOL,
worldTransform: *const D2D1_MATRIX_3X2_F,
defaultFillBrush: *mut ID2D1Brush,
svgGlyphStyle: *mut ID2D1SvgGlyphStyle,
colorPaletteIndex: UINT32,
glyphTransform: *mut D2D1_MATRIX_3X2_F,
glyphImage: *mut *mut ID2D1CommandList,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xd7bdb159, 0 x5683, 0 x4a46, 0 xbc, 0 x9c, 0 x72, 0 xdc, 0 x72, 0 x0b, 0 x85, 0 x8b)]
interface ID2D1Device4(ID2D1Device4Vtbl): ID2D1Device3(ID2D1Device3Vtbl) {
fn CreateDeviceContext(
options: D2D1_DEVICE_CONTEXT_OPTIONS,
deviceContext4: *mut *mut ID2D1DeviceContext4,
) -> HRESULT,
fn SetMaximumColorGlyphCacheMemory(
maximumInBytes: UINT64,
) -> (),
fn GetMaximumColorGlyphCacheMemory() -> UINT64,
}}
RIDL!{#[ uuid(0 xc4349994, 0 x838e, 0 x4b0f, 0 x8c, 0 xab, 0 x44, 0 x99, 0 x7d, 0 x9e, 0 xea, 0 xcc)]
interface ID2D1Factory5(ID2D1Factory5Vtbl): ID2D1Factory4(ID2D1Factory4Vtbl) {
fn CreateDevice(
dxgiDevice: *mut IDXGIDevice,
d2dDevice4: *mut *mut ID2D1Device4,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xc78a6519, 0 x40d6, 0 x4218, 0 xb2, 0 xde, 0 xbe, 0 xee, 0 xb7, 0 x44, 0 xbb, 0 x3e)]
interface ID2D1CommandSink4(ID2D1CommandSink4Vtbl): ID2D1CommandSink3(ID2D1CommandSink3Vtbl) {
fn SetPrimitiveBlend2(
primitiveBlend: D2D1_PRIMITIVE_BLEND,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x1ab42875, 0 xc57f, 0 x4be9, 0 xbd, 0 x85, 0 x9c, 0 xd7, 0 x8d, 0 x6f, 0 x55, 0 xee)]
interface ID2D1ColorContext1(ID2D1ColorContext1Vtbl): ID2D1ColorContext(ID2D1ColorContextVtbl) {
fn GetColorContextType() -> D2D1_COLOR_CONTEXT_TYPE,
fn GetDXGIColorSpace() -> DXGI_COLOR_SPACE_TYPE,
fn GetSimpleColorProfile(
simpleProfile: *mut D2D1_SIMPLE_COLOR_PROFILE,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x7836d248, 0 x68cc, 0 x4df6, 0 xb9, 0 xe8, 0 xde, 0 x99, 0 x1b, 0 xf6, 0 x2e, 0 xb7)]
interface ID2D1DeviceContext5(ID2D1DeviceContext5Vtbl):
ID2D1DeviceContext4(ID2D1DeviceContext4Vtbl) {
fn CreateSvgDocument(
inputXmlStream: *mut IStream,
viewportSize: D2D1_SIZE_F,
svgDocument: *mut *mut ID2D1SvgDocument,
) -> HRESULT,
fn DrawSvgDocument(
svgDocument: *mut ID2D1SvgDocument,
) -> (),
fn CreateColorContextFromDxgiColorSpace(
colorSpace: DXGI_COLOR_SPACE_TYPE,
colorContext: *mut *mut ID2D1ColorContext1,
) -> HRESULT,
fn CreateColorContextFromSimpleColorProfile(
simpleProfile: *const D2D1_SIMPLE_COLOR_PROFILE,
colorContext: *mut *mut ID2D1ColorContext1,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xd55ba0a4, 0 x6405, 0 x4694, 0 xae, 0 xf5, 0 x08, 0 xee, 0 x1a, 0 x43, 0 x58, 0 xb4)]
interface ID2D1Device5(ID2D1Device5Vtbl): ID2D1Device4(ID2D1Device4Vtbl) {
fn CreateDeviceContext(
options: D2D1_DEVICE_CONTEXT_OPTIONS,
deviceContext5: *mut *mut ID2D1DeviceContext5,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xf9976f46, 0 xf642, 0 x44c1, 0 x97, 0 xca, 0 xda, 0 x32, 0 xea, 0 x2a, 0 x26, 0 x35)]
interface ID2D1Factory6(ID2D1Factory6Vtbl): ID2D1Factory5(ID2D1Factory5Vtbl) {
fn CreateDevice(
dxgiDevice: *mut IDXGIDevice,
d2dDevice5: *mut *mut ID2D1Device5,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x7047dd26, 0 xb1e7, 0 x44a7, 0 x95, 0 x9a, 0 x83, 0 x49, 0 xe2, 0 x14, 0 x4f, 0 xa8)]
interface ID2D1CommandSink5(ID2D1CommandSink5Vtbl): ID2D1CommandSink4(ID2D1CommandSink4Vtbl) {
fn BlendImage(
image: *mut ID2D1Image,
blendMode: D2D1_BLEND_MODE,
targetOffset: *const D2D1_POINT_2F,
imageRectangle: *const D2D1_RECT_F,
interpolationMode: D2D1_INTERPOLATION_MODE,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x985f7e37, 0 x4ed0, 0 x4a19, 0 x98, 0 xa3, 0 x15, 0 xb0, 0 xed, 0 xfd, 0 xe3, 0 x06)]
interface ID2D1DeviceContext6(ID2D1DeviceContext6Vtbl):
ID2D1DeviceContext5(ID2D1DeviceContext5Vtbl) {
fn BlendImage(
image: *mut ID2D1Image,
blendMode: D2D1_BLEND_MODE,
targetOffset: *const D2D1_POINT_2F,
imageRectangle: *const D2D1_RECT_F,
interpolationMode: D2D1_INTERPOLATION_MODE,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x7bfef914, 0 x2d75, 0 x4bad, 0 xbe, 0 x87, 0 xe1, 0 x8d, 0 xdb, 0 x07, 0 x7b, 0 x6d)]
interface ID2D1Device6(ID2D1Device6Vtbl): ID2D1Device5(ID2D1Device5Vtbl) {
fn CreateDeviceContext(
options: D2D1_DEVICE_CONTEXT_OPTIONS,
deviceContext6: *mut *mut ID2D1DeviceContext6,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 xbdc2bdd3, 0 xb96c, 0 x4de6, 0 xbd, 0 xf7, 0 x99, 0 xd4, 0 x74, 0 x54, 0 x54, 0 xde)]
interface ID2D1Factory7(ID2D1Factory7Vtbl): ID2D1Factory6(ID2D1Factory6Vtbl) {
fn CreateDevice(
dxgiDevice: *mut IDXGIDevice,
d2dDevice6: *mut *mut ID2D1Device6,
) -> HRESULT,
}}
extern "system" {
pub fn D2D1GetGradientMeshInteriorPointsFromCoonsPatch(
pPoint0: *const D2D1_POINT_2F,
pPoint1: *const D2D1_POINT_2F,
pPoint2: *const D2D1_POINT_2F,
pPoint3: *const D2D1_POINT_2F,
pPoint4: *const D2D1_POINT_2F,
pPoint5: *const D2D1_POINT_2F,
pPoint6: *const D2D1_POINT_2F,
pPoint7: *const D2D1_POINT_2F,
pPoint8: *const D2D1_POINT_2F,
pPoint9: *const D2D1_POINT_2F,
pPoint10: *const D2D1_POINT_2F,
pPoint11: *const D2D1_POINT_2F,
pTensorPoint11: *mut D2D1_POINT_2F,
pTensorPoint12: *mut D2D1_POINT_2F,
pTensorPoint21: *mut D2D1_POINT_2F,
pTensorPoint22: *mut D2D1_POINT_2F,
);
}
Messung V0.5 in Prozent C=100 H=100 G=100
¤ Dauer der Verarbeitung: 0.3 Sekunden
(vorverarbeitet am 2026-06-26)
¤
*© Formatika GbR, Deutschland