//--------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // // This file is automatically generated. Please do not edit it directly. // // File name: D2D1Svg.h //--------------------------------------------------------------------------- #ifdef _MSC_VER #pragma once #endif // #ifdef _MSC_VER #ifndef _D2D1_SVG_ #define _D2D1_SVG_ #ifndef _D2D1_2_H_ #include #endif // #ifndef _D2D1_2_H_ /*#include */ /*#pragma region Application Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ typedef interface ID2D1SvgDocument ID2D1SvgDocument; typedef interface ID2D1SvgElement ID2D1SvgElement; /// /// Specifies the paint type for an SVG fill or stroke. /// typedef enum D2D1_SVG_PAINT_TYPE { /// /// The fill or stroke is not rendered. /// D2D1_SVG_PAINT_TYPE_NONE = 0, /// /// A solid color is rendered. /// D2D1_SVG_PAINT_TYPE_COLOR = 1, /// /// The current color is rendered. /// D2D1_SVG_PAINT_TYPE_CURRENT_COLOR = 2, /// /// A paint server, defined by another element in the SVG document, is used. /// D2D1_SVG_PAINT_TYPE_URI = 3, /// /// A paint server, defined by another element in the SVG document, is used. If the /// paint server reference is invalid, fall back to D2D1_SVG_PAINT_TYPE_NONE. /// D2D1_SVG_PAINT_TYPE_URI_NONE = 4, /// /// A paint server, defined by another element in the SVG document, is used. If the /// paint server reference is invalid, fall back to D2D1_SVG_PAINT_TYPE_COLOR. /// D2D1_SVG_PAINT_TYPE_URI_COLOR = 5, /// /// A paint server, defined by another element in the SVG document, is used. If the /// paint server reference is invalid, fall back to /// D2D1_SVG_PAINT_TYPE_CURRENT_COLOR. /// D2D1_SVG_PAINT_TYPE_URI_CURRENT_COLOR = 6, D2D1_SVG_PAINT_TYPE_FORCE_DWORD = 0xffffffff } D2D1_SVG_PAINT_TYPE; /// /// Specifies the units for an SVG length. /// typedef enum D2D1_SVG_LENGTH_UNITS { /// /// The length is unitless. /// D2D1_SVG_LENGTH_UNITS_NUMBER = 0, /// /// The length is a percentage value. /// D2D1_SVG_LENGTH_UNITS_PERCENTAGE = 1, D2D1_SVG_LENGTH_UNITS_FORCE_DWORD = 0xffffffff } D2D1_SVG_LENGTH_UNITS; /// /// Specifies a value for the SVG display property. /// typedef enum D2D1_SVG_DISPLAY { /// /// The element uses the default display behavior. /// D2D1_SVG_DISPLAY_INLINE = 0, /// /// The element and all children are not rendered directly. /// D2D1_SVG_DISPLAY_NONE = 1, D2D1_SVG_DISPLAY_FORCE_DWORD = 0xffffffff } D2D1_SVG_DISPLAY; /// /// Specifies a value for the SVG visibility property. /// typedef enum D2D1_SVG_VISIBILITY { /// /// The element is visible. /// D2D1_SVG_VISIBILITY_VISIBLE = 0, /// /// The element is invisible. /// D2D1_SVG_VISIBILITY_HIDDEN = 1, D2D1_SVG_VISIBILITY_FORCE_DWORD = 0xffffffff } D2D1_SVG_VISIBILITY; /// /// Specifies a value for the SVG overflow property. /// typedef enum D2D1_SVG_OVERFLOW { /// /// The element is not clipped to its viewport. /// D2D1_SVG_OVERFLOW_VISIBLE = 0, /// /// The element is clipped to its viewport. /// D2D1_SVG_OVERFLOW_HIDDEN = 1, D2D1_SVG_OVERFLOW_FORCE_DWORD = 0xffffffff } D2D1_SVG_OVERFLOW; /// /// Specifies a value for the SVG stroke-linecap property. /// typedef enum D2D1_SVG_LINE_CAP { /// /// The property is set to SVG's 'butt' value. /// D2D1_SVG_LINE_CAP_BUTT = D2D1_CAP_STYLE_FLAT, /// /// The property is set to SVG's 'square' value. /// D2D1_SVG_LINE_CAP_SQUARE = D2D1_CAP_STYLE_SQUARE, /// /// The property is set to SVG's 'round' value. /// D2D1_SVG_LINE_CAP_ROUND = D2D1_CAP_STYLE_ROUND, D2D1_SVG_LINE_CAP_FORCE_DWORD = 0xffffffff } D2D1_SVG_LINE_CAP; /// /// Specifies a value for the SVG stroke-linejoin property. /// typedef enum D2D1_SVG_LINE_JOIN { /// /// The property is set to SVG's 'bevel' value. /// D2D1_SVG_LINE_JOIN_BEVEL = D2D1_LINE_JOIN_BEVEL, /// /// The property is set to SVG's 'miter' value. Note that this is equivalent to /// D2D1_LINE_JOIN_MITER_OR_BEVEL, not D2D1_LINE_JOIN_MITER. /// D2D1_SVG_LINE_JOIN_MITER = D2D1_LINE_JOIN_MITER_OR_BEVEL, /// /// \ The property is set to SVG's 'round' value. /// D2D1_SVG_LINE_JOIN_ROUND = D2D1_LINE_JOIN_ROUND, D2D1_SVG_LINE_JOIN_FORCE_DWORD = 0xffffffff } D2D1_SVG_LINE_JOIN; /// /// The alignment portion of the SVG preserveAspectRatio attribute. /// typedef enum D2D1_SVG_ASPECT_ALIGN { /// /// The alignment is set to SVG's 'none' value. /// D2D1_SVG_ASPECT_ALIGN_NONE = 0, /// /// The alignment is set to SVG's 'xMinYMin' value. /// D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MIN = 1, /// /// The alignment is set to SVG's 'xMidYMin' value. /// D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MIN = 2, /// /// The alignment is set to SVG's 'xMaxYMin' value. /// D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MIN = 3, /// /// The alignment is set to SVG's 'xMinYMid' value. /// D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MID = 4, /// /// The alignment is set to SVG's 'xMidYMid' value. /// D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MID = 5, /// /// The alignment is set to SVG's 'xMaxYMid' value. /// D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MID = 6, /// /// The alignment is set to SVG's 'xMinYMax' value. /// D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MAX = 7, /// /// The alignment is set to SVG's 'xMidYMax' value. /// D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MAX = 8, /// /// The alignment is set to SVG's 'xMaxYMax' value. /// D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MAX = 9, D2D1_SVG_ASPECT_ALIGN_FORCE_DWORD = 0xffffffff } D2D1_SVG_ASPECT_ALIGN; /// /// The meetOrSlice portion of the SVG preserveAspectRatio attribute. /// typedef enum D2D1_SVG_ASPECT_SCALING { /// /// Scale the viewBox up as much as possible such that the entire viewBox is visible /// within the viewport. /// D2D1_SVG_ASPECT_SCALING_MEET = 0, /// /// Scale the viewBox down as much as possible such that the entire viewport is /// covered by the viewBox. /// D2D1_SVG_ASPECT_SCALING_SLICE = 1, D2D1_SVG_ASPECT_SCALING_FORCE_DWORD = 0xffffffff } D2D1_SVG_ASPECT_SCALING; /// /// Represents a path commmand. Each command may reference floats from the segment /// data. Commands ending in _ABSOLUTE interpret data as absolute coordinate. /// Commands ending in _RELATIVE interpret data as being relative to the previous /// point. /// typedef enum D2D1_SVG_PATH_COMMAND { /// /// Closes the current subpath. Uses no segment data. /// D2D1_SVG_PATH_COMMAND_CLOSE_PATH = 0, /// /// Starts a new subpath at the coordinate (x y). Uses 2 floats of segment data. /// D2D1_SVG_PATH_COMMAND_MOVE_ABSOLUTE = 1, /// /// Starts a new subpath at the coordinate (x y). Uses 2 floats of segment data. /// D2D1_SVG_PATH_COMMAND_MOVE_RELATIVE = 2, /// /// Draws a line to the coordinate (x y). Uses 2 floats of segment data. /// D2D1_SVG_PATH_COMMAND_LINE_ABSOLUTE = 3, /// /// Draws a line to the coordinate (x y). Uses 2 floats of segment data. /// D2D1_SVG_PATH_COMMAND_LINE_RELATIVE = 4, /// /// Draws a cubic Bezier curve (x1 y1 x2 y2 x y). The curve ends at (x, y) and is /// defined by the two control points (x1, y1) and (x2, y2). Uses 6 floats of /// segment data. /// D2D1_SVG_PATH_COMMAND_CUBIC_ABSOLUTE = 5, /// /// Draws a cubic Bezier curve (x1 y1 x2 y2 x y). The curve ends at (x, y) and is /// defined by the two control points (x1, y1) and (x2, y2). Uses 6 floats of /// segment data. /// D2D1_SVG_PATH_COMMAND_CUBIC_RELATIVE = 6, /// /// Draws a quadratic Bezier curve (x1 y1 x y). The curve ends at (x, y) and is /// defined by the control point (x1 y1). Uses 4 floats of segment data. /// D2D1_SVG_PATH_COMMAND_QUADRADIC_ABSOLUTE = 7, /// /// Draws a quadratic Bezier curve (x1 y1 x y). The curve ends at (x, y) and is /// defined by the control point (x1 y1). Uses 4 floats of segment data. /// D2D1_SVG_PATH_COMMAND_QUADRADIC_RELATIVE = 8, /// /// Draws an elliptical arc (rx ry x-axis-rotation large-arc-flag sweep-flag x y). /// The curve ends at (x, y) and is defined by the arc parameters. The two flags are /// considered set if their values are non-zero. Uses 7 floats of segment data. /// D2D1_SVG_PATH_COMMAND_ARC_ABSOLUTE = 9, /// /// Draws an elliptical arc (rx ry x-axis-rotation large-arc-flag sweep-flag x y). /// The curve ends at (x, y) and is defined by the arc parameters. The two flags are /// considered set if their values are non-zero. Uses 7 floats of segment data. /// D2D1_SVG_PATH_COMMAND_ARC_RELATIVE = 10, /// /// Draws a horizontal line to the coordinate (x). Uses 1 float of segment data. /// D2D1_SVG_PATH_COMMAND_HORIZONTAL_ABSOLUTE = 11, /// /// Draws a horizontal line to the coordinate (x). Uses 1 float of segment data. /// D2D1_SVG_PATH_COMMAND_HORIZONTAL_RELATIVE = 12, /// /// Draws a vertical line to the coordinate (y). Uses 1 float of segment data. /// D2D1_SVG_PATH_COMMAND_VERTICAL_ABSOLUTE = 13, /// /// Draws a vertical line to the coordinate (y). Uses 1 float of segment data. /// D2D1_SVG_PATH_COMMAND_VERTICAL_RELATIVE = 14, /// /// Draws a smooth cubic Bezier curve (x2 y2 x y). The curve ends at (x, y) and is /// defined by the control point (x2, y2). Uses 4 floats of segment data. /// D2D1_SVG_PATH_COMMAND_CUBIC_SMOOTH_ABSOLUTE = 15, /// /// Draws a smooth cubic Bezier curve (x2 y2 x y). The curve ends at (x, y) and is /// defined by the control point (x2, y2). Uses 4 floats of segment data. /// D2D1_SVG_PATH_COMMAND_CUBIC_SMOOTH_RELATIVE = 16, /// /// Draws a smooth quadratic Bezier curve ending at (x, y). Uses 2 floats of segment /// data. /// D2D1_SVG_PATH_COMMAND_QUADRADIC_SMOOTH_ABSOLUTE = 17, /// /// Draws a smooth quadratic Bezier curve ending at (x, y). Uses 2 floats of segment /// data. /// D2D1_SVG_PATH_COMMAND_QUADRADIC_SMOOTH_RELATIVE = 18, D2D1_SVG_PATH_COMMAND_FORCE_DWORD = 0xffffffff } D2D1_SVG_PATH_COMMAND; /// /// Defines the coordinate system used for SVG gradient or clipPath elements. /// typedef enum D2D1_SVG_UNIT_TYPE { /// /// The property is set to SVG's 'userSpaceOnUse' value. /// D2D1_SVG_UNIT_TYPE_USER_SPACE_ON_USE = 0, /// /// The property is set to SVG's 'objectBoundingBox' value. /// D2D1_SVG_UNIT_TYPE_OBJECT_BOUNDING_BOX = 1, D2D1_SVG_UNIT_TYPE_FORCE_DWORD = 0xffffffff } D2D1_SVG_UNIT_TYPE; /// /// Defines the type of SVG string attribute to set or get. /// typedef enum D2D1_SVG_ATTRIBUTE_STRING_TYPE { /// /// The attribute is a string in the same form as it would appear in the SVG XML. /// /// Note that when getting values of this type, the value returned may not exactly /// match the value that was set. Instead, the output value is a normalized version /// of the value. For example, an input color of 'red' may be output as '#FF0000'. /// D2D1_SVG_ATTRIBUTE_STRING_TYPE_SVG = 0, /// /// The attribute is an element ID. /// D2D1_SVG_ATTRIBUTE_STRING_TYPE_ID = 1, D2D1_SVG_ATTRIBUTE_STRING_TYPE_FORCE_DWORD = 0xffffffff } D2D1_SVG_ATTRIBUTE_STRING_TYPE; /// /// Defines the type of SVG POD attribute to set or get. /// typedef enum D2D1_SVG_ATTRIBUTE_POD_TYPE { /// /// The attribute is a FLOAT. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT = 0, /// /// The attribute is a D2D1_COLOR_F. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR = 1, /// /// The attribute is a D2D1_FILL_MODE. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE = 2, /// /// The attribute is a D2D1_SVG_DISPLAY. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY = 3, /// /// The attribute is a D2D1_SVG_OVERFLOW. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW = 4, /// /// The attribute is a D2D1_SVG_LINE_CAP. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP = 5, /// /// The attribute is a D2D1_SVG_LINE_JOIN. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN = 6, /// /// The attribute is a D2D1_SVG_VISIBILITY. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY = 7, /// /// The attribute is a D2D1_MATRIX_3X2_F. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX = 8, /// /// The attribute is a D2D1_SVG_UNIT_TYPE. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE = 9, /// /// The attribute is a D2D1_EXTEND_MODE. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE = 10, /// /// The attribute is a D2D1_SVG_PRESERVE_ASPECT_RATIO. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO = 11, /// /// The attribute is a D2D1_SVG_VIEWBOX. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_VIEWBOX = 12, /// /// The attribute is a D2D1_SVG_LENGTH. /// D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH = 13, D2D1_SVG_ATTRIBUTE_POD_TYPE_FORCE_DWORD = 0xffffffff } D2D1_SVG_ATTRIBUTE_POD_TYPE; /// /// Represents an SVG length. /// typedef struct D2D1_SVG_LENGTH { FLOAT value; D2D1_SVG_LENGTH_UNITS units; } D2D1_SVG_LENGTH; /// /// Represents all SVG preserveAspectRatio settings. /// typedef struct D2D1_SVG_PRESERVE_ASPECT_RATIO { /// /// Sets the 'defer' portion of the preserveAspectRatio settings. This field only /// has an effect on an 'image' element that references another SVG document. As /// this is not currently supported, the field has no impact on rendering. /// BOOL defer; /// /// Sets the align portion of the preserveAspectRatio settings. /// D2D1_SVG_ASPECT_ALIGN align; /// /// Sets the meetOrSlice portion of the preserveAspectRatio settings. /// D2D1_SVG_ASPECT_SCALING meetOrSlice; } D2D1_SVG_PRESERVE_ASPECT_RATIO; /// /// Represents an SVG viewBox. /// typedef struct D2D1_SVG_VIEWBOX { FLOAT x; FLOAT y; FLOAT width; FLOAT height; } D2D1_SVG_VIEWBOX; EXTERN_C CONST IID IID_ID2D1SvgAttribute; EXTERN_C CONST IID IID_ID2D1SvgPaint; EXTERN_C CONST IID IID_ID2D1SvgStrokeDashArray; EXTERN_C CONST IID IID_ID2D1SvgPointCollection; EXTERN_C CONST IID IID_ID2D1SvgPathData; EXTERN_C CONST IID IID_ID2D1SvgElement; EXTERN_C CONST IID IID_ID2D1SvgDocument; #ifndef D2D_USE_C_DEFINITIONS #if NTDDI_VERSION >= NTDDI_WIN10_RS2 /// /// Interface describing an SVG attribute. /// interface DX_DECLARE_INTERFACE("c9cdb0dd-f8c9-4e70-b7c2-301c80292c5e") ID2D1SvgAttribute : public ID2D1Resource { /// /// Returns the element on which this attribute is set. Returns null if the /// attribute is not set on any element. /// STDMETHOD_(void, GetElement)( _Outptr_result_maybenull_ ID2D1SvgElement **element ) PURE; /// /// Creates a clone of this attribute value. On creation, the cloned attribute is /// not set on any element. /// STDMETHOD(Clone)( _COM_Outptr_ ID2D1SvgAttribute **attribute ) PURE; }; // interface ID2D1SvgAttribute /// /// Interface describing an SVG 'fill' or 'stroke' value. /// interface DX_DECLARE_INTERFACE("d59bab0a-68a2-455b-a5dc-9eb2854e2490") ID2D1SvgPaint : public ID2D1SvgAttribute { /// /// Sets the paint type. /// STDMETHOD(SetPaintType)( D2D1_SVG_PAINT_TYPE paintType ) PURE; /// /// Gets the paint type. /// STDMETHOD_(D2D1_SVG_PAINT_TYPE, GetPaintType)( ) PURE; /// /// Sets the paint color that is used if the paint type is /// D2D1_SVG_PAINT_TYPE_COLOR. /// STDMETHOD(SetColor)( _In_ CONST D2D1_COLOR_F *color ) PURE; /// /// Gets the paint color that is used if the paint type is /// D2D1_SVG_PAINT_TYPE_COLOR. /// STDMETHOD_(void, GetColor)( _Out_ D2D1_COLOR_F *color ) PURE; /// /// Sets the element id which acts as the paint server. This id is used if the paint /// type is D2D1_SVG_PAINT_TYPE_URI. /// STDMETHOD(SetId)( _In_ PCWSTR id ) PURE; /// /// Gets the element id which acts as the paint server. This id is used if the paint /// type is D2D1_SVG_PAINT_TYPE_URI. /// STDMETHOD(GetId)( _Out_writes_(idCount) PWSTR id, UINT32 idCount ) PURE; /// /// Gets the string length of the element id which acts as the paint server. This id /// is used if the paint type is D2D1_SVG_PAINT_TYPE_URI. The returned string length /// does not include room for the null terminator. /// STDMETHOD_(UINT32, GetIdLength)( ) PURE; /// /// Sets the paint color that is used if the paint type is /// D2D1_SVG_PAINT_TYPE_COLOR. /// COM_DECLSPEC_NOTHROW HRESULT SetColor( CONST D2D1_COLOR_F &color ) { return SetColor(&color); } }; // interface ID2D1SvgPaint /// /// Interface describing an SVG 'stroke-dasharray' value. /// interface DX_DECLARE_INTERFACE("f1c0ca52-92a3-4f00-b4ce-f35691efd9d9") ID2D1SvgStrokeDashArray : public ID2D1SvgAttribute { /// /// Removes dashes from the end of the array. /// /// Specifies how many dashes to remove. STDMETHOD(RemoveDashesAtEnd)( UINT32 dashesCount ) PURE; /// /// Updates the array. Existing dashes not updated by this method are preserved. The /// array is resized larger if necessary to accomodate the new dashes. /// /// The dashes array. /// The number of dashes to update. /// The index at which to begin updating dashes. Must be /// less than or equal to the size of the array. STDMETHOD(UpdateDashes)( _In_reads_(dashesCount) CONST FLOAT *dashes, UINT32 dashesCount, UINT32 startIndex = 0 ) PURE; /// /// Updates the array. Existing dashes not updated by this method are preserved. The /// array is resized larger if necessary to accomodate the new dashes. /// /// The dashes array. /// The number of dashes to update. /// The index at which to begin updating dashes. Must be /// less than or equal to the size of the array. STDMETHOD(UpdateDashes)( _In_reads_(dashesCount) CONST D2D1_SVG_LENGTH *dashes, UINT32 dashesCount, UINT32 startIndex = 0 ) PURE; /// /// Gets dashes from the array. /// /// Buffer to contain the dashes. /// The element count of buffer. /// The index of the first dash to retrieve. STDMETHOD(GetDashes)( _Out_writes_(dashesCount) FLOAT *dashes, UINT32 dashesCount, UINT32 startIndex = 0 ) PURE; /// /// Gets dashes from the array. /// /// Buffer to contain the dashes. /// The element count of buffer. /// The index of the first dash to retrieve. STDMETHOD(GetDashes)( _Out_writes_(dashesCount) D2D1_SVG_LENGTH *dashes, UINT32 dashesCount, UINT32 startIndex = 0 ) PURE; /// /// Gets the number of the dashes in the array. /// STDMETHOD_(UINT32, GetDashesCount)( ) PURE; }; // interface ID2D1SvgStrokeDashArray /// /// Interface describing an SVG 'points' value in a 'polyline' or 'polygon' element. /// interface DX_DECLARE_INTERFACE("9dbe4c0d-3572-4dd9-9825-5530813bb712") ID2D1SvgPointCollection : public ID2D1SvgAttribute { /// /// Removes points from the end of the array. /// /// Specifies how many points to remove. STDMETHOD(RemovePointsAtEnd)( UINT32 pointsCount ) PURE; /// /// Updates the points array. Existing points not updated by this method are /// preserved. The array is resized larger if necessary to accomodate the new /// points. /// /// The points array. /// The number of points to update. /// The index at which to begin updating points. Must be /// less than or equal to the size of the array. STDMETHOD(UpdatePoints)( _In_reads_(pointsCount) CONST D2D1_POINT_2F *points, UINT32 pointsCount, UINT32 startIndex = 0 ) PURE; /// /// Gets points from the points array. /// /// Buffer to contain the points. /// The element count of the buffer. /// The index of the first point to retrieve. STDMETHOD(GetPoints)( _Out_writes_(pointsCount) D2D1_POINT_2F *points, UINT32 pointsCount, UINT32 startIndex = 0 ) PURE; /// /// Gets the number of points in the array. /// STDMETHOD_(UINT32, GetPointsCount)( ) PURE; }; // interface ID2D1SvgPointCollection /// /// Interface describing SVG path data. Path data can be set as the 'd' attribute on /// a 'path' element. /// /// The path data set is factored into two arrays. The segment data array stores all /// numbers and the commands array stores the set of commands. Unlike the string /// data set in the d attribute, each command in this representation uses a fixed /// number of elements in the segment data array. Therefore, the path 'M 0,0 100,0 /// 0,100 Z' is represented as: 'M0,0 L100,0 L0,100 Z'. This is split into two /// arrays, with the segment data containing '0,0 100,0 0,100', and the commands /// containing 'M L L Z'. /// interface DX_DECLARE_INTERFACE("c095e4f4-bb98-43d6-9745-4d1b84ec9888") ID2D1SvgPathData : public ID2D1SvgAttribute { /// /// Removes data from the end of the segment data array. /// /// Specifies how much data to remove. STDMETHOD(RemoveSegmentDataAtEnd)( UINT32 dataCount ) PURE; /// /// Updates the segment data array. Existing segment data not updated by this method /// are preserved. The array is resized larger if necessary to accomodate the new /// segment data. /// /// The data array. /// The number of data to update. /// The index at which to begin updating segment data. Must /// be less than or equal to the size of the segment data array. STDMETHOD(UpdateSegmentData)( _In_reads_(dataCount) CONST FLOAT *data, UINT32 dataCount, UINT32 startIndex = 0 ) PURE; /// /// Gets data from the segment data array. /// /// Buffer to contain the segment data array. /// The element count of the buffer. /// The index of the first segment data to retrieve. /// STDMETHOD(GetSegmentData)( _Out_writes_(dataCount) FLOAT *data, UINT32 dataCount, UINT32 startIndex = 0 ) PURE; /// /// Gets the size of the segment data array. /// STDMETHOD_(UINT32, GetSegmentDataCount)( ) PURE; /// /// Removes commands from the end of the commands array. /// /// Specifies how many commands to remove. STDMETHOD(RemoveCommandsAtEnd)( UINT32 commandsCount ) PURE; /// /// Updates the commands array. Existing commands not updated by this method are /// preserved. The array is resized larger if necessary to accomodate the new /// commands. /// /// The commands array. /// The number of commands to update. /// The index at which to begin updating commands. Must be /// less than or equal to the size of the commands array. STDMETHOD(UpdateCommands)( _In_reads_(commandsCount) CONST D2D1_SVG_PATH_COMMAND *commands, UINT32 commandsCount, UINT32 startIndex = 0 ) PURE; /// /// Gets commands from the commands array. /// /// Buffer to contain the commands /// The element count of the buffer. /// The index of the first commands to retrieve. STDMETHOD(GetCommands)( _Out_writes_(commandsCount) D2D1_SVG_PATH_COMMAND *commands, UINT32 commandsCount, UINT32 startIndex = 0 ) PURE; /// /// Gets the size of the commands array. /// STDMETHOD_(UINT32, GetCommandsCount)( ) PURE; /// /// Creates a path geometry object representing the path data. /// STDMETHOD(CreatePathGeometry)( D2D1_FILL_MODE fillMode, _COM_Outptr_ ID2D1PathGeometry1 **pathGeometry ) PURE; }; // interface ID2D1SvgPathData /// /// Interface for all SVG elements. /// interface DX_DECLARE_INTERFACE("ac7b67a6-183e-49c1-a823-0ebe40b0db29") ID2D1SvgElement : public ID2D1Resource { /// /// Gets the document that contains this element. Returns null if the element has /// been removed from the tree. /// STDMETHOD_(void, GetDocument)( _Outptr_result_maybenull_ ID2D1SvgDocument **document ) PURE; /// /// Gets the tag name. /// STDMETHOD(GetTagName)( _Out_writes_(nameCount) PWSTR name, UINT32 nameCount ) PURE; /// /// Gets the string length of the tag name. The returned string length does not /// include room for the null terminator. /// STDMETHOD_(UINT32, GetTagNameLength)( ) PURE; /// /// Returns TRUE if this element represents text content, e.g. the content of a /// 'title' or 'desc' element. Text content does not have a tag name. /// STDMETHOD_(BOOL, IsTextContent)( ) PURE; /// /// Gets the parent element. /// STDMETHOD_(void, GetParent)( _Outptr_result_maybenull_ ID2D1SvgElement **parent ) PURE; /// /// Returns whether this element has children. /// STDMETHOD_(BOOL, HasChildren)( ) PURE; /// /// Gets the first child of this element. /// STDMETHOD_(void, GetFirstChild)( _Outptr_result_maybenull_ ID2D1SvgElement **child ) PURE; /// /// Gets the last child of this element. /// STDMETHOD_(void, GetLastChild)( _Outptr_result_maybenull_ ID2D1SvgElement **child ) PURE; /// /// Gets the previous sibling of the referenceChild element. /// /// The referenceChild must be an immediate child of /// this element. /// The output previousChild element will be non-null if /// the referenceChild has a previous sibling. If the referenceChild is the first /// child, the output is null. STDMETHOD(GetPreviousChild)( _In_ ID2D1SvgElement *referenceChild, _COM_Outptr_result_maybenull_ ID2D1SvgElement **previousChild ) PURE; /// /// Gets the next sibling of the referenceChild element. /// /// The referenceChild must be an immediate child of /// this element. /// The output nextChild element will be non-null if the /// referenceChild has a next sibling. If the referenceChild is the last child, the /// output is null. STDMETHOD(GetNextChild)( _In_ ID2D1SvgElement *referenceChild, _COM_Outptr_result_maybenull_ ID2D1SvgElement **nextChild ) PURE; /// /// Inserts newChild as a child of this element, before the referenceChild element. /// If the newChild element already has a parent, it is removed from this parent as /// part of the insertion. Returns an error if this element cannot accept children /// of the type of newChild. Returns an error if the newChild is an ancestor of this /// element. /// /// The element to be inserted. /// The element that the child should be inserted /// before. If referenceChild is null, the newChild is placed as the last child. If /// referenceChild is non-null, it must be an immediate child of this element. /// STDMETHOD(InsertChildBefore)( _In_ ID2D1SvgElement *newChild, _In_opt_ ID2D1SvgElement *referenceChild = NULL ) PURE; /// /// Appends newChild to the list of children. If the newChild element already has a /// parent, it is removed from this parent as part of the append operation. Returns /// an error if this element cannot accept children of the type of newChild. Returns /// an error if the newChild is an ancestor of this element. /// /// The element to be appended. STDMETHOD(AppendChild)( _In_ ID2D1SvgElement *newChild ) PURE; /// /// Replaces the oldChild element with the newChild. This operation removes the /// oldChild from the tree. If the newChild element already has a parent, it is /// removed from this parent as part of the replace operation. Returns an error if /// this element cannot accept children of the type of newChild. Returns an error if /// the newChild is an ancestor of this element. /// /// The element to be inserted. /// The child element to be replaced. The oldChild element /// must be an immediate child of this element. STDMETHOD(ReplaceChild)( _In_ ID2D1SvgElement *newChild, _In_ ID2D1SvgElement *oldChild ) PURE; /// /// Removes the oldChild from the tree. Children of oldChild remain children of /// oldChild. /// /// The child element to be removed. The oldChild element /// must be an immediate child of this element. STDMETHOD(RemoveChild)( _In_ ID2D1SvgElement *oldChild ) PURE; /// /// Creates an element from a tag name. The element is appended to the list of /// children. Returns an error if this element cannot accept children of the /// specified type. /// /// The tag name of the new child. An empty string is /// interpreted to be a text content element. /// The new child element. STDMETHOD(CreateChild)( _In_ PCWSTR tagName, _COM_Outptr_ ID2D1SvgElement **newChild ) PURE; /// /// Returns true if the attribute is explicitly set on the element or if it is /// present within an inline style. Returns FALSE if the attribute is not a valid /// attribute on this element. /// /// The name of the attribute. /// Outputs whether the attribute is set to the 'inherit' /// value. STDMETHOD_(BOOL, IsAttributeSpecified)( _In_ PCWSTR name, _Out_opt_ BOOL *inherited = NULL ) PURE; /// /// Returns the number of specified attributes on this element. Attributes are only /// considered specified if they are explicitly set on the element or present within /// an inline style. Properties that receive their value through CSS inheritance are /// not considered specified. An attribute can become specified if it is set through /// a method call. It can become unspecified if it is removed via RemoveAttribute. /// STDMETHOD_(UINT32, GetSpecifiedAttributeCount)( ) PURE; /// /// Gets the name of the specified attribute at the given index. /// /// The specified index of the attribute. /// Outputs the name of the attribute. /// Outputs whether the attribute is set to the 'inherit' /// value. STDMETHOD(GetSpecifiedAttributeName)( UINT32 index, _Out_writes_(nameCount) PWSTR name, UINT32 nameCount, _Out_opt_ BOOL *inherited = NULL ) PURE; /// /// Gets the string length of the name of the specified attribute at the given /// index. The output string length does not include room for the null terminator. /// /// The specified index of the attribute. /// Outputs the string length of the name of the specified /// attribute. /// Outputs whether the attribute is set to the 'inherit' /// value. STDMETHOD(GetSpecifiedAttributeNameLength)( UINT32 index, _Out_ UINT32 *nameLength, _Out_opt_ BOOL *inherited = NULL ) PURE; /// /// Removes the attribute from this element. Also removes this attribute from within /// an inline style if present. Returns an error if the attribute name is not valid /// on this element. /// STDMETHOD(RemoveAttribute)( _In_ PCWSTR name ) PURE; /// /// Sets the value of a text content element. /// STDMETHOD(SetTextValue)( _In_reads_(nameCount) CONST WCHAR *name, UINT32 nameCount ) PURE; /// /// Gets the value of a text content element. /// STDMETHOD(GetTextValue)( _Out_writes_(nameCount) PWSTR name, UINT32 nameCount ) PURE; /// /// Gets the length of the text content value. The returned string length does not /// include room for the null terminator. /// STDMETHOD_(UINT32, GetTextValueLength)( ) PURE; /// /// Sets an attribute of this element using a string. Returns an error if the /// attribute name is not valid on this element. Returns an error if the attribute /// cannot be expressed as the specified type. /// STDMETHOD(SetAttributeValue)( _In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, _In_ PCWSTR value ) PURE; /// /// Gets an attribute of this element as a string. Returns an error if the attribute /// is not specified. Returns an error if the attribute name is not valid on this /// element. Returns an error if the attribute cannot be expressed as the specified /// string type. /// STDMETHOD(GetAttributeValue)( _In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, _Out_writes_(valueCount) PWSTR value, UINT32 valueCount ) PURE; /// /// Gets the string length of an attribute of this element. The returned string /// length does not include room for the null terminator. Returns an error if the /// attribute is not specified. Returns an error if the attribute name is not valid /// on this element. Returns an error if the attribute cannot be expressed as the /// specified string type. /// STDMETHOD(GetAttributeValueLength)( _In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, _Out_ UINT32 *valueLength ) PURE; /// /// Sets an attribute of this element using a POD type. Returns an error if the /// attribute name is not valid on this element. Returns an error if the attribute /// cannot be expressed as the specified type. /// STDMETHOD(SetAttributeValue)( _In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_POD_TYPE type, _In_reads_bytes_(valueSizeInBytes) CONST void *value, UINT32 valueSizeInBytes ) PURE; /// /// Gets an attribute of this element as a POD type. Returns an error if the /// attribute is not specified. Returns an error if the attribute name is not valid /// on this element. Returns an error if the attribute cannot be expressed as the /// specified POD type. /// STDMETHOD(GetAttributeValue)( _In_ PCWSTR name, D2D1_SVG_ATTRIBUTE_POD_TYPE type, _Out_writes_bytes_(valueSizeInBytes) void *value, UINT32 valueSizeInBytes ) PURE; /// /// Sets an attribute of this element using an interface. Returns an error if the /// attribute name is not valid on this element. Returns an error if the attribute /// cannot be expressed as the specified interface type. Returns an error if the /// attribute object is already set on an element. A given attribute object may only /// be set on one element in one attribute location at a time. /// STDMETHOD(SetAttributeValue)( _In_ PCWSTR name, _In_ ID2D1SvgAttribute *value ) PURE; /// /// Gets an attribute of this element as an interface type. Returns an error if the /// attribute is not specified. Returns an error if the attribute name is not valid /// on this element. Returns an error if the attribute cannot be expressed as the /// specified interface type. /// /// The interface ID of the attribute value. STDMETHOD(GetAttributeValue)( _In_ PCWSTR name, _In_ REFIID riid, _COM_Outptr_result_maybenull_ void **value ) PURE; /// /// Sets an attribute of this element using a float. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, FLOAT value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT, &value, sizeof(value)); } /// /// Gets an attribute of this element as a float. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ FLOAT *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT, value, sizeof(*value)); } /// /// Sets an attribute of this element as a color. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, CONST D2D1_COLOR_F &value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR, &value, sizeof(value)); } /// /// Gets an attribute of this element as a color. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_COLOR_F *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR, value, sizeof(*value)); } /// /// Sets an attribute of this element as a fill mode. This method can be used to set /// the value of the 'fill-rule' or 'clip-rule' properties. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, D2D1_FILL_MODE value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE, &value, sizeof(value)); } /// /// Gets an attribute of this element as a fill mode. This method can be used to get /// the value of the 'fill-rule' or 'clip-rule' properties. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_FILL_MODE *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE, value, sizeof(*value)); } /// /// Sets an attribute of this element as a display value. This method can be used to /// set the value of the 'display' property. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, D2D1_SVG_DISPLAY value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY, &value, sizeof(value)); } /// /// Gets an attribute of this element as a display value. This method can be used to /// get the value of the 'display' property. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_SVG_DISPLAY *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY, value, sizeof(*value)); } /// /// Sets an attribute of this element as an overflow value. This method can be used /// to set the value of the 'overflow' property. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, D2D1_SVG_OVERFLOW value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW, &value, sizeof(value)); } /// /// Gets an attribute of this element as an overflow value. This method can be used /// to get the value of the 'overflow' property. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_SVG_OVERFLOW *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW, value, sizeof(*value)); } /// /// Sets an attribute of this element as a line join value. This method can be used /// to set the value of the 'stroke-linejoin' property. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, D2D1_SVG_LINE_JOIN value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN, &value, sizeof(value)); } /// /// Gets an attribute of this element as a line join value. This method can be used /// to get the value of the 'stroke-linejoin' property. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_SVG_LINE_JOIN *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN, value, sizeof(*value)); } /// /// Sets an attribute of this element as a line cap value. This method can be used /// to set the value of the 'stroke-linecap' property. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, D2D1_SVG_LINE_CAP value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP, &value, sizeof(value)); } /// /// Gets an attribute of this element as a line cap value. This method can be used /// to get the value of the 'stroke-linecap' property. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_SVG_LINE_CAP *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP, value, sizeof(*value)); } /// /// Sets an attribute of this element as a visibility value. This method can be used /// to set the value of the 'visibility' property. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, D2D1_SVG_VISIBILITY value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY, &value, sizeof(value)); } /// /// Gets an attribute of this element as a visibility value. This method can be used /// to get the value of the 'visibility' property. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_SVG_VISIBILITY *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY, value, sizeof(*value)); } /// /// Sets an attribute of this element as a matrix value. This method can be used to /// set the value of a 'transform' or 'gradientTransform' attribute. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, CONST D2D1_MATRIX_3X2_F &value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX, &value, sizeof(value)); } /// /// Gets an attribute of this element as a matrix value. This method can be used to /// get the value of a 'transform' or 'gradientTransform' attribute. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_MATRIX_3X2_F *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX, value, sizeof(*value)); } /// /// Sets an attribute of this element as a unit type value. This method can be used /// to set the value of a 'gradientUnits' or 'clipPathUnits' attribute. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, D2D1_SVG_UNIT_TYPE value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE, &value, sizeof(value)); } /// /// Gets an attribute of this element as a unit type value. This method can be used /// to get the value of a 'gradientUnits' or 'clipPathUnits' attribute. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_SVG_UNIT_TYPE *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE, value, sizeof(*value)); } /// /// Sets an attribute of this element as an extend mode value. This method can be /// used to set the value of a 'spreadMethod' attribute. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, D2D1_EXTEND_MODE value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE, &value, sizeof(value)); } /// /// Gets an attribute of this element as a extend mode value. This method can be /// used to get the value of a 'spreadMethod' attribute. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_EXTEND_MODE *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE, value, sizeof(*value)); } /// /// Sets an attribute of this element as a preserve aspect ratio value. This method /// can be used to set the value of a 'preserveAspectRatio' attribute. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, CONST D2D1_SVG_PRESERVE_ASPECT_RATIO &value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO, &value, sizeof(value)); } /// /// Gets an attribute of this element as a preserve aspect ratio value. This method /// can be used to get the value of a 'preserveAspectRatio' attribute. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_SVG_PRESERVE_ASPECT_RATIO *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO, value, sizeof(*value)); } /// /// Sets an attribute of this element as a length value. /// COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue( _In_ PCWSTR name, CONST D2D1_SVG_LENGTH &value ) { return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH, &value, sizeof(value)); } /// /// Gets an attribute of this element as length value. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _Out_ D2D1_SVG_LENGTH *value ) { return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH, value, sizeof(*value)); } /// /// Gets an attribute of this element. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _COM_Outptr_result_maybenull_ ID2D1SvgAttribute **value ) { return GetAttributeValue(name, IID_ID2D1SvgAttribute, reinterpret_cast(value)); } /// /// Gets an attribute of this element as a paint. This method can be used to get the /// value of the 'fill' or 'stroke' properties. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _COM_Outptr_result_maybenull_ ID2D1SvgPaint **value ) { return GetAttributeValue(name, IID_ID2D1SvgPaint, reinterpret_cast(value)); } /// /// Gets an attribute of this element as a stroke dash array. This method can be /// used to get the value of the 'stroke-dasharray' property. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _COM_Outptr_result_maybenull_ ID2D1SvgStrokeDashArray **value ) { return GetAttributeValue(name, IID_ID2D1SvgStrokeDashArray, reinterpret_cast(value)); } /// /// Gets an attribute of this element as points. This method can be used to get the /// value of the 'points' attribute on a 'polygon' or 'polyline' element. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _COM_Outptr_result_maybenull_ ID2D1SvgPointCollection **value ) { return GetAttributeValue(name, IID_ID2D1SvgPointCollection, reinterpret_cast(value)); } /// /// Gets an attribute of this element as path data. This method can be used to get /// the value of the 'd' attribute on a 'path' element. /// COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue( _In_ PCWSTR name, _COM_Outptr_result_maybenull_ ID2D1SvgPathData **value ) { return GetAttributeValue(name, IID_ID2D1SvgPathData, reinterpret_cast(value)); } }; // interface ID2D1SvgElement interface DX_DECLARE_INTERFACE("86b88e4d-afa4-4d7b-88e4-68a51c4a0aec") ID2D1SvgDocument : public ID2D1Resource { /// /// Sets the size of the initial viewport. /// STDMETHOD(SetViewportSize)( D2D1_SIZE_F viewportSize ) PURE; /// /// Returns the size of the initial viewport. /// STDMETHOD_(D2D1_SIZE_F, GetViewportSize)( ) CONST PURE; /// /// Sets the root element of the document. The root element must be an 'svg' /// element. If the element already exists within an svg tree, it is first removed. /// STDMETHOD(SetRoot)( _In_opt_ ID2D1SvgElement *root ) PURE; /// /// Gets the root element of the document. /// STDMETHOD_(void, GetRoot)( _Outptr_result_maybenull_ ID2D1SvgElement **root ) PURE; /// /// Gets the SVG element with the specified ID. If the element cannot be found, the /// returned element will be null. /// STDMETHOD(FindElementById)( _In_ PCWSTR id, _COM_Outptr_result_maybenull_ ID2D1SvgElement **svgElement ) PURE; /// /// Serializes an element and its subtree to XML. The output XML is encoded as /// UTF-8. /// /// An output stream to contain the SVG XML subtree. /// /// The root of the subtree. If null, the entire document is /// serialized. STDMETHOD(Serialize)( _In_ IStream *outputXmlStream, _In_opt_ ID2D1SvgElement *subtree = NULL ) PURE; /// /// Deserializes a subtree from the stream. The stream must have only one root /// element, but that root element need not be an 'svg' element. The output element /// is not inserted into this document tree. /// /// An input stream containing the SVG XML subtree. /// /// The root of the subtree. STDMETHOD(Deserialize)( _In_ IStream *inputXmlStream, _COM_Outptr_ ID2D1SvgElement **subtree ) PURE; /// /// Creates a paint object which can be used to set the 'fill' or 'stroke' /// properties. /// /// The color used if the paintType is /// D2D1_SVG_PAINT_TYPE_COLOR. /// The element id which acts as the paint server. This id is used /// if the paint type is D2D1_SVG_PAINT_TYPE_URI. STDMETHOD(CreatePaint)( D2D1_SVG_PAINT_TYPE paintType, _In_opt_ CONST D2D1_COLOR_F *color, _In_opt_ PCWSTR id, _COM_Outptr_ ID2D1SvgPaint **paint ) PURE; /// /// Creates a dash array object which can be used to set the 'stroke-dasharray' /// property. /// STDMETHOD(CreateStrokeDashArray)( _In_reads_opt_(dashesCount) CONST D2D1_SVG_LENGTH *dashes, UINT32 dashesCount, _COM_Outptr_ ID2D1SvgStrokeDashArray **strokeDashArray ) PURE; /// /// Creates a points object which can be used to set a 'points' attribute on a /// 'polygon' or 'polyline' element. /// STDMETHOD(CreatePointCollection)( _In_reads_opt_(pointsCount) CONST D2D1_POINT_2F *points, UINT32 pointsCount, _COM_Outptr_ ID2D1SvgPointCollection **pointCollection ) PURE; /// /// Creates a path data object which can be used to set a 'd' attribute on a 'path' /// element. /// STDMETHOD(CreatePathData)( _In_reads_opt_(segmentDataCount) CONST FLOAT *segmentData, UINT32 segmentDataCount, _In_reads_opt_(commandsCount) CONST D2D1_SVG_PATH_COMMAND *commands, UINT32 commandsCount, _COM_Outptr_ ID2D1SvgPathData **pathData ) PURE; /// /// Creates a paint object which can be used to set the 'fill' or 'stroke' /// properties. /// /// The color used if the paintType is /// D2D1_SVG_PAINT_TYPE_COLOR. /// The element id which acts as the paint server. This id is used /// if the paint type is D2D1_SVG_PAINT_TYPE_URI. COM_DECLSPEC_NOTHROW HRESULT CreatePaint( D2D1_SVG_PAINT_TYPE paintType, CONST D2D1_COLOR_F &color, _In_opt_ PCWSTR id, _COM_Outptr_ ID2D1SvgPaint **paint ) { return CreatePaint(paintType, &color, id, paint); } }; // interface ID2D1SvgDocument #endif #endif #ifdef D2D_USE_C_DEFINITIONS #endif /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ #endif // #ifndef _D2D1_SVG_