using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; using Vanara.InteropServices; using static Vanara.PInvoke.Opc; using static Vanara.PInvoke.UrlMon; namespace Vanara.PInvoke { /// Interfaces and supporting enums and structures for XPS programming. // https://docs.microsoft.com/en-us/windows/win32/printdocs/xps-programming-reference public static partial class XpsObjectModel { /// /// Defines objects that are used to paint graphical objects. Classes that derive from IXpsOMBrush describe how the area is painted. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsombrush [PInvokeData("xpsobjectmodel.h", MSDNShortId = "43cb56db-e09e-47cb-b50b-7827131659fd")] [ComImport, Guid("56A3F80C-EA4C-4187-A57B-A2A473B2B42B"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMBrush : IXpsOMShareable { /// Gets the IUnknown interface of the parent. /// A pointer to the IUnknown interface of the parent. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner HRESULT // GetOwner( IUnknown **owner ); [return: MarshalAs(UnmanagedType.IUnknown)] new object GetOwner(); /// Gets the object type of the interface. /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype HRESULT GetType( // XPS_OBJECT_TYPE *type ); new XPS_OBJECT_TYPE GetType(); /// Gets the opacity of the brush. /// The opacity value of the brush. /// /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is /// 50 percent opaque, and 1.0 that it is completely opaque. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity HRESULT // GetOpacity( FLOAT *opacity ); float GetOpacity(); /// Sets the opacity of the brush. /// The opacity value of the brush. /// /// /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is /// 50 percent opaque, and 1.0 that it is completely opaque. /// /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity HRESULT // SetOpacity( FLOAT opacity ); void SetOpacity([In] float opacity); } /// A group of visual elements and related properties. /// The code example that follows illustrates how to create an instance of this interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomcanvas [PInvokeData("xpsobjectmodel.h", MSDNShortId = "3cb0e1b3-88a8-4724-a3c5-0df416294e62")] [ComImport, Guid("221D1452-331E-47C6-87E9-6CCEFB9B5BA3"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMCanvas : IXpsOMVisual { /// Gets the IUnknown interface of the parent. /// A pointer to the IUnknown interface of the parent. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner HRESULT // GetOwner( IUnknown **owner ); [return: MarshalAs(UnmanagedType.IUnknown)] new object GetOwner(); /// Gets the object type of the interface. /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype HRESULT GetType( // XPS_OBJECT_TYPE *type ); new XPS_OBJECT_TYPE GetType(); /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. If a matrix transform /// has not been set, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. /// /// /// Most recent method called /// Object that is returned in matrixTransform /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the /// resource directory. /// /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransform HRESULT // GetTransform( IXpsOMMatrixTransform **matrixTransform ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMMatrixTransform GetTransform(); /// /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. /// /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the /// visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL /// pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in matrixTransform /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// NULL pointer. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlocal HRESULT // GetTransformLocal( IXpsOMMatrixTransform **matrixTransform ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMMatrixTransform GetTransformLocal(); /// Sets the local, unshared matrix transform. /// /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. A NULL pointer /// releases the previously assigned transform. /// /// /// /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL /// pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in matrixTransform by GetTransformLocal /// Object that is returned in key by GetTransformLookup /// /// /// SetTransformLocal (this method) /// The local transform that is set by SetTransformLocal. /// The local transform set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup /// /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the /// resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlocal HRESULT // SetTransformLocal( IXpsOMMatrixTransform *matrixTransform ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetTransformLocal([In] IXpsOMMatrixTransform matrixTransform); /// /// Gets the lookup key name of the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix /// transform for the visual. /// /// /// /// The lookup key name for the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix /// transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a /// NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in key /// /// /// SetTransformLocal /// NULL pointer. /// /// /// SetTransformLookup /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlookup HRESULT // GetTransformLookup( LPWSTR *key ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetTransformLookup(); /// Sets the lookup key name of a shared matrix transform in a resource dictionary. /// The lookup key name of the matrix transform in the dictionary. /// /// /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL /// pointer in the matrixTransform parameter. The table that follows explains the relationship between the local and lookup /// values of this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in matrixTransform by GetTransformLocal /// Object that is returned in key by GetTransformLookup /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// The local transform that is set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup (this method) /// /// The shared transform that gets retrieved—with a lookup key that matches the key that is set by SetTransformLookup—from the /// resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlookup HRESULT // SetTransformLookup( LPCWSTR key ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// /// Gets a pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. /// /// /// /// A pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. If the clip /// geometry has not been set, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the geometry. /// /// /// Most recent method called /// Object that is returned in clipGeometry /// /// /// SetClipGeometryLocal /// The local clip geometry that is set by SetClipGeometryLocal. /// /// /// SetClipGeometryLookup /// /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, /// from the resource directory. /// /// /// /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometry HRESULT // GetClipGeometry( IXpsOMGeometry **clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMGeometry GetClipGeometry(); /// /// Gets a pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. /// /// /// /// A pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. If a /// clip geometry lookup key has been set, or if a local clip geometry has not been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in clipGeometry /// /// /// SetClipGeometryLocal /// The local clip geometry that is set by SetClipGeometryLocal. /// /// /// SetClipGeometryLookup /// NULL pointer. /// /// /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylocal HRESULT // GetClipGeometryLocal( IXpsOMGeometry **clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMGeometry GetClipGeometryLocal(); /// Sets the local, unshared clipping region for the visual. /// /// A pointer to the IXpsOMGeometry interface to be set as the local, unshared clipping region for the visual. A NULL /// pointer releases the previously assigned geometry interface. /// /// /// /// After you call SetClipGeometryLocal, the clip geometry lookup key is released and GetClipGeometryLookup returns a /// NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup /// values of this property. /// /// /// /// Most recent method called /// Object that is returned in clipGeometry by GetClipGeometry /// Object that is returned in clipGeometry by GetClipGeometryLocal /// String that is returned in key by GetClipGeometryLookup /// /// /// SetClipGeometryLocal (this method) /// The local clip geometry that is set by SetClipGeometryLocal. /// The local clip geometry that is set by SetClipGeometryLocal. /// NULL pointer. /// /// /// SetClipGeometryLookup /// /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, /// from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetClipGeometryLookup. /// /// /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylocal HRESULT // SetClipGeometryLocal( IXpsOMGeometry *clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetClipGeometryLocal([In] IXpsOMGeometry clipGeometry); /// /// Gets the lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. /// /// /// /// The lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. If a /// lookup key for the clip geometry has not been set, or if a local clip geometry has been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Lookup key string that is returned in key /// /// /// SetClipGeometryLocal /// NULL pointer. /// /// /// SetClipGeometryLookup /// The lookup key that is set by SetClipGeometryLookup. /// /// /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylookup // HRESULT GetClipGeometryLookup( LPWSTR *key ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetClipGeometryLookup(); /// Sets the lookup key name of a shared clip geometry in a resource dictionary. /// /// The lookup key name of the clip geometry in the dictionary. A NULL pointer clears the previously assigned key name. /// /// /// /// After you call SetClipGeometryLookup, the local clip geometry is released and GetClipGeometryLocal returns a /// NULL pointer in the clipGeometry parameter. The table that follows explains the relationship between the local and /// lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in clipGeometry by GetClipGeometry /// Object that is returned in clipGeometry by GetClipGeometryLocal /// String that is returned in key by GetClipGeometryLookup /// /// /// SetClipGeometryLocal /// The local clip geometry that is set by SetClipGeometryLocal. /// The local clip geometry that is set by SetClipGeometryLocal. /// NULL pointer. /// /// /// SetClipGeometryLookup (this method) /// /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, /// from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetClipGeometryLookup. /// /// /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylookup // HRESULT SetClipGeometryLookup( LPCWSTR key ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetClipGeometryLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// Gets the opacity value of this visual. /// The opacity value. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacity HRESULT // GetOpacity( FLOAT *opacity ); [MethodImpl(MethodImplOptions.InternalCall)] new float GetOpacity(); /// Sets the opacity value of the visual. /// /// The opacity value to be set for the visual. /// /// The range of allowed values for this parameter is 0.0 to 1.0; with 0.0 the visual is completely transparent, and with 1.0 it /// is completely opaque. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacity HRESULT // SetOpacity( FLOAT opacity ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetOpacity([In] float opacity); /// Gets a pointer to the IXpsOMBrush interface of the visual's opacity mask brush. /// /// /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush has not been set for /// this visual, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the brush. /// /// /// Most recent method called /// Object that is returned in opacityMaskBrush /// /// /// SetOpacityMaskBrushLocal /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// /// /// SetOpacityMaskBrushLookup /// /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by /// SetOpacityMaskBrushLookup, from the resource directory. /// /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrush HRESULT // GetOpacityMaskBrush( IXpsOMBrush **opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMBrush GetOpacityMaskBrush(); /// Gets the local, unshared opacity mask brush for the visual. /// /// /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush lookup key has been set, /// or if a local opacity mask brush has not been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in opacityMaskBrush /// /// /// SetOpacityMaskBrushLocal /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// /// /// SetOpacityMaskBrushLookup /// NULL pointer. /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlocal // HRESULT GetOpacityMaskBrushLocal( IXpsOMBrush **opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMBrush GetOpacityMaskBrushLocal(); /// Sets the IXpsOMBrush interface pointer as the local, unshared opacity mask brush. /// /// A pointer to the IXpsOMBrush interface to be set as the local, unshared opacity mask brush. A NULL pointer clears the /// previously assigned opacity mask brush. /// /// /// /// After you call SetOpacityMaskBrushLocal, the opacity mask brush lookup key is released and GetOpacityMaskBrushLookup /// returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and /// lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal /// String that is returned in key by GetOpacityMaskBrushLookup /// /// /// SetOpacityMaskBrushLocal (this method) /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// NULL pointer. /// /// /// SetOpacityMaskBrushLookup /// /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by /// SetOpacityMaskBrushLookup, from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetOpacityMaskBrushLookup. /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlocal // HRESULT SetOpacityMaskBrushLocal( IXpsOMBrush *opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetOpacityMaskBrushLocal([In] IXpsOMBrush opacityMaskBrush); /// Gets the name of the lookup key of the shared opacity mask brush in a resource dictionary. /// /// /// The name of the lookup key of the shared opacity mask brush in a resource dictionary. If the lookup key of an opacity mask /// brush has not been set, or if a local opacity mask brush has been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in key /// /// /// SetOpacityMaskBrushLocal /// NULL pointer. /// /// /// SetOpacityMaskBrushLookup /// The lookup key that is set by SetOpacityMaskBrushLookup. /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlookup // HRESULT GetOpacityMaskBrushLookup( LPWSTR *key ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetOpacityMaskBrushLookup(); /// Sets the lookup key name of a shared opacity mask brush in a resource dictionary. /// /// The lookup key name of the opacity mask brush in the dictionary. A NULL pointer clears the previously assigned key name. /// /// /// /// After you call SetOpacityMaskBrushLookup, the local opacity mask brush is released and GetOpacityMaskBrushLocal /// returns a NULL pointer in the opacityMaskBrush parameter. The table that follows explains the relationship between /// the local and lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal /// String that is returned in key by GetOpacityMaskBrushLookup /// /// /// SetOpacityMaskBrushLocal /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// NULL pointer. /// /// /// SetOpacityMaskBrushLookup (this method) /// /// The shared opacity mask brush that gets retrieved—with a lookup key that matches the key that is set by /// SetOpacityMaskBrushLookup—from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetOpacityMaskBrushLookup. /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlookup // HRESULT SetOpacityMaskBrushLookup( LPCWSTR key ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetOpacityMaskBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// Gets the Name property of the visual. /// The Name property string. If the Name property has not been set, a NULL pointer is returned. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getname HRESULT GetName( // LPWSTR *name ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetName(); /// Sets the Name property of the visual. /// The name of the visual. A NULL pointer clears the Name property. /// /// Names must be unique. /// /// Clearing the Name property by passing a NULL pointer in name sets the IsHyperlinkTarget property to FALSE. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setname HRESULT SetName( // LPCWSTR name ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetName([In, MarshalAs(UnmanagedType.LPWStr)] string name); /// Gets a value that indicates whether the visual is the target of a hyperlink. /// /// The Boolean value that indicates whether the visual is the target of a hyperlink. /// /// /// Value /// Meaning /// /// /// TRUE /// The visual is the target of a hyperlink. /// /// /// FALSE /// The visual is not the target of a hyperlink. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getishyperlinktarget HRESULT // GetIsHyperlinkTarget( BOOL *isHyperlink ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Bool)] new bool GetIsHyperlinkTarget(); /// Specifies whether the visual is the target of a hyperlink. /// /// The Boolean value that specifies whether the visual is the target of a hyperlink. /// /// /// Value /// Meaning /// /// /// TRUE /// The visual is the target of a hyperlink. /// /// /// FALSE /// The visual is not the target of a hyperlink. /// /// /// /// The visual must be named before it can be set as the target of a hyperlink. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setishyperlinktarget HRESULT // SetIsHyperlinkTarget( BOOL isHyperlink ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetIsHyperlinkTarget([In, MarshalAs(UnmanagedType.Bool)] bool isHyperlink); /// Gets a pointer to the IUri interface to which this visual object links. /// /// A pointer to the IUri interface that contains the destination URI for the link. If a URI has not been set for this object, a /// NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gethyperlinknavigateuri // HRESULT GetHyperlinkNavigateUri( IUri **hyperlinkUri ); [MethodImpl(MethodImplOptions.InternalCall)] new IUri GetHyperlinkNavigateUri(); /// Sets the destination URI of the visual's hyperlink. /// The IUri interface that contains the destination URI of the visual's hyperlink. /// /// Setting an object's URI makes the object a hyperlink. When activated or clicked, the object will navigate to the destination /// that is specified by the URI in hyperlinkUri. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-sethyperlinknavigateuri // HRESULT SetHyperlinkNavigateUri( IUri *hyperlinkUri ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetHyperlinkNavigateUri([In] IUri hyperlinkUri); /// Gets the Language property of the visual and of its contents. /// /// The language string that specifies the language of the page. If a language has not been set, a NULL pointer is returned. /// /// /// The Language property that is set by this method specifies the language of the resource content. /// Internet Engineering Task Force (IETF) RFC 3066 specifies the recommended encoding for the Language property. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getlanguage HRESULT // GetLanguage( LPWSTR *language ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetLanguage(); /// Sets the Language property of the visual. /// /// The language string that specifies the language of the visual and of its contents. A NULL pointer clears the /// Language property. /// /// /// The recommended encoding for the Language property is specified in Internet Engineering Task Force (IETF) RFC 3066r. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setlanguage HRESULT // SetLanguage( LPCWSTR language ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetLanguage([In, MarshalAs(UnmanagedType.LPWStr)] string language); /// /// Gets a pointer to an IXpsOMVisualCollection interface that contains a collection of the visual objects in the canvas. /// /// /// The collection of the visual objects in the canvas. If no visual objects are attached to the canvas, an empty collection is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getvisuals HRESULT // GetVisuals( IXpsOMVisualCollection **visuals ); IXpsOMVisualCollection GetVisuals(); /// /// Gets a Boolean value that determines whether the edges of the objects in the canvas are to be rendered using the aliased /// edge mode. /// /// /// The Boolean value that determines whether the objects in the canvas are to be rendered using the aliased edge mode. /// /// /// Value /// Meaning /// /// /// TRUE /// /// The edges of objects in the canvas are to be rendered without anti-aliasing using the aliased edge mode. This includes any /// objects in the canvas that have useAliasedEdgeMode set to FALSE. In the document markup, this corresponds to the /// RenderOptions.EdgeMode attribute having a value of Aliased. /// /// /// /// FALSE /// /// The edges of objects in the canvas are to be rendered in the default manner. In the document markup, this corresponds to the /// RenderOptions.EdgeMode attribute being absent. /// /// /// /// /// /// The property that is returned by this method corresponds to the RenderOptions.EdgeMode attribute of the Canvas /// element in the document markup. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getusealiasededgemode // HRESULT GetUseAliasedEdgeMode( BOOL *useAliasedEdgeMode ); [return: MarshalAs(UnmanagedType.Bool)] bool GetUseAliasedEdgeMode(); /// /// Sets the value that determines whether the edges of objects in this canvas will be rendered using the aliased edge mode. /// /// /// /// The Boolean value that determines whether the edges of child objects in this canvas will be rendered using the aliased edge mode. /// /// /// /// Value /// Meaning /// /// /// TRUE /// /// The edges of objects in the canvas are to be rendered without anti-aliasing using the aliased edge mode. This includes any /// objects that have this value set to FALSE. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute /// having the value of Aliased. /// /// /// /// FALSE /// /// The edges of objects in the canvas are to be rendered in the default manner. In the document markup, this corresponds to the /// RenderOptions.EdgeMode attribute being absent. /// /// /// /// /// /// This property corresponds to the RenderOptions.EdgeMode attribute of the Canvas element in the document markup. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setusealiasededgemode // HRESULT SetUseAliasedEdgeMode( BOOL useAliasedEdgeMode ); void SetUseAliasedEdgeMode([MarshalAs(UnmanagedType.Bool)] bool useAliasedEdgeMode); /// /// Gets a short textual description of the object's contents. This text is used by accessibility clients to describe the object. /// /// /// The short textual description of the object's contents. If this description is not set, a NULL pointer is returned. /// /// /// /// The property returned by this method corresponds to the AutomationProperties.Name attribute of the Canvas /// element in the document markup. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getaccessibilityshortdescription // HRESULT GetAccessibilityShortDescription( LPWSTR *shortDescription ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetAccessibilityShortDescription(); /// /// Sets the short textual description of the object's contents. This text is used by accessibility clients to describe the object. /// /// /// The short textual description of the object's contents. A NULL pointer clears the previously assigned text. /// /// /// The property that is set by this method corresponds to the AutomationProperties.HelpText attribute of the /// Canvas element in the document markup. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setaccessibilityshortdescription // HRESULT SetAccessibilityShortDescription( LPCWSTR shortDescription ); void SetAccessibilityShortDescription([In, MarshalAs(UnmanagedType.LPWStr)] string shortDescription); /// /// Gets the long (detailed) textual description of the object's contents. This text is used by accessibility clients to /// describe the object. /// /// /// The long (detailed) textual description of the object's contents. A NULL pointer is returned if this text has not /// been set. /// /// /// /// The property returned by this method corresponds to the AutomationProperties.HelpText attribute of the Canvas /// element in the document markup. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getaccessibilitylongdescription // HRESULT GetAccessibilityLongDescription( LPWSTR *longDescription ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetAccessibilityLongDescription(); /// /// Sets the long (detailed) textual description of the object's contents. This text is used by accessibility clients to /// describe the object. /// /// /// The long (detailed) textual description of the object's contents. A NULL pointer clears the previously assigned value. /// /// /// The property that is set by this method corresponds to the AutomationProperties.HelpText attribute of the /// Canvas element in the document markup. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setaccessibilitylongdescription // HRESULT SetAccessibilityLongDescription( LPCWSTR longDescription ); void SetAccessibilityLongDescription([In, MarshalAs(UnmanagedType.LPWStr)] string longDescription); /// Gets a pointer to the resolved IXpsOMDictionary interface of the dictionary associated with the canvas. /// /// A pointer to the resolved IXpsOMDictionary interface of the dictionary. /// The value that is returned in this parameter depends on which method has been most recently called to set the dictionary. /// /// /// Most recent method called /// Object returned in resourceDictionary /// /// /// SetDictionaryLocal /// The local dictionary that is set by SetDictionaryLocal. /// /// /// SetDictionaryResource /// The shared dictionary in the dictionary resource that is set by SetDictionaryResource. /// /// /// Neither SetDictionaryLocal nor SetDictionaryResource has been called yet. /// NULL pointer. /// /// /// /// /// /// GetDictionary can return the interface pointer of a local or remote dictionary. GetOwner can be called to determine /// whether the dictionary is local or remote. /// /// /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. /// This occurs because all of the relationships are parsed when a resource is loaded. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getdictionary HRESULT // GetDictionary( IXpsOMDictionary **resourceDictionary ); IXpsOMDictionary GetDictionary(); /// Gets a pointer to the IXpsOMDictionary interface of the local, unshared dictionary. /// /// /// The IXpsOMDictionary interface pointer to the local, unshared dictionary, if one has been set. If a local dictionary has not /// been set or if a remote dictionary resource has been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object returned in resourceDictionary /// /// /// SetDictionaryLocal /// The local dictionary that is set by SetDictionaryLocal. /// /// /// SetDictionaryResource /// NULL pointer. /// /// /// Neither SetDictionaryLocal nor SetDictionaryResource has been called yet. /// NULL pointer. /// /// /// /// /// /// When this method loads and parses the resource into the XPS OM, it might return an error that applies to another resource. /// This can occur because all of the relationships are parsed when the resource is loaded. /// /// For more information about other return values that might be returned by this method, see XPS Document Errors. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getdictionarylocal HRESULT // GetDictionaryLocal( IXpsOMDictionary **resourceDictionary ); IXpsOMDictionary GetDictionaryLocal(); /// Sets the IXpsOMDictionary interface pointer of the local, unshared dictionary. /// /// The IXpsOMDictionary interface of the local, unshared dictionary. A NULL pointer releases any previously assigned /// local dictionary. /// /// /// /// After you call SetDictionaryLocal, the remote dictionary resource is released and GetDictionaryResource returns a /// NULL pointer in the remoteDictionaryResource parameter. The table that follows explains the relationship between the /// local and remote values of this property. /// /// /// /// Most recent method called /// Object that is returned in resourceDictionary by GetDictionary /// Object that is returned in resourceDictionary by GetDictionaryLocal /// Object that is returned in remoteDictionaryResource by GetDictionaryResource /// /// /// SetDictionaryLocal (this method) /// The local dictionary that is set by SetDictionaryLocal. /// The local dictionary that is set by SetDictionaryLocal. /// NULL pointer. /// /// /// SetDictionaryResource /// The shared dictionary in the dictionary resource that is set by SetDictionaryResource. /// NULL pointer. /// The remote dictionary resource that is set by SetDictionaryResource. /// /// /// Neither SetDictionaryLocal nor SetDictionaryResource has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setdictionarylocal HRESULT // SetDictionaryLocal( IXpsOMDictionary *resourceDictionary ); void SetDictionaryLocal([In] IXpsOMDictionary resourceDictionary); /// Gets a pointer to the IXpsOMRemoteDictionaryResource interface of the remote dictionary resource. /// /// /// The IXpsOMRemoteDictionaryResource interface pointer to the remote dictionary resource, if one has been set. If a remote /// dictionary resource has not been set or if a local dictionary resource has been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object returned in remoteDictionaryResource /// /// /// SetDictionaryLocal /// NULL pointer. /// /// /// SetDictionaryResource /// The remote dictionary resource that is set by SetDictionaryResource. /// /// /// Neither SetDictionaryLocal nor SetDictionaryResource has been called yet. /// NULL pointer. /// /// /// /// /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. /// This occurs because all of the relationships are parsed when a resource is loaded. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getdictionaryresource // HRESULT GetDictionaryResource( IXpsOMRemoteDictionaryResource **remoteDictionaryResource ); IXpsOMRemoteDictionaryResource GetDictionaryResource(); /// Sets the IXpsOMRemoteDictionaryResource interface pointer of the remote dictionary resource. /// /// The IXpsOMRemoteDictionaryResource interface of the remote dictionary resource. A NULL pointer releases any /// previously assigned dictionary resource. /// /// /// After calling this method, GetDictionaryLocal returns a NULL pointer in the resourceDictionary parameter. /// /// /// Most recent method called /// Object that is returned in resourceDictionary by GetDictionary /// Object that is returned in resourceDictionary by GetDictionaryLocal /// Object that is returned in remoteDictionaryResource by GetDictionaryResource /// /// /// SetDictionaryLocal /// The local dictionary that is set by SetDictionaryLocal. /// The local dictionary that is set by SetDictionaryLocal. /// NULL pointer. /// /// /// SetDictionaryResource (this method) /// The shared dictionary in the dictionary resource that is set by SetDictionaryResource. /// NULL pointer. /// The remote dictionary resource that is set by SetDictionaryResource. /// /// /// Neither SetDictionaryLocal nor SetDictionaryResource has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setdictionaryresource // HRESULT SetDictionaryResource( IXpsOMRemoteDictionaryResource *remoteDictionaryResource ); void SetDictionaryResource([In] IXpsOMRemoteDictionaryResource remoteDictionaryResource); /// Makes a deep copy of the interface. /// A pointer to the copy of the interface. /// The owner of the new interface is NULL. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-clone HRESULT Clone( // IXpsOMCanvas **canvas ); IXpsOMCanvas Clone(); } /// Provides an IStream interface to a color profile resource. /// The code example that follows illustrates how to create an instance of this interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomcolorprofileresource [PInvokeData("xpsobjectmodel.h", MSDNShortId = "8a344300-c3fc-4225-bfa5-d5d33798a094")] [ComImport, Guid("67BD7D69-1EEF-4BB1-B5E7-6F4F87BE8ABE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMColorProfileResource : IXpsOMResource { /// Gets the name that will be used when the part is serialized. /// /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName /// method), a NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] new IOpcPartUri GetPartName(); /// Sets the name that will be used when the part is serialized. /// /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. /// /// /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it /// has previously serialized. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetPartName([In] IOpcPartUri partUri); /// Gets a new, read-only copy of the stream that is associated with this resource. /// A new, read-only copy of the stream that is associated with this resource. /// /// /// The IStream object returned by this method might return an error of E_PENDING, which indicates that the stream length has /// not been determined yet. This behavior is different from that of a standard IStream object. /// /// /// This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of /// this method will depend on that of the stream's Clone method. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresource-getstream // HRESULT GetStream( IStream **stream ); [MethodImpl(MethodImplOptions.InternalCall)] IStream GetStream(); /// Sets the read-only stream to be associated with this resource. /// The read-only stream to be associated with this resource. /// The part name to be assigned to this resource. /// /// /// The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the /// stream interface's methods. /// /// /// Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient /// cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresource-setcontent // HRESULT SetContent( IStream *sourceStream, IOpcPartUri *partName ); [MethodImpl(MethodImplOptions.InternalCall)] void SetContent([In] IStream sourceStream, [In] IOpcPartUri partName); } /// A collection of IXpsOMColorProfileResource interface pointers. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomcolorprofileresourcecollection [PInvokeData("xpsobjectmodel.h", MSDNShortId = "cb9253f3-461e-47a3-820b-bb6bf5e30210")] [ComImport, Guid("12759630-5FBA-4283-8F7D-CCA849809EDB"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMColorProfileResourceCollection { /// Gets the number of IXpsOMColorProfileResource interface pointers in the collection. /// The number of IXpsOMColorProfileResource interface pointers in the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-getcount // HRESULT GetCount( UINT32 *count ); [MethodImpl(MethodImplOptions.InternalCall)] uint GetCount(); /// Gets an IXpsOMColorProfileResource interface pointer from a specified location in the collection. /// The zero-based index of the IXpsOMColorProfileResource interface pointer to be obtained. /// The IXpsOMColorProfileResource interface pointer at the location specified by index. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-getat // HRESULT GetAt( UINT32 index, IXpsOMColorProfileResource **object ); [MethodImpl(MethodImplOptions.InternalCall)] IXpsOMColorProfileResource GetAt([In] uint index); /// Inserts an IXpsOMColorProfileResource interface pointer at a specified location in the collection. /// /// The zero-based index in the collection where the interface pointer that is passed in object is to be inserted. /// /// /// The IXpsOMColorProfileResource interface pointer that is to be inserted in the location specified by index. /// /// /// /// At the location specified by index, this method inserts the IXpsOMColorProfileResource interface pointer that is passed in /// object. Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-insertat // HRESULT InsertAt( UINT32 index, IXpsOMColorProfileResource *object ); [MethodImpl(MethodImplOptions.InternalCall)] void InsertAt([In] uint index, [In] IXpsOMColorProfileResource @object); /// Removes and releases an IXpsOMColorProfileResource interface pointer from a specified location in the collection. /// /// The zero-based index in the collection from which an IXpsOMColorProfileResource interface pointer is to be removed and released. /// /// /// /// This method releases the interface referenced by the pointer at the location specified by index. After releasing the /// interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-removeat // HRESULT RemoveAt( UINT32 index ); [MethodImpl(MethodImplOptions.InternalCall)] void RemoveAt([In] uint index); /// Replaces an IXpsOMColorProfileResource interface pointer at a specified location in the collection. /// /// The zero-based index in the collection where an IXpsOMColorProfileResource interface pointer is to be replaced. /// /// /// The IXpsOMColorProfileResource interface pointer that will replace current contents at the location specified by index. /// /// /// /// At the location specified by index, this method releases the IXpsOMColorProfileResource interface referenced by the existing /// pointer, then writes the pointer that is passed in object. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-setat // HRESULT SetAt( UINT32 index, IXpsOMColorProfileResource *object ); [MethodImpl(MethodImplOptions.InternalCall)] void SetAt([In] uint index, [In] IXpsOMColorProfileResource @object); /// Appends an IXpsOMColorProfileResource interface pointer to the end of the collection. /// A pointer to the IXpsOMColorProfileResource interface that is to be appended to the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-append // HRESULT Append( IXpsOMColorProfileResource *object ); [MethodImpl(MethodImplOptions.InternalCall)] void Append([In] IXpsOMColorProfileResource @object); /// Gets an IXpsOMColorProfileResource interface pointer from the collection by matching the interface's part name. /// The part name of the IXpsOMColorProfileResource interface to be found in the collection. /// /// A pointer to the IXpsOMColorProfileResource interface whose part name matches partName. If a matching interface is not found /// in the collection, a NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-getbypartname // HRESULT GetByPartName( IOpcPartUri *partName, IXpsOMColorProfileResource **part ); [MethodImpl(MethodImplOptions.InternalCall)] IXpsOMColorProfileResource GetByPartName([In] IOpcPartUri partName); } /// A collection of XPS_DASH structures. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomdashcollection [PInvokeData("xpsobjectmodel.h", MSDNShortId = "02a152a1-e117-42fb-8428-a2b28e6540a9")] [ComImport, Guid("081613F4-74EB-48F2-83B3-37A9CE2D7DC6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMDashCollection { /// Gets the number of XPS_DASH structures in the collection. /// The number of XPS_DASH structures in the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-getcount HRESULT // GetCount( UINT32 *count ); uint GetCount(); /// Gets an XPS_DASH structure from a specified location in the collection. /// The zero-based index in the collection where an XPS_DASH structure is to be obtained. /// The XPS_DASH structure that is found at the location specified by index. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-getat HRESULT GetAt( // UINT32 index, XPS_DASH *dash ); XPS_DASH GetAt([In] uint index); /// Inserts an XPS_DASH structure at a specified location in the collection. /// The zero-based index in the collection where the structure that is referenced by dash is to be inserted. /// A pointer to the XPS_DASH structure that is to be inserted at the location specified by index. /// /// /// At the location specified by index, this method inserts the XPS_DASH structure that is passed in dash. Prior to insertion, /// the structure in this and all subsequent locations is moved up by one index. /// /// The figure that follows illustrates how the collection is changed by the InsertAt method. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-insertat HRESULT // InsertAt( UINT32 index, const XPS_DASH *dash ); void InsertAt([In] uint index, in XPS_DASH dash); /// Removes and frees an XPS_DASH structure from a specified location in the collection. /// The zero-based index in the collection from which an XPS_DASH structure is to be removed and freed. /// /// /// This method removes and frees the XPS_DASH structure referenced by the pointer at the location specified by index. After /// freeing the structure, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. /// /// The figure that follows illustrates how the collection is changed by the RemoveAt method. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-removeat HRESULT // RemoveAt( UINT32 index ); void RemoveAt([In] uint index); /// Replaces an XPS_DASH structure at a specified location in the collection. /// The zero-based index in the collection where an XPS_DASH structure is to be replaced. /// /// A pointer to the XPS_DASH structure that will replace the current contents at the location specified by index. /// /// /// /// At the location specified by index, this method frees the existing XPS_DASH structure then replaces it with the structure /// that is passed in dash. /// /// The figure that follows illustrates how the collection is changed by the SetAt method. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-setat HRESULT SetAt( // UINT32 index, const XPS_DASH *dash ); void SetAt([In] uint index, in XPS_DASH dash); /// Appends an XPS_DASH structure to the end of the collection. /// A pointer to the XPS_DASH structure that is to be appended to the collection. /// The figure that follows illustrates how the collection is changed by the Append method. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-append HRESULT // Append( const XPS_DASH *dash ); void Append(in XPS_DASH dash); } /// The dictionary is used by an XPS package to share resources. /// /// /// The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that are /// derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method. /// /// A dictionary cannot contain duplicate interface pointers. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomdictionary [PInvokeData("xpsobjectmodel.h", MSDNShortId = "f887e3d3-973c-4267-a785-6bc190c13082")] [ComImport, Guid("897C86B8-8EAF-4AE3-BDDE-56419FCF4236"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMDictionary { /// Gets a pointer to the interface that contains the dictionary. /// The IUnknown interface of the interface that contains the dictionary. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getowner HRESULT // GetOwner( IUnknown **owner ); [return: MarshalAs(UnmanagedType.IUnknown)] object GetOwner(); /// Gets the number of entries in the dictionary. /// The number of entries in the dictionary. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getcount HRESULT // GetCount( UINT32 *count ); uint GetCount(); /// /// Gets the IXpsOMShareable interface pointer and the key name string of the entry at a specified index in the dictionary. /// /// The zero-based index of the dictionary entry that is to be obtained. /// The key string that is found at the location specified by index. /// The IXpsOMShareable interface pointer that is found at the location specified by index. /// /// /// The interface pointers that are stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and /// IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the /// IXpsOMShareable::GetType method. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getat HRESULT GetAt( // UINT32 index, LPWSTR *key, IXpsOMShareable **entry ); IXpsOMShareable GetAt([In] uint index, [MarshalAs(UnmanagedType.LPWStr)] out string key); /// Gets the IXpsOMShareable interface pointer of the entry that contains the specified key. /// The entry's key to be found in the dictionary. /// /// The IXpsOMShareable interface pointer to the last entry in the dictionary which is to be searched for key. If beforeEntry is /// NULL or is an interface pointer to an entry that is not in the dictionary, the entire dictionary will be searched. /// /// The interface pointer to the dictionary entry whose key matches key. /// /// The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that /// are derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getbykey HRESULT // GetByKey( LPCWSTR key, IXpsOMShareable *beforeEntry, IXpsOMShareable **entry ); IXpsOMShareable GetByKey([In, MarshalAs(UnmanagedType.LPWStr)] string key, [In] IXpsOMShareable beforeEntry); /// Gets the index of an IXpsOMShareable interface from the dictionary. /// The IXpsOMShareable interface pointer to be found in the dictionary. /// The zero-based index of entry in the dictionary. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getindex HRESULT // GetIndex( IXpsOMShareable *entry, UINT32 *index ); uint GetIndex([In] IXpsOMShareable entry); /// Appends an IXpsOMShareable interface along with its key to the end of the dictionary. /// /// The key to be used for this entry. /// The string referenced by key must be unique in the dictionary. /// /// /// A pointer to the IXpsOMShareable interface that is to be appended to the dictionary. /// /// A dictionary cannot contain duplicate interface pointers. This parameter must contain an interface pointer that is not /// already in the dictionary. /// /// /// /// /// The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that /// are derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method. /// /// The figure that follows illustrates how the dictionary is changed by the Append method. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-append HRESULT Append( // LPCWSTR key, IXpsOMShareable *entry ); void Append([In, MarshalAs(UnmanagedType.LPWStr)] string key, [In] IXpsOMShareable entry); /// /// Inserts an IXpsOMShareable interface at a specified location in the dictionary and sets the key to identify the interface. /// /// The zero-based index in the dictionary where the IXpsOMShareable interface is to be inserted. /// /// The key to be used to identify the IXpsOMShareable interface in the dictionary. /// The string referenced by key must be unique in the dictionary. /// /// /// The IXpsOMShareable interface pointer to be inserted at the location specified by index. /// /// A dictionary cannot contain duplicate interface pointers. This parameter must contain an interface pointer that is not /// already in the dictionary. /// /// /// /// /// The interface pointers stored in the dictionary will usually be pointers to interfaces, such as IXpsOMBrush and /// IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the /// IXpsOMShareable::GetType method. /// /// /// At the location specified by index, this method inserts the IXpsOMShareable interface pointer and sets the key; the /// interface pointer and key are passed in value and key, respectively. Before value and key are inserted, the interface /// pointer and the key at this and all subsequent locations are moved up by one index. /// /// The figure that follows illustrates how the dictionary is changed by the InsertAt method. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-insertat HRESULT // InsertAt( UINT32 index, LPCWSTR key, IXpsOMShareable *entry ); void InsertAt([In] uint index, [In, MarshalAs(UnmanagedType.LPWStr)] string key, [In] IXpsOMShareable entry); /// Removes and releases the entry from a specified location in the dictionary. /// The zero-based index in the dictionary from which an entry is to be removed and released. /// /// /// At the location specified by index, this method releases the interface referenced by the pointer. After releasing the /// interface, this method compacts the dictionary by reducing by 1 the index of each pointer subsequent to index. /// /// The figure that follows illustrates how the dictionary is changed by the RemoveAt method. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-removeat HRESULT // RemoveAt( UINT32 index ); void RemoveAt([In] uint index); /// Replaces the entry at a specified location in the dictionary. /// The zero-based index in the dictionary in which an entry is to be replaced. /// /// The key to be used for the new entry. /// The string referenced by key must be unique in the dictionary. /// /// /// The IXpsOMShareable interface pointer that will replace current contents at the location specified by index. /// /// A dictionary cannot contain duplicate interface pointers. This parameter must contain an interface pointer that is not /// already in the dictionary. /// /// /// /// /// At the location specified by index, this method releases the IXpsOMShareable interface referenced by the existing pointer, /// then replaces it with the interface pointer that is passed in entry and assigns it the key passed in key. /// /// /// The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that /// are derived from the IXpsOMShareable interface. To determine the interface type, call the GetType method. /// /// The figure that follows illustrates how the dictionary is changed by the SetAt method. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-setat HRESULT SetAt( // UINT32 index, LPCWSTR key, IXpsOMShareable *entry ); void SetAt([In] uint index, [In, MarshalAs(UnmanagedType.LPWStr)] string key, [In] IXpsOMShareable entry); /// Makes a deep copy of the interface. /// A pointer to the copy of the interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-clone HRESULT Clone( // IXpsOMDictionary **dictionary ); IXpsOMDictionary Clone(); } /// /// Provides access to the XML content of the resource stream of the DocumentStructure part.The /// IXpsOMDocumentStructureResource interface enables a program to read and replace the XML content of the DocumentStructure part. /// /// /// /// The DocumentStructure part of an XPS document contains the document outline, which, along with the StoryFragments parts, defines /// the reading order of every element that appears in the fixed pages of the document. /// /// /// The reading order of an XPS document is organized into semantic blocks called stories. Stories are logical units of the /// document, in the same way that articles are units in a magazine. Stories are made up of one or more StoryFragments parts; /// StoryFragments parts contain the XML markup that defines the story's semantic blocks, which describe the structure of the /// document's content. Examples of a story's semantic blocks include paragraphs and tables. /// /// The XML markup in the DocumentStructure and StoryFragments parts is described in the XML Paper Specification. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomdocumentstructureresource [PInvokeData("xpsobjectmodel.h", MSDNShortId = "a0cc8748-08b2-4471-9961-603786e983a4")] [ComImport, Guid("85FEBC8A-6B63-48A9-AF07-7064E4ECFF30"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMDocumentStructureResource : IXpsOMResource { /// Gets the name that will be used when the part is serialized. /// /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName /// method), a NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] new IOpcPartUri GetPartName(); /// Sets the name that will be used when the part is serialized. /// /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. /// /// /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it /// has previously serialized. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetPartName([In] IOpcPartUri partUri); /// Gets a pointer to the IXpsOMDocument interface that contains the resource. /// /// A pointer to the IXpsOMDocument interface that contains the resource. If the resource is not part of a document, a NULL /// pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentstructureresource-getowner [MethodImpl(MethodImplOptions.InternalCall)] IXpsOMDocument GetOwner(); /// Gets a new, read-only copy of the stream that is associated with this resource. /// A new, read-only copy of the stream that is associated with this resource. /// /// /// The IStream object returned by this method might return an error of E_PENDING, which indicates that the stream length has /// not been determined yet. This behavior is different from that of a standard IStream object. /// /// For more information about the content of DocumentStructure part, see the XML Paper Specification. /// /// This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of /// this method will depend on that of the stream's Clone method. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentstructureresource-getstream // HRESULT GetStream( IStream **stream ); [MethodImpl(MethodImplOptions.InternalCall)] IStream GetStream(); /// Sets the read-only stream to be associated with this resource. /// The read-only stream to be associated with this resource. /// The part name to be assigned to this resource. /// /// /// The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the /// stream interface's methods. /// /// For more information about the content of DocumentStructure part, see the XML Paper Specification. /// /// Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient /// cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentstructureresource-setcontent // HRESULT SetContent( IStream *sourceStream, IOpcPartUri *partName ); [MethodImpl(MethodImplOptions.InternalCall)] void SetContent([In] IStream sourceStream, [In] IOpcPartUri partName); } /// Provides an IStream interface to a font resource. /// The code example that follows illustrates how to create an instance of this interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomfontresource [PInvokeData("xpsobjectmodel.h", MSDNShortId = "dd0ce1c0-1c04-46a8-9075-93de9b3e3062")] [ComImport, Guid("A8C45708-47D9-4AF4-8D20-33B48C9B8485"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMFontResource : IXpsOMResource { /// Gets the name that will be used when the part is serialized. /// /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName /// method), a NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] new IOpcPartUri GetPartName(); /// Sets the name that will be used when the part is serialized. /// /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. /// /// /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it /// has previously serialized. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetPartName([In] IOpcPartUri partUri); /// Gets a new, read-only copy of the stream that is associated with this resource. /// A new, read-only copy of the stream that is associated with this resource. /// /// /// The IStream object returned by this method might return an error of E_PENDING, which indicates that the stream length has /// not been determined yet. This behavior is different from that of a standard IStream object. /// /// /// This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of /// this method will depend on that of the stream's Clone method. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresource-getstream HRESULT // GetStream( IStream **readerStream ); [MethodImpl(MethodImplOptions.InternalCall)] IStream GetStream(); /// Sets the read-only stream to be associated with this resource. /// The read-only stream to be associated with this resource. /// /// The XPS_FONT_EMBEDDING value that describes how the resource is to be obfuscated. /// /// /// Value /// Meaning /// /// /// XPS_FONT_EMBEDDING_NORMAL /// Font resource is neither obfuscated nor restricted. /// /// /// XPS_FONT_EMBEDDING_OBFUSCATED /// Font resource is obfuscated but not restricted. /// /// /// XPS_FONT_EMBEDDING_RESTRICTED /// Font resource is both obfuscated and restricted. /// /// /// /// The part name to be assigned to this resource. /// /// /// The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the /// stream interface's methods. /// /// /// The stream assigned to this resource should not be obfuscated. Obfuscation of the font resource takes place during serialization. /// /// /// Providing an obfuscated font stream while setting the embeddingOption to XPS_FONT_EMBEDDING_OBFUSCATED will result in a font /// that is not obfuscated in the serialized XPS document. /// /// /// partName resets the part name for this object and is checked against the value of embeddingOption for the proper obfuscation syntax. /// /// /// Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient /// cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresource-setcontent HRESULT // SetContent( IStream *sourceStream, XPS_FONT_EMBEDDING embeddingOption, IOpcPartUri *partName ); [MethodImpl(MethodImplOptions.InternalCall)] void SetContent([In] IStream sourceStream, [In] XPS_FONT_EMBEDDING embeddingOption, [In] IOpcPartUri partName); /// Gets the embedding option that will be applied when the resource is serialized. /// /// The stream's embedding option. /// /// The XPS_FONT_EMBEDDING value describes how the resource is obfuscated. The following possible values are returned in this parameter: /// /// /// /// Value /// Meaning /// /// /// XPS_FONT_EMBEDDING_NORMAL /// Font resource is neither obfuscated nor restricted. /// /// /// XPS_FONT_EMBEDDING_OBFUSCATED /// Font resource is obfuscated but not restricted. /// /// /// XPS_FONT_EMBEDDING_RESTRICTED /// Font resource is both obfuscated and restricted. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresource-getembeddingoption // HRESULT GetEmbeddingOption( XPS_FONT_EMBEDDING *embeddingOption ); [MethodImpl(MethodImplOptions.InternalCall)] XPS_FONT_EMBEDDING GetEmbeddingOption(); } /// A collection of IXpsOMFontResource interface pointers. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomfontresourcecollection [PInvokeData("xpsobjectmodel.h", MSDNShortId = "71153c4c-631b-4f7a-9dd5-8537dcaca150")] [ComImport, Guid("70B4A6BB-88D4-4FA8-AAF9-6D9C596FDBAD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMFontResourceCollection { /// Gets the number of IXpsOMFontResource interface pointers in the collection. /// The number of IXpsOMFontResource interface pointers in the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-getcount // HRESULT GetCount( UINT32 *count ); [MethodImpl(MethodImplOptions.InternalCall)] uint GetCount(); /// Gets an IXpsOMFontResource interface pointer from a specified location in the collection. /// The zero-based index of the IXpsOMFontResource interface pointer to be obtained. /// The IXpsOMFontResource interface pointer at the location specified by index. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-getat // HRESULT GetAt( UINT32 index, IXpsOMFontResource **value ); [MethodImpl(MethodImplOptions.InternalCall)] IXpsOMFontResource GetAt([In] uint index); /// Replaces an IXpsOMFontResource interface pointer at a specified location in the collection. /// The zero-based index in the collection where an IXpsOMFontResource interface pointer is to be replaced. /// /// The IXpsOMFontResource interface pointer that will replace current contents at the location specified by index. /// /// /// /// At the location specified by index, this method releases the IXpsOMFontResource interface referenced by the existing /// pointer, then writes the pointer that is passed in value. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-setat // HRESULT SetAt( UINT32 index, IXpsOMFontResource *value ); [MethodImpl(MethodImplOptions.InternalCall)] void SetAt([In] uint index, [In] IXpsOMFontResource value); /// Inserts an IXpsOMFontResource interface pointer at a specified location in the collection. /// /// The zero-based index in the collection where the interface pointer that is passed in value is to be inserted. /// /// The IXpsOMFontResource interface pointer that is to be inserted at the location specified by index. /// /// /// At the location specified by index, this method inserts the IXpsOMFontResource interface pointer that is passed in value. /// Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-insertat // HRESULT InsertAt( UINT32 index, IXpsOMFontResource *value ); [MethodImpl(MethodImplOptions.InternalCall)] void InsertAt([In] uint index, [In] IXpsOMFontResource value); /// Appends an IXpsOMFontResource interface to the end of the collection. /// A pointer to the IXpsOMFontResource interface that is to be appended to the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-append // HRESULT Append( IXpsOMFontResource *value ); [MethodImpl(MethodImplOptions.InternalCall)] void Append([In] IXpsOMFontResource value); /// Removes and releases an IXpsOMFontResource interface pointer from a specified location in the collection. /// /// The zero-based index in the collection from which an IXpsOMFontResource interface pointer is to be removed and released. /// /// /// /// This method releases the interface referenced by the pointer at the location specified by index. After releasing the /// interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-removeat // HRESULT RemoveAt( UINT32 index ); [MethodImpl(MethodImplOptions.InternalCall)] void RemoveAt([In] uint index); /// Gets an IXpsOMFontResource interface pointer from the collection by matching the interface's part name. /// The part name of the IXpsOMFontResource interface to be found in the collection. /// /// A pointer to the IXpsOMFontResource interface that has the matching part name. If a matching interface is not found in the /// collection, a NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-getbypartname // HRESULT GetByPartName( IOpcPartUri *partName, IXpsOMFontResource **part ); [MethodImpl(MethodImplOptions.InternalCall)] IXpsOMFontResource GetByPartName([In] IOpcPartUri partName); } /// Describes the shape of a path or of a clipping region. /// The code example that follows illustrates how to create an instance of this interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgeometry [PInvokeData("xpsobjectmodel.h", MSDNShortId = "d3f74c1e-49ef-40ee-a2f4-b6d198b57624")] [ComImport, Guid("64FCF3D7-4D58-44BA-AD73-A13AF6492072"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGeometry : IXpsOMShareable { /// Gets the IUnknown interface of the parent. /// A pointer to the IUnknown interface of the parent. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner HRESULT // GetOwner( IUnknown **owner ); [return: MarshalAs(UnmanagedType.IUnknown)] new object GetOwner(); /// Gets the object type of the interface. /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype HRESULT GetType( // XPS_OBJECT_TYPE *type ); new XPS_OBJECT_TYPE GetType(); /// /// Gets a pointer to the geometry's IXpsOMGeometryFigureCollection interface, which contains the collection of figures that /// make up this geometry. /// /// A pointer to the IXpsOMGeometryFigureCollection interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-getfigures HRESULT // GetFigures( IXpsOMGeometryFigureCollection **figures ); IXpsOMGeometryFigureCollection GetFigures(); /// Gets the XPS_FILL_RULE value that describes the fill rule to be used. /// The XPS_FILL_RULE value that describes the fill rule to be used. /// /// For more information about how the file rule determines whether a point is inside the fill region, see XPS_FILL_RULE. /// /// The value that is returned in fillRule corresponds to the FillRule attribute of the PathGeometry element in /// the document markup. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-getfillrule HRESULT // GetFillRule( XPS_FILL_RULE *fillRule ); XPS_FILL_RULE GetFillRule(); /// Sets the XPS_FILL_RULE value that describes the fill rule to be used. /// The XPS_FILL_RULE value that describes the fill rule to be used. /// /// For more information about how the file rule determines whether a point is inside the fill region, see XPS_FILL_RULE. /// In the document markup, this value corresponds to the FillRule attribute of the PathGeometry element. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-setfillrule HRESULT // SetFillRule( XPS_FILL_RULE fillRule ); void SetFillRule([In] XPS_FILL_RULE fillRule); /// /// Gets a pointer to the geometry's IXpsOMMatrixTransform interface, which contains the resolved matrix transform for the geometry. /// /// /// /// A pointer to the geometry's IXpsOMMatrixTransform interface, which contains the resolved matrix transform for the geometry. /// If a matrix transform has not been set, a NULL pointer will be returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. /// /// /// Most recent method called /// Object that is returned in transform /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. /// /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-gettransform HRESULT // GetTransform( IXpsOMMatrixTransform **transform ); IXpsOMMatrixTransform GetTransform(); /// /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared matrix transform for the geometry. /// /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared matrix transform for the geometry. A /// NULL pointer is returned if a local matrix transform has not been set or a matrix transform lookup key has been set. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. /// /// /// Most recent method called /// Object that is returned in transform /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// NULL pointer. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-gettransformlocal HRESULT // GetTransformLocal( IXpsOMMatrixTransform **transform ); IXpsOMMatrixTransform GetTransformLocal(); /// Sets the local, unshared matrix transform. /// /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform for the geometry. /// /// /// /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL /// pointer in the lookup parameter. The table that follows explains the relationship between the local and lookup values of /// this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in transform by GetTransformLocal /// Object that is returned in lookup by GetTransformLookup /// /// /// SetTransformLocal (this method) /// The local transform that is set by SetTransformLocal. /// The local transform that is set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup /// /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-settransformlocal HRESULT // SetTransformLocal( IXpsOMMatrixTransform *transform ); void SetTransformLocal([In] IXpsOMMatrixTransform transform); /// /// Gets the lookup key for the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the geometry. /// The matrix transform is stored in a resource dictionary. /// /// /// /// The lookup key for the IXpsOMMatrixTransform interface in a resource dictionary. A NULL pointer is returned if a /// matrix transform lookup key has not been set or if a local matrix transform has been set. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. /// /// /// Most recent method called /// Object that is returned in lookup /// /// /// SetTransformLocal /// NULL pointer. /// /// /// SetTransformLookup /// The lookup key set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-gettransformlookup HRESULT // GetTransformLookup( LPWSTR *lookup ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetTransformLookup(); /// Sets the lookup key name of a shared matrix transform in a resource dictionary. /// The key name of the shared matrix transform in the resource dictionary. /// /// /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL /// pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of /// this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in transform by GetTransformLocal /// Object that is returned in lookup by GetTransformLookup /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// The local transform that is set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup (this method) /// /// The shared transform retrieved, with a lookup key that matches the key set by SetTransformLookup, from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-settransformlookup HRESULT // SetTransformLookup( LPCWSTR lookup ); void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string lookup); /// Makes a deep copy of the interface. /// A pointer to the copy of the interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-clone HRESULT Clone( // IXpsOMGeometry **geometry ); IXpsOMGeometry Clone(); } /// Describes one portion of the path or clipping region that is specified by an IXpsOMGeometry interface. /// /// The IXpsOMGeometryFigure corresponds to the PathFigure element in XPS markup. /// The code example that follows illustrates how to create an instance of this interface. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgeometryfigure [PInvokeData("xpsobjectmodel.h", MSDNShortId = "e76a14ce-cfc3-4a50-855e-f5779b9fc261")] [ComImport, Guid("D410DC83-908C-443E-8947-B1795D3C165A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGeometryFigure { /// Gets a pointer to the IXpsOMGeometry interface that contains the geometry figure. /// /// A pointer to the IXpsOMGeometry interface that contains the geometry figure. If the interface is not assigned to a geometry, /// a NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getowner HRESULT // GetOwner( IXpsOMGeometry **owner ); IXpsOMGeometry GetOwner(); /// Gets the segment data points for the geometry figure. /// /// The size of the array referenced by the segmentData parameter. /// /// If the method returns successfully, dataCount will contain the number of elements returned in the array that is referenced /// by segmentData. /// /// If segmentData is set to NULL when the method is called, dataCount must be set to zero. /// /// If a NULL pointer is returned in segmentData, dataCount will contain the required buffer size as the number of elements. /// /// /// /// /// The address of an array that has the same number of elements as specified in dataCount. This value can be set to NULL /// if the caller requires that the method return only the required buffer size in dataCount. /// /// /// If the array is large enough, this method copies the segment data points into the array and returns, in dataCount, the /// number of data points that are copied. If segmentData is set to NULL or references a buffer that is not large enough, /// a NULL pointer will be returned, no data will be copied, and dataCount will contain the required buffer size /// specified as the number of elements. /// /// /// /// To determine the required size of the segment data array before calling this method, call GetSegmentDataCount. /// /// A geometry segment is described by the start point, the segment type, and additional parameters whose values are determined /// by the segment type. The coordinates for the start point of the first segment are a property of the geometry figure and are /// set by calling SetStartPoint. The start point of each subsequent segment is the end point of the preceding segment. /// /// /// The values in the array returned in the segmentData parameter will correspond with the XPS_SEGMENT_TYPE values in the array /// returned by the GetSegmentTypes method in the segmentTypes parameter. To read the segment data values correctly, you will /// need to know the type of each segment in the geometry figure. For example, if the first line segment has a segment type /// value of XPS_SEGMENT_TYPE_LINE, the first two data values in the segmentData array will be the x and y coordinates of /// the end point of that segment; if the next segment has a segment type value of XPS_SEGMENT_TYPE_BEZIER, the next six /// values in the segmentData array will describe the characteristics of that segment; and so on for each line segment in the /// geometry figure. /// /// /// The table that follows describes the specific set of data values that are returned for each segment type. For an example of /// how to access this data in a program, see the code example that follows. /// /// /// /// Segment type /// Required data values /// /// /// XPS_SEGMENT_TYPE_LINE /// Two data values: x-coordinate of the segment line's end point. y-coordinate of the segment line's end point. /// /// /// XPS_SEGMENT_TYPE_ARC_LARGE_CLOCKWISE /// /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius /// along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. /// /// /// /// XPS_SEGMENT_TYPE_ARC_SMALL_CLOCKWISE /// /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius /// along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. /// /// /// /// XPS_SEGMENT_TYPE_ARC_LARGE_COUNTERCLOCKWISE /// /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius /// along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. /// /// /// /// XPS_SEGMENT_TYPE_ARC_SMALL_COUNTERCLOCKWISE /// /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius /// along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. /// /// /// /// XPS_SEGMENT_TYPE_BEZIER /// /// Six data values: x-coordinate of the Bezier curve's first control point. y-coordinate of the Bezier curve's first control /// point. x-coordinate of the Bezier curve's second control point. y-coordinate of the Bezier curve's second control point. /// x-coordinate of the Bezier curve's end point. y-coordinate of the Bezier curve's end point. /// /// /// /// XPS_SEGMENT_TYPE_QUADRATIC_BEZIER /// /// Four data values: x-coordinate of the Quad Bezier curve's control point. y-coordinate of the Quad Bezier curve's control /// point. x-coordinate of the Quad Bezier curve's end point. y-coordinate of the Quad Bezier curve's end point. /// /// /// /// The following code example accesses the different data points of each segment type in a geometry figure. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentdata // HRESULT GetSegmentData( UINT32 *dataCount, FLOAT *segmentData ); void GetSegmentData([In, Out] ref uint dataCount, [In, Out] float[] segmentData); /// Gets the types of segments in the figure. /// /// The size of the array that is referenced by segmentTypes (see below). This parameter must not be NULL. /// /// If the method returns successfully, segmentCount will contain the number of elements that are returned in the array /// referenced by segmentTypes. /// /// If segmentTypes is NULL when the method is called, segmentCount must be set to zero. /// /// If a NULL pointer is returned in segmentTypes, the value of segmentCount will contain the required buffer size, /// specified as the number of elements. /// /// /// /// /// An array of XPS_SEGMENT_TYPE values that has the same number of elements as specified in segmentCount. If the caller /// requires that only the specified buffer size be returned, set this value to NULL. /// /// /// If the array is large enough, this method will copy the XPS_SEGMENT_TYPE values into the array and return, in segmentCount, /// the number of the copied values. If segmentTypes is NULL or references a buffer that is not large enough, a /// NULL pointer will be returned, no data will be copied, and segmentCount will contain the required buffer size, which /// is specified as the number of elements. /// /// /// For an example of how to use this method in a program, see the code example in GetSegmentData. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmenttypes // HRESULT GetSegmentTypes( UINT32 *segmentCount, XPS_SEGMENT_TYPE *segmentTypes ); void GetSegmentTypes([In, Out] ref uint segmentCount, [In, Out] XPS_SEGMENT_TYPE[] segmentTypes); /// Gets stroke definitions for the figure's segments. /// /// The size of the array that is referenced by segmentStrokes. This parameter must not be NULL. /// /// If the method returns successfully, segmentCount will contain the number of elements that are returned in the array /// referenced by segmentStrokes. /// /// If segmentStrokes is NULL when the method is called, segmentCount must be set to zero. /// /// If a NULL pointer is returned in segmentStrokes, the value of segmentCount will contain the required buffer size, /// specified as the number of elements. /// /// /// /// /// An array that has the same number of elements as specified in segmentCount. If the caller requires that this method return /// only the required buffer size, set this value to NULL. /// /// /// If the array is large enough, this method copies the segment stroke values into the array and returns, in segmentCount, the /// number of copied segment stroke values. If segmentData is NULL or references a buffer that is not large enough, a /// NULL pointer will be returned, no data will be copied, and segmentCount will contain the required buffer size that is /// specified as the number of elements. /// /// The following table shows the possible values of an element in the array that is referenced by segmentStrokes. /// /// /// Value /// Meaning /// /// /// TRUE /// The segment is stroked. /// /// /// FALSE /// The segment is not stroked. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentstrokes // HRESULT GetSegmentStrokes( UINT32 *segmentCount, BOOL *segmentStrokes ); void GetSegmentStrokes([In, Out] ref uint segmentCount, [In, Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Bool)] bool[] segmentStrokes); /// Sets the segment information and data points for segments in the figure. /// /// The number of segments. /// This value is also the number of elements in the arrays that are referenced by segmentTypes and segmentStrokes. /// /// /// The number of segment data points. /// This value is also the number of elements in the array that is referenced by segmentData. /// /// /// An array of XPS_SEGMENT_TYPE variables. The value of segmentCount specifies the number of elements in this array. /// /// /// An array of segment data values. The value of segmentDataCount specifies the number of elements in this array. /// /// /// An array of segment stroke values. The value of segmentCount specifies the number of elements in this array. /// /// /// /// A geometry segment is described by the start point, the segment type, and additional parameters whose values are determined /// by the segment type. The coordinates for the start point of the first segment are a property of the geometry figure and are /// set by calling SetStartPoint. The start point of each subsequent segment is the end point of the preceding segment. /// /// /// The number of data values that define a line segment depends on the segment type. The table that follows describes the /// specific set of required data values that must be used for each segment type. The values in the segment data array that is /// passed in the segmentData parameter must correspond with the XPS_SEGMENT_TYPE values in the array that is passed in the /// segmentTypes parameter. For example, if the first line segment has a segment type value of XPS_SEGMENT_TYPE_LINE, the /// first two data values in the segmentData array will be the x and y coordinates of the end point of that segment; if the next /// segment has a segment type value of XPS_SEGMENT_TYPE_BEZIER, the next six values in the segmentData array will /// describe the characteristics of that segment; and so on for each line segment in the geometry figure. /// /// /// /// Segment type /// Required data values /// /// /// XPS_SEGMENT_TYPE_LINE /// Two data values: x-coordinate of the segment line's end point. y-coordinate of the segment line's end point. /// /// /// XPS_SEGMENT_TYPE_ARC_LARGE_CLOCKWISE /// /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius /// along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. /// /// /// /// XPS_SEGMENT_TYPE_ARC_SMALL_CLOCKWISE /// /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius /// along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. /// /// /// /// XPS_SEGMENT_TYPE_ARC_LARGE_COUNTERCLOCKWISE /// /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius /// along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. /// /// /// /// XPS_SEGMENT_TYPE_ARC_SMALL_COUNTERCLOCKWISE /// /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius /// along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. /// /// /// /// XPS_SEGMENT_TYPE_BEZIER /// /// Six data values: x-coordinate of the Bezier curve's first control point. y-coordinate of the Bezier curve's first control /// point. x-coordinate of the Bezier curve's second control point. y-coordinate of the Bezier curve's second control point. /// x-coordinate of the Bezier curve's end point. y-coordinate of the Bezier curve's end point. /// /// /// /// XPS_SEGMENT_TYPE_QUADRATIC_BEZIER /// /// Four data values: x-coordinate of the Quad Bezier curve's control point. y-coordinate of the Quad Bezier curve's control /// point. x-coordinate of the Quad Bezier curve's end point. y-coordinate of the Quad Bezier curve's end point. /// /// /// /// To get the segment types in the figure, call GetSegmentTypes. /// The following code examples demonstrate one way to create and populate the buffers required by SetSegments. /// /// In the first code example, the AddSegmentDataToArrays method takes the data points that describe a single segment and /// stores them in the three different data buffers required by the SetSegments method. The data buffers that are passed /// as arguments to AddSegmentDataToArrays are managed by the calling method as shown in the code example that follows AddSegmentDataToArrays. /// /// /// In this code example, UpdateSegmentData creates the data buffers required by the SetSegments method and calls /// the AddSegmentDataToArrays method from the preceding code example to populate them with the segment data. After the /// buffers have been populated, SetSegments is called to add this data to the geometry figure. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setsegments HRESULT // SetSegments( UINT32 segmentCount, UINT32 segmentDataCount, const XPS_SEGMENT_TYPE *segmentTypes, const FLOAT *segmentData, // const BOOL *segmentStrokes ); void SetSegments([In] uint segmentCount, [In] uint segmentDataCount, [In] XPS_SEGMENT_TYPE[] segmentTypes, [In] float[] segmentData, [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Bool)] bool[] segmentStrokes); /// Gets the starting point of the figure. /// The coordinates of the starting point of the figure. /// /// In the document markup, the value returned in startPoint corresponds to that of the StartPoint attribute of the /// PathFigure element. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getstartpoint // HRESULT GetStartPoint( XPS_POINT *startPoint ); XPS_POINT GetStartPoint(); /// Sets the starting point of the figure. /// The coordinates of the starting point of the figure. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setstartpoint // HRESULT SetStartPoint( const XPS_POINT *startPoint ); void SetStartPoint(in XPS_POINT startPoint); /// Gets a value that indicates whether the figure is closed. /// /// The Boolean value that indicates whether the figure is closed. /// /// /// Value /// Meaning /// /// /// TRUE /// /// The figure is closed. The line segment between the start and end points of the figure will be stroked to close the shape. /// /// /// /// FALSE /// The figure is open. No line segment will be stroked between the start and end points of the figure. /// /// /// /// /// This value only applies if the PathFigure attribute is used in the Path element that specifies a stroke. /// A closed figure adds a line segment between the start point and the end point of the figure to close the shape. /// This value corresponds to that of the IsClosed element of the PathFigure element in the document markup. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getisclosed HRESULT // GetIsClosed( BOOL *isClosed ); [return: MarshalAs(UnmanagedType.Bool)] bool GetIsClosed(); /// Sets a value that indicates whether the figure is closed. /// /// The value to be set. /// /// /// Value /// Meaning /// /// /// TRUE /// The figure is closed. A line segment between the start point and the last point defined in the figure will be stroked. /// /// /// FALSE /// The figure is open. There is no line segment between the start point and the last point defined in the figure. /// /// /// /// /// This value only applies if the PathFigure attribute is used in the Path element that specifies a stroke. /// A closed figure adds a line segment between the start point and the end point of the figure to close the shape. /// This value corresponds to that of the IsClosed element of the PathFigure element in the document markup. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setisclosed HRESULT // SetIsClosed( BOOL isClosed ); void SetIsClosed([In, MarshalAs(UnmanagedType.Bool)] bool isClosed); /// Gets a value that indicates whether the figure is filled. /// /// The Boolean value that indicates whether the figure is filled. /// /// /// Value /// Meaning /// /// /// TRUE /// The figure is filled by a brush. /// /// /// FALSE /// The figure is not filled. /// /// /// /// /// This value corresponds to that of the IsFilled attribute of the PathFigure element in the document markup. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getisfilled HRESULT // GetIsFilled( BOOL *isFilled ); [return: MarshalAs(UnmanagedType.Bool)] bool GetIsFilled(); /// Sets a value that indicates whether the figure is filled. /// /// The value to be set. /// /// /// Value /// Meaning /// /// /// TRUE /// The figure is filled by a brush. /// /// /// FALSE /// The figure is not filled. /// /// /// /// /// In the document markup, the value returned in isFilled corresponds to that of the IsFilled attribute of the /// PathFigure element. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setisfilled HRESULT // SetIsFilled( BOOL isFilled ); void SetIsFilled([In, MarshalAs(UnmanagedType.Bool)] bool isFilled); /// Gets the number of segments in the figure. /// The number of segments in the figure. /// For an example of how to use this method in a program, see the code example in GetSegmentData. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentcount // HRESULT GetSegmentCount( UINT32 *segmentCount ); uint GetSegmentCount(); /// Gets the number of segment data points in the figure. /// The number of segment data points. segmentDataCount must not be NULL when the method is called. /// /// To get the segment data points, call GetSegmentData. /// For an example of how to use this method in a program, see the code example in GetSegmentData. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentdatacount // HRESULT GetSegmentDataCount( UINT32 *segmentDataCount ); uint GetSegmentDataCount(); /// Gets the XPS_SEGMENT_STROKE_PATTERN value that indicates whether the segments in the figure are stroked. /// The XPS_SEGMENT_STROKE_PATTERN value that indicates whether the segments in the figure are stroked. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentstrokepattern // HRESULT GetSegmentStrokePattern( XPS_SEGMENT_STROKE_PATTERN *segmentStrokePattern ); XPS_SEGMENT_STROKE_PATTERN GetSegmentStrokePattern(); /// Makes a deep copy of the interface. /// A pointer to the copy of the interface. /// The owner of the copy is NULL. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-clone HRESULT Clone( // IXpsOMGeometryFigure **geometryFigure ); IXpsOMGeometryFigure Clone(); } /// A collection of IXpsOMGeometryFigure interface pointers. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgeometryfigurecollection [PInvokeData("xpsobjectmodel.h", MSDNShortId = "24ed79ff-9160-4e9b-b322-c538b30f113b")] [ComImport, Guid("FD48C3F3-A58E-4B5A-8826-1DE54ABE72B2"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGeometryFigureCollection { /// Gets the number of IXpsOMGeometryFigure interface pointers in the collection. /// The number of IXpsOMGeometryFigure interface pointers in the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-getcount // HRESULT GetCount( UINT32 *count ); uint GetCount(); /// Gets an IXpsOMGeometryFigure interface pointer from a specified location in the collection. /// The zero-based index of the IXpsOMGeometryFigure interface pointer to be obtained. /// The IXpsOMGeometryFigure interface pointer at the location specified by index. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-getat // HRESULT GetAt( UINT32 index, IXpsOMGeometryFigure **geometryFigure ); IXpsOMGeometryFigure GetAt([In] uint index); /// Inserts an IXpsOMGeometryFigure interface pointer at a specified location in the collection. /// /// The zero-based index in the collection where the interface pointer that is passed in geometryFigure is to be inserted. /// /// /// The IXpsOMGeometryFigure interface pointer that is to be inserted at the location specified by index. /// /// /// /// At the location specified by index, this method inserts the IXpsOMGeometryFigure interface pointer that is passed in /// geometryFigure. Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-insertat // HRESULT InsertAt( UINT32 index, IXpsOMGeometryFigure *geometryFigure ); void InsertAt([In] uint index, [In] IXpsOMGeometryFigure geometryFigure); /// Removes and releases an IXpsOMGeometryFigure interface pointer from a specified location in the collection. /// /// The zero-based index in the collection from which an IXpsOMGeometryFigure interface pointer is to be removed and released. /// /// /// /// This method releases the interface referenced by the pointer at the location specified by index. After releasing the /// interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-removeat // HRESULT RemoveAt( UINT32 index ); void RemoveAt([In] uint index); /// Replaces an IXpsOMGeometryFigure interface pointer at a specified location in the collection. /// The zero-based index in the collection where an IXpsOMGeometryFigure interface pointer is to be replaced. /// /// The IXpsOMGeometryFigure interface pointer that will replace current contents at the location specified by index. /// /// /// /// At the location specified by index, this method releases the IXpsOMGeometryFigure interface referenced by the existing /// pointer, then writes the pointer that is passed in geometryFigure. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-setat // HRESULT SetAt( UINT32 index, IXpsOMGeometryFigure *geometryFigure ); void SetAt([In] uint index, [In] IXpsOMGeometryFigure geometryFigure); /// Appends an IXpsOMGeometryFigure interface to the end of the collection. /// A pointer to the IXpsOMGeometryFigure interface that is to be appended to the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-append // HRESULT Append( IXpsOMGeometryFigure *geometryFigure ); void Append([In] IXpsOMGeometryFigure geometryFigure); } /// /// Describes the text that appears on a page. /// The IXpsOMGlyphsEditor interface is used to modify the text that is described by this interface. /// /// The code example that follows illustrates how to create an instance of this interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomglyphs [PInvokeData("xpsobjectmodel.h", MSDNShortId = "6d2cda65-c719-46f2-97c9-8aee7b5f84b9")] [ComImport, Guid("819B3199-0A5A-4B64-BEC7-A9E17E780DE2"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGlyphs : IXpsOMVisual { /// Gets the IUnknown interface of the parent. /// A pointer to the IUnknown interface of the parent. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner HRESULT // GetOwner( IUnknown **owner ); [return: MarshalAs(UnmanagedType.IUnknown)] new object GetOwner(); /// Gets the object type of the interface. /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype HRESULT GetType( // XPS_OBJECT_TYPE *type ); new XPS_OBJECT_TYPE GetType(); /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. If a matrix transform /// has not been set, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. /// /// /// Most recent method called /// Object that is returned in matrixTransform /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the /// resource directory. /// /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransform HRESULT // GetTransform( IXpsOMMatrixTransform **matrixTransform ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMMatrixTransform GetTransform(); /// /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. /// /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the /// visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL /// pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in matrixTransform /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// NULL pointer. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlocal HRESULT // GetTransformLocal( IXpsOMMatrixTransform **matrixTransform ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMMatrixTransform GetTransformLocal(); /// Sets the local, unshared matrix transform. /// /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. A NULL pointer /// releases the previously assigned transform. /// /// /// /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL /// pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in matrixTransform by GetTransformLocal /// Object that is returned in key by GetTransformLookup /// /// /// SetTransformLocal (this method) /// The local transform that is set by SetTransformLocal. /// The local transform set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup /// /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the /// resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlocal HRESULT // SetTransformLocal( IXpsOMMatrixTransform *matrixTransform ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetTransformLocal([In] IXpsOMMatrixTransform matrixTransform); /// /// Gets the lookup key name of the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix /// transform for the visual. /// /// /// /// The lookup key name for the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix /// transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a /// NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in key /// /// /// SetTransformLocal /// NULL pointer. /// /// /// SetTransformLookup /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlookup HRESULT // GetTransformLookup( LPWSTR *key ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetTransformLookup(); /// Sets the lookup key name of a shared matrix transform in a resource dictionary. /// The lookup key name of the matrix transform in the dictionary. /// /// /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL /// pointer in the matrixTransform parameter. The table that follows explains the relationship between the local and lookup /// values of this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in matrixTransform by GetTransformLocal /// Object that is returned in key by GetTransformLookup /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// The local transform that is set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup (this method) /// /// The shared transform that gets retrieved—with a lookup key that matches the key that is set by SetTransformLookup—from the /// resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlookup HRESULT // SetTransformLookup( LPCWSTR key ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// /// Gets a pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. /// /// /// /// A pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. If the clip /// geometry has not been set, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the geometry. /// /// /// Most recent method called /// Object that is returned in clipGeometry /// /// /// SetClipGeometryLocal /// The local clip geometry that is set by SetClipGeometryLocal. /// /// /// SetClipGeometryLookup /// /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, /// from the resource directory. /// /// /// /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometry HRESULT // GetClipGeometry( IXpsOMGeometry **clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMGeometry GetClipGeometry(); /// /// Gets a pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. /// /// /// /// A pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. If a /// clip geometry lookup key has been set, or if a local clip geometry has not been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in clipGeometry /// /// /// SetClipGeometryLocal /// The local clip geometry that is set by SetClipGeometryLocal. /// /// /// SetClipGeometryLookup /// NULL pointer. /// /// /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylocal HRESULT // GetClipGeometryLocal( IXpsOMGeometry **clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMGeometry GetClipGeometryLocal(); /// Sets the local, unshared clipping region for the visual. /// /// A pointer to the IXpsOMGeometry interface to be set as the local, unshared clipping region for the visual. A NULL /// pointer releases the previously assigned geometry interface. /// /// /// /// After you call SetClipGeometryLocal, the clip geometry lookup key is released and GetClipGeometryLookup returns a /// NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup /// values of this property. /// /// /// /// Most recent method called /// Object that is returned in clipGeometry by GetClipGeometry /// Object that is returned in clipGeometry by GetClipGeometryLocal /// String that is returned in key by GetClipGeometryLookup /// /// /// SetClipGeometryLocal (this method) /// The local clip geometry that is set by SetClipGeometryLocal. /// The local clip geometry that is set by SetClipGeometryLocal. /// NULL pointer. /// /// /// SetClipGeometryLookup /// /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, /// from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetClipGeometryLookup. /// /// /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylocal HRESULT // SetClipGeometryLocal( IXpsOMGeometry *clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetClipGeometryLocal([In] IXpsOMGeometry clipGeometry); /// /// Gets the lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. /// /// /// /// The lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. If a /// lookup key for the clip geometry has not been set, or if a local clip geometry has been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Lookup key string that is returned in key /// /// /// SetClipGeometryLocal /// NULL pointer. /// /// /// SetClipGeometryLookup /// The lookup key that is set by SetClipGeometryLookup. /// /// /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylookup // HRESULT GetClipGeometryLookup( LPWSTR *key ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetClipGeometryLookup(); /// Sets the lookup key name of a shared clip geometry in a resource dictionary. /// /// The lookup key name of the clip geometry in the dictionary. A NULL pointer clears the previously assigned key name. /// /// /// /// After you call SetClipGeometryLookup, the local clip geometry is released and GetClipGeometryLocal returns a /// NULL pointer in the clipGeometry parameter. The table that follows explains the relationship between the local and /// lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in clipGeometry by GetClipGeometry /// Object that is returned in clipGeometry by GetClipGeometryLocal /// String that is returned in key by GetClipGeometryLookup /// /// /// SetClipGeometryLocal /// The local clip geometry that is set by SetClipGeometryLocal. /// The local clip geometry that is set by SetClipGeometryLocal. /// NULL pointer. /// /// /// SetClipGeometryLookup (this method) /// /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, /// from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetClipGeometryLookup. /// /// /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylookup // HRESULT SetClipGeometryLookup( LPCWSTR key ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetClipGeometryLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// Gets the opacity value of this visual. /// The opacity value. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacity HRESULT // GetOpacity( FLOAT *opacity ); [MethodImpl(MethodImplOptions.InternalCall)] new float GetOpacity(); /// Sets the opacity value of the visual. /// /// The opacity value to be set for the visual. /// /// The range of allowed values for this parameter is 0.0 to 1.0; with 0.0 the visual is completely transparent, and with 1.0 it /// is completely opaque. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacity HRESULT // SetOpacity( FLOAT opacity ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetOpacity([In] float opacity); /// Gets a pointer to the IXpsOMBrush interface of the visual's opacity mask brush. /// /// /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush has not been set for /// this visual, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the brush. /// /// /// Most recent method called /// Object that is returned in opacityMaskBrush /// /// /// SetOpacityMaskBrushLocal /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// /// /// SetOpacityMaskBrushLookup /// /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by /// SetOpacityMaskBrushLookup, from the resource directory. /// /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrush HRESULT // GetOpacityMaskBrush( IXpsOMBrush **opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMBrush GetOpacityMaskBrush(); /// Gets the local, unshared opacity mask brush for the visual. /// /// /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush lookup key has been set, /// or if a local opacity mask brush has not been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in opacityMaskBrush /// /// /// SetOpacityMaskBrushLocal /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// /// /// SetOpacityMaskBrushLookup /// NULL pointer. /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlocal // HRESULT GetOpacityMaskBrushLocal( IXpsOMBrush **opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] new IXpsOMBrush GetOpacityMaskBrushLocal(); /// Sets the IXpsOMBrush interface pointer as the local, unshared opacity mask brush. /// /// A pointer to the IXpsOMBrush interface to be set as the local, unshared opacity mask brush. A NULL pointer clears the /// previously assigned opacity mask brush. /// /// /// /// After you call SetOpacityMaskBrushLocal, the opacity mask brush lookup key is released and GetOpacityMaskBrushLookup /// returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and /// lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal /// String that is returned in key by GetOpacityMaskBrushLookup /// /// /// SetOpacityMaskBrushLocal (this method) /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// NULL pointer. /// /// /// SetOpacityMaskBrushLookup /// /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by /// SetOpacityMaskBrushLookup, from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetOpacityMaskBrushLookup. /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlocal // HRESULT SetOpacityMaskBrushLocal( IXpsOMBrush *opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetOpacityMaskBrushLocal([In] IXpsOMBrush opacityMaskBrush); /// Gets the name of the lookup key of the shared opacity mask brush in a resource dictionary. /// /// /// The name of the lookup key of the shared opacity mask brush in a resource dictionary. If the lookup key of an opacity mask /// brush has not been set, or if a local opacity mask brush has been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in key /// /// /// SetOpacityMaskBrushLocal /// NULL pointer. /// /// /// SetOpacityMaskBrushLookup /// The lookup key that is set by SetOpacityMaskBrushLookup. /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlookup // HRESULT GetOpacityMaskBrushLookup( LPWSTR *key ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetOpacityMaskBrushLookup(); /// Sets the lookup key name of a shared opacity mask brush in a resource dictionary. /// /// The lookup key name of the opacity mask brush in the dictionary. A NULL pointer clears the previously assigned key name. /// /// /// /// After you call SetOpacityMaskBrushLookup, the local opacity mask brush is released and GetOpacityMaskBrushLocal /// returns a NULL pointer in the opacityMaskBrush parameter. The table that follows explains the relationship between /// the local and lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal /// String that is returned in key by GetOpacityMaskBrushLookup /// /// /// SetOpacityMaskBrushLocal /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. /// NULL pointer. /// /// /// SetOpacityMaskBrushLookup (this method) /// /// The shared opacity mask brush that gets retrieved—with a lookup key that matches the key that is set by /// SetOpacityMaskBrushLookup—from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetOpacityMaskBrushLookup. /// /// /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlookup // HRESULT SetOpacityMaskBrushLookup( LPCWSTR key ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetOpacityMaskBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// Gets the Name property of the visual. /// The Name property string. If the Name property has not been set, a NULL pointer is returned. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getname HRESULT GetName( // LPWSTR *name ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetName(); /// Sets the Name property of the visual. /// The name of the visual. A NULL pointer clears the Name property. /// /// Names must be unique. /// /// Clearing the Name property by passing a NULL pointer in name sets the IsHyperlinkTarget property to FALSE. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setname HRESULT SetName( // LPCWSTR name ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetName([In, MarshalAs(UnmanagedType.LPWStr)] string name); /// Gets a value that indicates whether the visual is the target of a hyperlink. /// /// The Boolean value that indicates whether the visual is the target of a hyperlink. /// /// /// Value /// Meaning /// /// /// TRUE /// The visual is the target of a hyperlink. /// /// /// FALSE /// The visual is not the target of a hyperlink. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getishyperlinktarget HRESULT // GetIsHyperlinkTarget( BOOL *isHyperlink ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Bool)] new bool GetIsHyperlinkTarget(); /// Specifies whether the visual is the target of a hyperlink. /// /// The Boolean value that specifies whether the visual is the target of a hyperlink. /// /// /// Value /// Meaning /// /// /// TRUE /// The visual is the target of a hyperlink. /// /// /// FALSE /// The visual is not the target of a hyperlink. /// /// /// /// The visual must be named before it can be set as the target of a hyperlink. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setishyperlinktarget HRESULT // SetIsHyperlinkTarget( BOOL isHyperlink ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetIsHyperlinkTarget([In, MarshalAs(UnmanagedType.Bool)] bool isHyperlink); /// Gets a pointer to the IUri interface to which this visual object links. /// /// A pointer to the IUri interface that contains the destination URI for the link. If a URI has not been set for this object, a /// NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gethyperlinknavigateuri // HRESULT GetHyperlinkNavigateUri( IUri **hyperlinkUri ); [MethodImpl(MethodImplOptions.InternalCall)] new IUri GetHyperlinkNavigateUri(); /// Sets the destination URI of the visual's hyperlink. /// The IUri interface that contains the destination URI of the visual's hyperlink. /// /// Setting an object's URI makes the object a hyperlink. When activated or clicked, the object will navigate to the destination /// that is specified by the URI in hyperlinkUri. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-sethyperlinknavigateuri // HRESULT SetHyperlinkNavigateUri( IUri *hyperlinkUri ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetHyperlinkNavigateUri([In] IUri hyperlinkUri); /// Gets the Language property of the visual and of its contents. /// /// The language string that specifies the language of the page. If a language has not been set, a NULL pointer is returned. /// /// /// The Language property that is set by this method specifies the language of the resource content. /// Internet Engineering Task Force (IETF) RFC 3066 specifies the recommended encoding for the Language property. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getlanguage HRESULT // GetLanguage( LPWSTR *language ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] new string GetLanguage(); /// Sets the Language property of the visual. /// /// The language string that specifies the language of the visual and of its contents. A NULL pointer clears the /// Language property. /// /// /// The recommended encoding for the Language property is specified in Internet Engineering Task Force (IETF) RFC 3066r. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setlanguage HRESULT // SetLanguage( LPCWSTR language ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetLanguage([In, MarshalAs(UnmanagedType.LPWStr)] string language); /// Gets the text in unescaped UTF-16 scalar values. /// The UTF-16 Unicode string of the text to be displayed. If the string is empty, a NULL pointer is returned. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getunicodestring HRESULT // GetUnicodeString( LPWSTR *unicodeString ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetUnicodeString(); /// Gets the number of Glyph indices. /// The number of glyph indices. /// GetGlyphIndices gets the glyph indices. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphindexcount HRESULT // GetGlyphIndexCount( UINT32 *indexCount ); uint GetGlyphIndexCount(); /// Gets an array of XPS_GLYPH_INDEX structures that describe the specific glyph indices in the font. /// /// The number of XPS_GLYPH_INDEX structures that will fit in the array that is referenced by glyphIndices. When the method /// returns, indexCount will contain the number of XPS_GLYPH_INDEX structures that are returned in the array referenced /// by glyphIndices. /// /// The address of an array of XPS_GLYPH_INDEX structures that receive the glyph indices. /// /// GetGlyphIndexCount gets the number of elements in the glyph index array. /// /// The glyph indices override the default cmap mapping from the UnicodeString to the glyph index. The /// XPS_GLYPH_INDEX structure also contains advance width as well as vertical and horizontal offset information. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphindices HRESULT // GetGlyphIndices( UINT32 *indexCount, XPS_GLYPH_INDEX *glyphIndices ); void GetGlyphIndices(ref uint indexCount, [In, Out] XPS_GLYPH_INDEX[] glyphIndices); /// Gets the number of glyph mappings. /// The number of glyph mappings. /// GetGlyphMappings gets the glyph mappings. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphmappingcount HRESULT // GetGlyphMappingCount( UINT32 *glyphMappingCount ); uint GetGlyphMappingCount(); /// /// Gets an array of XPS_GLYPH_MAPPING structures that describe how to map UTF-16 scalar values to entries in the array of /// XPS_GLYPH_INDEX structures, which is returned by GetGlyphIndices. /// /// /// The number of XPS_GLYPH_MAPPING structures that will fit in the array referenced by glyphMappings. When the method returns, /// glyphMappingCount contains the number of values returned in the array referenced by glyphMappings. /// /// An array of XPS_GLYPH_MAPPING structures that contain the glyph mapping values. /// GetGlyphMappingCount gets the number of glyph mappings. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphmappings HRESULT // GetGlyphMappings( UINT32 *glyphMappingCount, XPS_GLYPH_MAPPING *glyphMappings ); void GetGlyphMappings(ref uint glyphMappingCount, [In, Out] XPS_GLYPH_MAPPING[] glyphMappings); /// Gets the number of prohibited caret stops. /// The number of prohibited caret stops. /// /// GetProhibitedCaretStops gets the prohibited caret stops. /// /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the /// location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the /// first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any /// unspecified index is a valid caret stop location. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getprohibitedcaretstopcount // HRESULT GetProhibitedCaretStopCount( UINT32 *prohibitedCaretStopCount ); uint GetProhibitedCaretStopCount(); /// Gets an array of prohibited caret stop locations. /// /// The number of prohibited caret stop locations that will fit in the array referenced by prohibitedCaretStops. When the method /// returns, prohibitedCaretStopCount will contain the number of values returned in the array referenced by prohibitedCaretStops. /// /// /// An array of prohibited caret stop locations; if such are not defined, a NULL pointer is returned. /// /// /// /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the /// location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the /// first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any /// unspecified index is a valid caret stop location. /// /// GetProhibitedCaretStopCount gets the number of prohibited caret stops. /// A caret stop is the index of the UTF-16 code point in the UnicodeString property of the glyph. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getprohibitedcaretstops // HRESULT GetProhibitedCaretStops( UINT32 *prohibitedCaretStopCount, UINT32 *prohibitedCaretStops ); void GetProhibitedCaretStops(ref uint prohibitedCaretStopCount, [In, Out] uint[] prohibitedCaretStops); /// Gets the level of bidirectional text. /// /// The level of bidirectional text. /// Range: 0–61 /// /// /// /// The bidirectional text level, or BidiLevel, specifies the nesting level of the Unicode bidirectional algorithm. Even /// values imply the left-to-right layout and odd values the right-to-left layout, which places the run origin on the right side /// of the first glyph. Advance widths that are positive will move to the left, allowing subsequent glyphs to be placed to the /// left of the previous glyph. /// /// The range of allowed values for this property is between 0 and 61, inclusive, and the default value is 0. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getbidilevel HRESULT // GetBidiLevel( UINT32 *bidiLevel ); uint GetBidiLevel(); /// Gets a Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. /// /// The Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. /// /// /// Value /// Meaning /// /// /// TRUE /// Render the glyphs sideways to produce sideways text. /// /// /// FALSE /// Do not render the glyphs sideways to produce normal text. /// /// /// /// The default value for this property is FALSE. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getissideways HRESULT // GetIsSideways( BOOL *isSideways ); [return: MarshalAs(UnmanagedType.Bool)] bool GetIsSideways(); /// Gets the name of the device font. /// /// The string that contains the unescaped name of the device font. If the name has not been set, a NULL pointer will be returned. /// /// /// /// The device font name uniquely identifies a specific device font and is typically defined by a hardware vendor or font vendor. /// /// The escaped version of the device font name is created when the object is serialized. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getdevicefontname HRESULT // GetDeviceFontName( LPWSTR *deviceFontName ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetDeviceFontName(); /// Gets the style simulations that will be applied when rendering the glyphs. /// The XPS_STYLE_SIMULATION value that describes the style simulations to be applied. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getstylesimulations HRESULT // GetStyleSimulations( XPS_STYLE_SIMULATION *styleSimulations ); XPS_STYLE_SIMULATION GetStyleSimulations(); /// Sets the style simulations that will be applied when the glyphs are rendered. /// The XPS_STYLE_SIMULATION value that specifies the style simulation to be applied. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setstylesimulations HRESULT // SetStyleSimulations( XPS_STYLE_SIMULATION styleSimulations ); void SetStyleSimulations([In] XPS_STYLE_SIMULATION styleSimulations); /// Gets the starting position of the text. /// The XPS_POINT structure that receives the starting position of the text. /// /// In the units of the effective coordinate space, the origin specifies the x and y coordinates of the first glyph in the run. /// The glyph is placed such that its baseline and the leading edge of its advance vector intersect with the point defined by /// origin.x and origin.y. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getorigin HRESULT GetOrigin( // XPS_POINT *origin ); XPS_POINT GetOrigin(); /// Sets the starting position of the text. /// The XPS_POINT structure that contains the coordinates to be set as the text's starting position. /// /// In the units of the effective coordinate space, the origin specifies the x and y coordinates of the first glyph in the run. /// The glyph is placed such that its baseline and the leading edge of its advance vector intersect with the point defined by /// origin.x and origin.y. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setorigin HRESULT SetOrigin( // const XPS_POINT *origin ); void SetOrigin(in XPS_POINT origin); /// Gets the font size. /// The font size. /// /// /// The em size that is returned in fontRenderingEmSize specifies the font size in the drawing surface units. The drawing /// surface units are expressed as floating-point values in the effective coordinate space. /// /// In new glyph objects, the default value of fontRenderingEmSize is 10.0. /// If the value of fontRenderingEmSize is 0.0, no text is displayed. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfontrenderingemsize // HRESULT GetFontRenderingEmSize( FLOAT *fontRenderingEmSize ); float GetFontRenderingEmSize(); /// Sets the font size of the text. /// The font size. /// /// /// The em size returned in fontRenderingEmSize specifies the font size in drawing surface units. Drawing surface units are /// expressed as floating-point values in the units of the effective coordinate space. /// /// In new glyph objects, the default value of fontRenderingEmSize is 10.0. /// If the value of fontRenderingEmSize is 0.0, no text is displayed. /// A value of 0.0 results in no visible text being displayed. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfontrenderingemsize // HRESULT SetFontRenderingEmSize( FLOAT fontRenderingEmSize ); void SetFontRenderingEmSize([In] float fontRenderingEmSize); /// Gets a pointer to the IXpsOMFontResource interface of the font resource object required for this text. /// A pointer to the IXpsOMFontResource interface of the font resource. /// /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. /// This occurs because all of the relationships are parsed when a resource is loaded. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfontresource HRESULT // GetFontResource( IXpsOMFontResource **fontResource ); IXpsOMFontResource GetFontResource(); /// Sets the pointer to the IXpsOMFontResource interface of the font resource object that is required for this text. /// The pointer to the IXpsOMFontResource interface to be used. /// fontResource must not be a NULL pointer; a glyph object must have a font resource. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfontresource HRESULT // SetFontResource( IXpsOMFontResource *fontResource ); void SetFontResource([In] IXpsOMFontResource fontResource); /// /// Gets the index of the font face to be used. /// /// This value is only used when GetFontResource returns an IXpsOMFontResource interface that represents a TrueType font collection. /// /// /// The index value of the font face. If the font face has not been set, –1 is returned. /// /// The font resource is obtained by calling the GetFontResource method. /// /// If a font face has not been set or is not supported by the font, a value of –1 is returned in fontFaceIndex. When the glyph /// is loaded from an existing XPS document file, a fontFaceIndex value of –1 indicates that the FontUri attribute did /// not include a #index fragment. /// /// /// In the following markup of a FixedPage, the FontUri attribute of the Glyphs element has a value of . In this /// case, GetFontFaceIndex would return a value of 1 in fontFaceIndex. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfontfaceindex HRESULT // GetFontFaceIndex( SHORT *fontFaceIndex ); short GetFontFaceIndex(); /// /// Sets the index of the font face to be used. /// /// This value is only used when GetFontResource returns an IXpsOMFontResource interface that represents a TrueType font collection. /// /// /// The index value of the font face to be used. /// /// /// The default value of the font face index property is –1, which means that a font index has not been set or the font resource /// is not a TrueType font collection. /// /// /// If this value is specified and is not –1, "#<Index>" is appended to the Font URI during serialization. Here, /// <Index> is the value that is set by SetFontFaceIndex. /// /// /// The following markup of a FixedPage shows the result of setting the fontFaceIndex to 1. Notice that the FontUri /// attribute of the Glyphs element has a value of , which includes the index of the font face. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfontfaceindex HRESULT // SetFontFaceIndex( SHORT fontFaceIndex ); void SetFontFaceIndex([In] short fontFaceIndex); /// Gets a pointer to the resolved IXpsOMBrush interface of the fill brush to be used for the text. /// /// /// A pointer to the resolved IXpsOMBrush interface of the fill brush to be used for the text. If a fill brush has not been set, /// a NULL pointer will be returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the brush. /// /// /// Most recent method called /// Object that is returned in fillBrush /// /// /// SetFillBrushLocal /// The local brush that is set by SetFillBrushLocal. /// /// /// SetFillBrushLookup /// /// The shared brush retrieved, with a lookup key that matches the key that is set by SetFillBrushLookup, from the local or /// resource directory. /// /// /// /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. /// NULL pointer. /// /// /// /// The fill brush is used to fill the shape of the rendered glyphs. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfillbrush HRESULT // GetFillBrush( IXpsOMBrush **fillBrush ); IXpsOMBrush GetFillBrush(); /// Gets a pointer to the local, unshared IXpsOMBrush interface of the fill brush to be used for the text. /// /// /// A pointer to the local, unshared IXpsOMBrush interface of the fill brush to be used for the text. If a fill brush lookup key /// has been set or if a local fill brush has not been set, a NULL pointer will be returned. /// /// /// /// Most recent method called /// Object that is returned in fillBrush /// /// /// SetFillBrushLocal /// The local brush that is set by SetFillBrushLocal. /// /// /// SetFillBrushLookup /// NULL pointer. /// /// /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfillbrushlocal HRESULT // GetFillBrushLocal( IXpsOMBrush **fillBrush ); IXpsOMBrush GetFillBrushLocal(); /// Sets the IXpsOMBrush interface pointer to a local, unshared fill brush. /// /// The IXpsOMBrush interface pointer to be set as the local, unshared fill brush. A NULL pointer releases any previously /// assigned brushes. /// /// /// /// After you call SetFillBrushLocal, the fill brush lookup key is released and GetFillBrushLookup returns a NULL /// pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in fillBrush by GetFillBrush /// Object that is returned in fillBrush by GetFillBrushLocal /// String that is returned in key by GetFillBrushLookup /// /// /// SetFillBrushLocal (this method) /// The local brush that is set by SetFillBrushLocal. /// The local brush that is set by SetFillBrushLocal. /// NULL pointer. /// /// /// SetFillBrushLookup /// /// The shared brush that gets retrieved, with a lookup key matching the key that is set by SetFillBrushLookup, from the /// resource directory. /// /// NULL pointer. /// The lookup key that is set by SetFillBrushLookup. /// /// /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfillbrushlocal HRESULT // SetFillBrushLocal( IXpsOMBrush *fillBrush ); void SetFillBrushLocal([In] IXpsOMBrush fillBrush); /// /// Gets the lookup key of the IXpsOMBrush interface that is stored in a resource dictionary and will be used as the fill brush. /// /// /// /// The lookup key for the brush that is stored in a resource dictionary and will be used as the fill brush. If a fill brush /// lookup key has not been set or if a local fill brush has been set, a NULL pointer will be returned. /// /// /// /// Most recent method called /// String that is returned in key /// /// /// SetFillBrushLocal /// NULL pointer. /// /// /// SetFillBrushLookup /// The lookup key that is set by SetFillBrushLookup. /// /// /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfillbrushlookup HRESULT // GetFillBrushLookup( LPWSTR *key ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetFillBrushLookup(); /// Sets the lookup key name of a shared fill brush. /// /// A string variable that contains the key name of the fill brush that is stored in the resource dictionary and will be used as /// the shared fill brush. A NULL pointer clears any previously assigned key string. /// /// /// /// After you call SetFillBrushLookup, the local fill brush is released and GetFillBrushLocal returns a NULL /// pointer in the fillBrush parameter. The table that follows explains the relationship between the local and lookup values of /// this property. /// /// /// /// Most recent method called /// Object that is returned in fillBrush by GetFillBrush /// Object that is returned in fillBrush by GetFillBrushLocal /// String that is returned in key by GetFillBrushLookup /// /// /// SetFillBrushLocal /// The local brush that is set by SetFillBrushLocal. /// The local brush that is set by SetFillBrushLocal. /// NULL pointer. /// /// /// SetFillBrushLookup (this method) /// /// The shared brush that gets retrieved, with a lookup key matching the key that is set by SetFillBrushLookup, from the /// resource directory. /// /// NULL pointer. /// The lookup key that is set by SetFillBrushLookup. /// /// /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfillbrushlookup HRESULT // SetFillBrushLookup( LPCWSTR key ); void SetFillBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// Gets a pointer to the IXpsOMGlyphsEditor interface that will be used to edit the glyphs in the object. /// A pointer to the IXpsOMGlyphsEditor interface. /// An IXpsOMGlyphsEditor interface is required to edit the read-only properties of the IXpsOMGlyphs interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphseditor HRESULT // GetGlyphsEditor( IXpsOMGlyphsEditor **editor ); IXpsOMGlyphsEditor GetGlyphsEditor(); /// Makes a deep copy of the interface. /// A pointer to the copy of the interface. /// This method does not update any of the resource pointers in the copy of the interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-clone HRESULT Clone( // IXpsOMGlyphs **glyphs ); IXpsOMGlyphs Clone(); } /// Allows batch modification of properties that affect the text content in an IXpsOMGlyphs interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomglyphseditor [PInvokeData("xpsobjectmodel.h", MSDNShortId = "5bdf2892-ce6f-4560-b638-e441166fc309")] [ComImport, Guid("A5AB8616-5B16-4B9F-9629-89B323ED7909"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGlyphsEditor { /// Performs cross-property validation and then copies the changes to the parent IXpsOMGlyphs interface. /// /// The IXpsOMGlyphsEditor interface remains valid after this method is called, allowing for additional modifications to be made. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-applyedits HRESULT ApplyEdits(); void ApplyEdits(); /// Gets the text in unescaped UTF-16 scalar values. /// The UTF-16 Unicode string. If the string is empty, a NULL pointer is returned. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getunicodestring // HRESULT GetUnicodeString( LPWSTR *unicodeString ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetUnicodeString(); /// Sets the text in unescaped UTF-16 scalar values. /// The address of a UTF-16 Unicode string. A NULL pointer clears the property. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setunicodestring // HRESULT SetUnicodeString( LPCWSTR unicodeString ); void SetUnicodeString([In, MarshalAs(UnmanagedType.LPWStr)] string unicodeString); /// Gets the number of glyph indices. /// The glyph index count. /// To get the glyph indices, call GetGlyphIndices. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getglyphindexcount // HRESULT GetGlyphIndexCount( UINT32 *indexCount ); uint GetGlyphIndexCount(); /// Gets an array of XPS_GLYPH_INDEX structures that describe the specific glyph indices in the font. /// /// The number of elements that will fit in the array referenced by the glyphIndices parameter. When the method returns, /// indexCount will contain the number of XPS_GLYPH_INDEX structures that are returned in the array referenced by glyphIndices. /// /// The XPS_GLYPH_INDEX structure array that receives the glyph indices. /// /// /// The glyph indices that are returned in glyphIndices override the default cmap mapping from the UnicodeString property /// to the glyph index. Each XPS_GLYPH_INDEX structure also contains advance width and vertical and horizontal offset information. /// /// GetGlyphIndexCount gets the number of elements in the glyph index array. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getglyphindices // HRESULT GetGlyphIndices( UINT32 *indexCount, XPS_GLYPH_INDEX *glyphIndices ); void GetGlyphIndices(ref uint indexCount, [In, Out] XPS_GLYPH_INDEX[] glyphIndices); /// Sets an XPS_GLYPH_INDEX structure array that describes which glyph indices are to be used in the font. /// /// The number of XPS_GLYPH_INDEX structures in the array that is referenced by glyphIndices. The value of 0 clears the property. /// /// /// An array of XPS_GLYPH_INDEX structures that contain the glyph indices. If indexCount is 0, this parameter is ignored. /// /// /// The glyph indices that are passed in glyphIndices override the default cmap mapping from the UnicodeString property /// to the glyph index. Each XPS_GLYPH_INDEX structure also has advance width and vertical and horizontal offset information. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setglyphindices // HRESULT SetGlyphIndices( UINT32 indexCount, const XPS_GLYPH_INDEX *glyphIndices ); void SetGlyphIndices([In] uint indexCount, [In] XPS_GLYPH_INDEX[] glyphIndices); /// Gets the number of glyph mappings. /// The number of glyph mappings. /// To get the glyph mappings, call GetGlyphMappings. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getglyphmappingcount // HRESULT GetGlyphMappingCount( UINT32 *glyphMappingCount ); uint GetGlyphMappingCount(); /// /// Gets an array of XPS_GLYPH_MAPPING structures that describe how to map UTF-16 scalar values to entries in the array of /// XPS_GLYPH_INDEX structures, which is returned by GetGlyphIndices. /// /// /// The number of XPS_GLYPH_MAPPING structures that will fit in the array referenced by glyphMappings. When the method returns, /// glyphMappingCount will contain the number of values in that array. /// /// An array of XPS_GLYPH_MAPPING structures that receives the glyph mapping values. /// GetGlyphMappingCount gets the number of glyph mappings. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getglyphmappings // HRESULT GetGlyphMappings( UINT32 *glyphMappingCount, XPS_GLYPH_MAPPING *glyphMappings ); void GetGlyphMappings(ref uint glyphMappingCount, [In, Out] XPS_GLYPH_MAPPING[] glyphMappings); /// /// Sets an array of XPS_GLYPH_MAPPING structures that describe how to map the UTF-16 scalar values in the UnicodeString /// property to entries in the array of XPS_GLYPH_INDEX structures. /// /// /// The number of XPS_GLYPH_MAPPING structures in the array that is referenced by glyphMappings. A value of 0 clears the property. /// /// /// An XPS_GLYPH_MAPPING structure array that contains the glyph mapping values. If glyphMappingCount is 0, this parameter is /// ignored and can be set to NULL. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setglyphmappings // HRESULT SetGlyphMappings( UINT32 glyphMappingCount, const XPS_GLYPH_MAPPING *glyphMappings ); void SetGlyphMappings([In] uint glyphMappingCount, [In] XPS_GLYPH_MAPPING[] glyphMappings); /// Gets the number of prohibited caret stops. /// The number of prohibited caret stops. /// /// To get the prohibited caret stops, call GetProhibitedCaretStops. /// /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the /// location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the /// first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any /// unspecified index is a valid caret stop location. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getprohibitedcaretstopcount // HRESULT GetProhibitedCaretStopCount( UINT32 *prohibitedCaretStopCount ); uint GetProhibitedCaretStopCount(); /// Gets an array of prohibited caret stop locations. /// /// The number of prohibited caret stop values that will fit in the array that is referenced by the prohibitedCaretStops /// parameter. When the method returns, prohibitedCaretStopCount will contain the number of values in that array. /// /// /// An array of glyph mapping values. If no prohibited caret stops have been defined, a NULL pointer is returned. /// /// /// /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the /// location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the /// first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any /// unspecified index is a valid caret stop location. /// /// GetProhibitedCaretStopCount gets the number of prohibited caret stops. /// A caret stop is the index of the UTF-16 code point in the UnicodeString property of the glyph. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getprohibitedcaretstops // HRESULT GetProhibitedCaretStops( UINT32 *count, UINT32 *prohibitedCaretStops ); void GetProhibitedCaretStops(ref uint count, [In, Out] uint[] prohibitedCaretStops); /// Sets an array of prohibited caret stop locations. /// /// The number of prohibited caret stop locations in the array that is referenced by prohibitedCaretStops. A value of 0 clears /// the property. /// /// /// The array of prohibited caret stop locations to be set. If count is 0, this parameter is ignored and can be set to NULL. /// /// /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the /// location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the /// first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any /// unspecified index is a valid caret stop location. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setprohibitedcaretstops // HRESULT SetProhibitedCaretStops( UINT32 count, const UINT32 *prohibitedCaretStops ); void SetProhibitedCaretStops([In] uint count, [In] uint[] prohibitedCaretStops); /// Gets the bidirectional text level of the parent IXpsOMGlyphs interface. /// /// The bidirectional text level. /// Range: 0–61 /// /// /// /// The BidiLevel property specifies the bidirectional nesting level of the Unicode algorithm. Even values imply the /// left-to-right layout and odd values the right-to-left layout. Right-to-left layout places the run origin at the right side /// of the first glyph. Advance widths that are positive will move to the left, allowing subsequent glyphs to be placed to the /// left of the previous glyph. /// /// The range of allowed values for this property is between 0 and 61, inclusive, and the default value is 0. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getbidilevel HRESULT // GetBidiLevel( UINT32 *bidiLevel ); uint GetBidiLevel(); /// Sets the level of bidirectional text. /// /// The level of bidirectional text. /// Range: 0–61 /// /// /// /// The BidiLevel property specifies the bidirectional nesting level of the Unicode algorithm. Even values imply the /// left-to-right layout and odd values the right-to-left layout. Right-to-left layout places the run origin on the right side /// of the first glyph. Advance widths that are positive will move to the left, allowing subsequent glyphs to be placed to the /// left of the previous glyph. /// /// The range of allowed values for this property is between 0 and 61, inclusive, and the default value is 0. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setbidilevel HRESULT // SetBidiLevel( UINT32 bidiLevel ); void SetBidiLevel([In] uint bidiLevel); /// Gets a Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. /// /// The Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. /// /// /// Value /// Meaning /// /// /// TRUE /// Rotate the glyphs sideways. Produces sideways text. /// /// /// FALSE /// Do not rotate the glyphs sideways. Produces normal text. /// /// /// /// The default value for this property is false. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getissideways HRESULT // GetIsSideways( BOOL *isSideways ); [return: MarshalAs(UnmanagedType.Bool)] bool GetIsSideways(); /// Sets the value that indicates whether the text is to be rendered with the glyphs rotated sideways. /// /// The Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. /// /// /// Value /// Meaning /// /// /// TRUE /// Rotate the glyphs sideways. Produces sideways text. /// /// /// FALSE /// Do not rotate the glyphs sideways. Produces normal text. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setissideways HRESULT // SetIsSideways( BOOL isSideways ); void SetIsSideways([In, MarshalAs(UnmanagedType.Bool)] bool isSideways); /// Gets the name of the device font. /// The name of the device font; if not specified, a NULL pointer will be returned. /// /// The device font name is created as an escaped name when the object is serialized. /// The device font name uniquely identifies a specific device font and is typically defined by a hardware or font vendor. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getdevicefontname // HRESULT GetDeviceFontName( LPWSTR *deviceFontName ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetDeviceFontName(); /// Sets the name of the device font. /// /// A pointer to the string that contains the name of the device font in its unescaped form. A NULL pointer clears the property. /// /// /// The device font name that is passed in deviceFontName can be set in its unescaped form; it will be converted to its escaped /// form when the document is serialized. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setdevicefontname // HRESULT SetDeviceFontName( LPCWSTR deviceFontName ); void SetDeviceFontName([In, MarshalAs(UnmanagedType.LPWStr)] string deviceFontName); } /// /// /// This interface describes a gradient that is made up of gradient stops. Classes that inherit from IXpsOMGradientBrush /// specify different ways of interpreting gradient stops. /// /// IXpsOMGradientBrush is the base interface for the IXpsOMLinearGradientBrush and IXpsOMRadialGradientBrush interfaces. /// /// /// /// The methods of this interface define the basic parameters of a gradient. The gradient type, which can be linear or radial, /// determines how these parameters are applied. /// /// /// As shown in the figure that follows, the start and end points of a linear gradient mark the end points of the gradient path. The /// gradient path is the straight line that connects the start and end points. The gradient region of a linear gradient consists of /// the area between the start and end points, including those points, and extends in both directions at a right angle to the /// gradient path. The spread area is the area outside the gradient region. /// /// /// Gradient stops define the color at specific locations along the gradient path; the color is interpolated along the gradient path /// between the gradient stops, as shown in the following illustration. /// /// /// As shown in the figure that follows, the gradient region of a radial gradient is the area enclosed by the ellipse that is /// described by the center point and the x and y radii that extend from the center point. The spread area is the area outside of /// that ellipse. The gradient path is a radial line that sweeps the entire gradient region from the gradient origin to the ellipse /// that bounds the gradient region. In the following illustration, the gradient path is not shown. /// /// /// The spread method describes how the spread area is filled. Implementation of the spread method depends on the gradient type /// (linear or radial). The following illustration shows several examples of how the spread area can be filled. For information /// about different spread methods, see XPS_SPREAD_METHOD. /// /// /// The transform determines how the resulting gradient is transformed. The visible part of the gradient that is ultimately rendered /// in the image is determined by the path, stroke, or glyph that is using the gradient brush. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgradientbrush [PInvokeData("xpsobjectmodel.h", MSDNShortId = "d381b813-5368-4ffe-a9a1-0f5027ae9d80")] [ComImport, Guid("EDB59622-61A2-42C3-BACE-ACF2286C06BF"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGradientBrush : IXpsOMBrush { /// Gets the IUnknown interface of the parent. /// A pointer to the IUnknown interface of the parent. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner HRESULT // GetOwner( IUnknown **owner ); [return: MarshalAs(UnmanagedType.IUnknown)] new object GetOwner(); /// Gets the object type of the interface. /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype HRESULT GetType( // XPS_OBJECT_TYPE *type ); new XPS_OBJECT_TYPE GetType(); /// Gets the opacity of the brush. /// The opacity value of the brush. /// /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is /// 50 percent opaque, and 1.0 that it is completely opaque. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity HRESULT // GetOpacity( FLOAT *opacity ); new float GetOpacity(); /// Sets the opacity of the brush. /// The opacity value of the brush. /// /// /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is /// 50 percent opaque, and 1.0 that it is completely opaque. /// /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity HRESULT // SetOpacity( FLOAT opacity ); new void SetOpacity([In] float opacity); /// /// Gets a pointer to an IXpsOMGradientStopCollection interface that contains the collection of IXpsOMGradientStop interfaces /// that define the gradient. /// /// A pointer to the IXpsOMGradientStopCollection interface that contains the collection of IXpsOMGradientStop interfaces. /// /// /// Gradient stops, which are described in the XPS OM by an IXpsOMGradientStop interface, are used to define the color at a /// specific location along a gradient path; the color is interpolated between the gradient stops. The illustration that follows /// shows the gradient path and gradient stops of a linear gradient. /// /// /// The illustration that follows shows the gradient stops of a radial gradient. In this example, the gradient region is the /// area enclosed by the outer ellipse, and the radial gradient is using the XPS_SPREAD_METHOD_REFLECT spread method to /// fill the space outside of the gradient region. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getgradientstops // HRESULT GetGradientStops( IXpsOMGradientStopCollection **gradientStops ); IXpsOMGradientStopCollection GetGradientStops(); /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. If the transform /// has not been set, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has been most recently called to set the transform. /// /// /// Most recent method called /// Object that is returned in transform /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// /// The shared transform that is retrieved, with a lookup key that matches the key set by SetTransformLookup, from the resource directory. /// /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// /// /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in /// the image is determined by the path, stroke, or glyph that is using the gradient brush. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransform HRESULT // GetTransform( IXpsOMMatrixTransform **transform ); IXpsOMMatrixTransform GetTransform(); /// /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the brush. /// /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the brush. /// If the transform has not been set or if a matrix transform lookup key has been set, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has been most recently called to set the transform. /// /// /// Most recent method called /// Object that is returned in transform /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// NULL pointer. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// /// /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in /// the image is determined by the path, stroke, or glyph that is using the gradient brush. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransformlocal // HRESULT GetTransformLocal( IXpsOMMatrixTransform **transform ); IXpsOMMatrixTransform GetTransformLocal(); /// /// Sets the IXpsOMMatrixTransform interface pointer to a local, unshared matrix transform that is to be used for the brush. /// /// /// A pointer to the IXpsOMMatrixTransform interface of the local, unshared matrix transform that is to be used for the brush. A /// NULL pointer releases any previously set interface. /// /// /// /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLocal returns a NULL /// pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of /// this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in transform by GetTransformLocal /// Object that is returned in key by GetTransformLookup /// /// /// SetTransformLocal (this method) /// The local transform that is set by SetTransformLocal. /// The local transform that is set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup /// /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// /// The transform passed in transform determines how the gradient is transformed. The visible part of the gradient that is /// ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-settransformlocal // HRESULT SetTransformLocal( IXpsOMMatrixTransform *transform ); void SetTransformLocal([In] IXpsOMMatrixTransform transform); /// /// Gets the name of the lookup key of the shared matrix transform interface that is to be used for the brush. /// The key name identifies a shared resource in a resource dictionary. /// /// /// /// The name of the lookup key of the shared matrix transform interface that is to be used for the brush. If the lookup key name /// has not been set or if the local matrix transform has been set, a NULL pointer is returned. /// /// /// The value that is returned in this parameter depends on which method has been most recently called to set the lookup key or /// the transform. /// /// /// /// Most recent method called /// String that is returned in key /// /// /// SetTransformLocal /// NULL pointer. /// /// /// SetTransformLookup /// The key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// /// /// /// This method does not return an IXpsOMMatrixTransform interface pointer; to retrieve this pointer from the dictionary, call IXpsOMDictionary::GetByKey. /// /// /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in /// the image is determined by the path, stroke, or glyph that is using the gradient brush. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransformlookup // HRESULT GetTransformLookup( LPWSTR *key ); [return: MarshalAs(UnmanagedType.LPWStr)] string GetTransformLookup(); /// /// Sets the name of the lookup key of a shared matrix transform that is to be used for the brush. /// The key name identifies a shared resource in a resource dictionary. /// /// The name of the lookup key of the matrix transform that is to be used for the brush. /// /// /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL /// pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of /// this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in transform by GetTransformLocal /// Object that is returned in key by GetTransformLookup /// /// /// SetTransformLocal /// The local transform that is set by SetTransformLocal. /// The local transform that is set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup (this method) /// /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// /// The transform referenced by key determines how the gradient is transformed. The visible part of the gradient that is /// ultimately rendered in the image is determined by the path, stroke, or glyph that is using the brush. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-settransformlookup // HRESULT SetTransformLookup( LPCWSTR key ); void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// Gets the XPS_SPREAD_METHOD value, which describes how the area outside of the gradient region will be rendered. /// /// The XPS_SPREAD_METHOD value that describes how the area outside of the gradient region will be rendered. The gradient region /// is defined by the linear-gradient brush or radial-gradient brush that inherits this interface. /// /// For more information about different types of spread methods, see XPS_SPREAD_METHOD. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getspreadmethod // HRESULT GetSpreadMethod( XPS_SPREAD_METHOD *spreadMethod ); XPS_SPREAD_METHOD GetSpreadMethod(); /// /// Sets the XPS_SPREAD_METHOD value, which describes how the area outside of the gradient region is to be rendered. The /// gradient region is defined by the start and end points of the gradient. /// /// /// The XPS_SPREAD_METHOD value that describes how the area outside of the gradient region is to be rendered. The gradient /// region is defined by the linear-gradient brush or radial-gradient brush that inherits this interface. /// /// For more information about different types of spread methods, see XPS_SPREAD_METHOD. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-setspreadmethod // HRESULT SetSpreadMethod( XPS_SPREAD_METHOD spreadMethod ); void SetSpreadMethod([In] XPS_SPREAD_METHOD spreadMethod); /// Gets the gamma function to be used for color interpolation. /// The XPS_COLOR_INTERPOLATION value that describes the gamma function to be used for color interpolation. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getcolorinterpolationmode // HRESULT GetColorInterpolationMode( XPS_COLOR_INTERPOLATION *colorInterpolationMode ); XPS_COLOR_INTERPOLATION GetColorInterpolationMode(); /// Sets the XPS_COLOR_INTERPOLATION value, which describes the gamma function to be used for color interpolation. /// /// The XPS_COLOR_INTERPOLATION value, which describes the gamma function to be used for color interpolation. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-setcolorinterpolationmode // HRESULT SetColorInterpolationMode( XPS_COLOR_INTERPOLATION colorInterpolationMode ); void SetColorInterpolationMode([In] XPS_COLOR_INTERPOLATION colorInterpolationMode); } /// Represents a single color and location within a gradient. /// /// /// A gradient stop is a specific color that is defined for a location within the gradient region. The color of the gradient changes /// between the gradient stops of the gradient. The area and absolute location of the gradient is defined by the gradient interface. /// The offset is a relative location within the gradient region and is measured between 0.0 and 1.0. An offset of 0.0 is the /// beginning of the gradient and 1.0 is the end. Gradient stops can be defined for any offset within the range, including the end /// points. This interface describes one and only one stop in a gradient. /// /// /// The gradient path is the straight line that connects the start point and the end point of a linear gradient. The gradient region /// of a linear gradient consists of the area between the start point and the end point, including those points, and extends in both /// directions at a right angle to the gradient path. The spread area is the area outside the gradient region. /// /// /// Gradient stops define the color at a specific location along the gradient path; the color is interpolated along the gradient /// path between the gradient stops. In the example that follows, the gradient region fills the image, so there is no spread area. /// /// /// For gradient stops used in linear-gradient brushes, the offset value of 0.0 corresponds to the start point of the gradient path, /// and the offset value of 1.0 corresponds to the end point. To determine the location of a gradient stop between these two points, /// intermediate offset values are interpolated between them. The following illustration shows two intermediate gradient stops, one /// at an offset of 0.25 and another at 0.75. /// /// /// For gradient stops used in radial-gradient brushes, the offset value of 0.0 corresponds to the gradient origin location, and the /// offset value of 1.0 corresponds to the circumference of the ellipse that bounds the gradient. Offsets between 0.0 and 1.0 define /// an ellipse that is interpolated between the gradient origin and the bounding ellipse. The illustration that follows has one /// intermediate gradient stop at an offset of 0.50 (Gradient stop 1). The gradient is using the XPS_SPREAD_METHOD_REFLECT /// spread method to fill the space outside of the gradient region. /// /// The calculations that are used to render a gradient are described in the XML Paper Specification. /// The code example that follows illustrates how to create an instance of this interface. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgradientstop [PInvokeData("xpsobjectmodel.h", MSDNShortId = "e115d806-70c1-4c6a-810e-e6a058628b44")] [ComImport, Guid("5CF4F5CC-3969-49B5-A70A-5550B618FE49"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGradientStop { /// Gets a pointer to the IXpsOMGradientBrush interface that contains the gradient stop. /// /// A pointer to the IXpsOMGradientBrush interface that contains the gradient stop. If the gradient stop is not assigned to a /// gradient brush, a NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-getowner HRESULT // GetOwner( IXpsOMGradientBrush **owner ); IXpsOMGradientBrush GetOwner(); /// Gets the offset value of the gradient stop. /// The offset value of the gradient stop, expressed as a fraction of the gradient path. /// /// The valid range of values returned in offset is 0.0–1.0. 0.0 is the start point of the gradient, 1.0 is the end point, and a /// value between 0.0 and 1.0 is a location that is linearly interpolated between the start point and the end point. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-getoffset HRESULT // GetOffset( FLOAT *offset ); float GetOffset(); /// Sets the offset location of the gradient stop. /// /// The offset value that describes the location of the gradient stop as a fraction of the gradient path. /// The valid range of this parameter is 0.0 <= offset <= 1.0. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-setoffset HRESULT // SetOffset( FLOAT offset ); void SetOffset([In] float offset); /// Gets the color value and color profile of the gradient stop. /// The color value of the gradient stop. /// /// A pointer to the IXpsOMColorProfileResource interface that contains the color profile to be used. If no color profile /// resource has been set, a NULL pointer is returned. See remarks. /// /// A color profile is only returned when the color type of color is XPS_COLOR_TYPE_CONTEXT. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-getcolor HRESULT // GetColor( XPS_COLOR *color, IXpsOMColorProfileResource **colorProfile ); IXpsOMColorProfileResource GetColor(out XPS_COLOR color); /// Sets the color value and color profile of the gradient stop. /// /// The color value to be set at the gradient stop. /// /// If the value of the colorType field in the XPS_COLOR structure that is passed in this parameter is /// XPS_COLOR_TYPE_CONTEXT, a valid color profile must be provided in the colorProfile parameter. /// /// /// /// The color profile to be used with color. /// /// A color profile is required when the value of the colorType field in the XPS_COLOR structure that is passed in the /// color parameter is XPS_COLOR_TYPE_CONTEXT. If the value of the colorType field is not XPS_COLOR_TYPE_CONTEXT, /// this parameter must be set to NULL. /// /// /// A color profile is only required when the color type of color is XPS_COLOR_TYPE_CONTEXT. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-setcolor HRESULT // SetColor( const XPS_COLOR *color, IXpsOMColorProfileResource *colorProfile ); void SetColor(in XPS_COLOR color, [In] IXpsOMColorProfileResource colorProfile); /// Makes a deep copy of the IXpsOMGradientStop interface. /// A pointer to the copy of the interface. /// /// The owner of the new interface is NULL. /// This method does not update any of the resource pointers in the IXpsOMGradientStop interface returned in gradientStop. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-clone HRESULT Clone( // IXpsOMGradientStop **gradientStop ); IXpsOMGradientStop Clone(); } /// A collection of IXpsOMGradientStop interface pointers. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgradientstopcollection [PInvokeData("xpsobjectmodel.h", MSDNShortId = "1f51f818-e9bb-4d88-9795-4e6890d24b8c")] [ComImport, Guid("C9174C3A-3CD3-4319-BDA4-11A39392CEEF"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGradientStopCollection { /// Gets the number of IXpsOMGradientStop interface pointers in the collection. /// The number of IXpsOMGradientStop interface pointers in the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-getcount // HRESULT GetCount( UINT32 *count ); uint GetCount(); /// Gets an IXpsOMGradientStop interface pointer from a specified location in the collection. /// The zero-based index of the IXpsOMGradientStop interface pointer to be obtained. /// The IXpsOMGradientStop interface pointer at the location specified by index. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-getat // HRESULT GetAt( UINT32 index, IXpsOMGradientStop **stop ); IXpsOMGradientStop GetAt([In] uint index); /// Inserts an IXpsOMGradientStop interface pointer at a specified location in the collection. /// /// The zero-based index in the collection where the interface pointer that is passed in stop is to be inserted. /// /// The IXpsOMGradientStop interface pointer to be inserted at the location specified by index. /// /// /// At the location specified by index, this method inserts the IXpsOMGradientStop interface pointer that is passed in stop. /// Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-insertat // HRESULT InsertAt( UINT32 index, IXpsOMGradientStop *stop ); void InsertAt([In] uint index, [In] IXpsOMGradientStop stop); /// Removes and releases an IXpsOMGradientStop interface pointer from a specified location in the collection. /// /// The zero-based index in the collection from which an IXpsOMGradientStop interface pointer is to be removed and released. /// /// /// /// This method releases the IXpsOMGradientStop interface referenced by the pointer at the location specified by index. After /// releasing the interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-removeat // HRESULT RemoveAt( UINT32 index ); void RemoveAt([In] uint index); /// Replaces an IXpsOMGradientStop interface pointer at a specified location in the collection. /// The zero-based index in the collection where an IXpsOMGradientStop interface pointer is to be replaced. /// /// The IXpsOMGradientStop interface pointer that will replace current contents at the location specified by index. /// /// /// /// At the location specified by index, this method releases the IXpsOMGradientStop interface referenced by the existing /// pointer, then writes the pointer that is passed in stop. /// /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-setat // HRESULT SetAt( UINT32 index, IXpsOMGradientStop *stop ); void SetAt([In] uint index, [In] IXpsOMGradientStop stop); /// Appends an IXpsOMGradientStop interface to the end of the collection. /// A pointer to the IXpsOMGradientStop interface that is to be appended to the collection. /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-append // HRESULT Append( IXpsOMGradientStop *stop ); void Append([In] IXpsOMGradientStop stop); } /// A brush that uses a raster image as a source. /// /// /// The image used by this brush is defined in a coordinate space that is specified by the image's resolution. The image type must /// be JPEG, PNG, TIFF 6.0, or HD Photo. /// /// The code example that follows illustrates how to create an instance of this interface. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomimagebrush [PInvokeData("xpsobjectmodel.h", MSDNShortId = "f5478582-466b-496e-b7f3-42fb8caa6814")] [ComImport, Guid("3DF0B466-D382-49EF-8550-DD94C80242E4"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMImageBrush : IXpsOMTileBrush { /// Gets the IUnknown interface of the parent. /// A pointer to the IUnknown interface of the parent. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner HRESULT // GetOwner( IUnknown **owner ); [return: MarshalAs(UnmanagedType.IUnknown)] new object GetOwner(); /// Gets the object type of the interface. /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype HRESULT GetType( // XPS_OBJECT_TYPE *type ); new XPS_OBJECT_TYPE GetType(); /// Gets the opacity of the brush. /// The opacity value of the brush. /// /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is /// 50 percent opaque, and 1.0 that it is completely opaque. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity HRESULT // GetOpacity( FLOAT *opacity ); new float GetOpacity(); /// Sets the opacity of the brush. /// The opacity value of the brush. /// /// /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is /// 50 percent opaque, and 1.0 that it is completely opaque. /// /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity HRESULT // SetOpacity( FLOAT opacity ); new void SetOpacity([In] float opacity); /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. If a matrix /// transform has not been set, a NULL pointer is returned. /// /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. /// /// /// Most recent method called /// Object that is returned in transform /// /// /// SetTransformLocal /// The transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// /// The transform which is retrieved, using a lookup key that matches the key that is set by SetTransformLookup, from the /// resource directory. /// /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// /// /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph /// that is using the tile brush. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransform HRESULT // GetTransform( IXpsOMMatrixTransform **transform ); new IXpsOMMatrixTransform GetTransform(); /// /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush. /// /// /// /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush. /// If a local matrix transform has not been set or if a matrix transform lookup key has been set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in transform /// /// /// SetTransformLocal /// The transform that is set by SetTransformLocal. /// /// /// SetTransformLookup /// NULL pointer. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// /// /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph /// that is using the tile brush. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransformlocal HRESULT // GetTransformLocal( IXpsOMMatrixTransform **transform ); new IXpsOMMatrixTransform GetTransformLocal(); /// Sets the IXpsOMMatrixTransform interface pointer to a local, unshared matrix transform. /// /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. If a local transform has /// been set, a NULL pointer will release it. /// /// /// /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph /// that is using the tile brush. /// /// /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL /// pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in transform by GetTransformLocal /// String that is returned in key by GetTransformLookup /// /// /// SetTransformLocal (this method) /// The transform that is set by SetTransformLocal. /// The transform that is set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup /// /// The transform which is retrieved, using a lookup key that matches the key that is set by SetTransformLookup, from the /// resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settransformlocal HRESULT // SetTransformLocal( IXpsOMMatrixTransform *transform ); new void SetTransformLocal([In] IXpsOMMatrixTransform transform); /// /// Gets the lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved /// matrix transform for the brush. /// /// /// /// The lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved /// matrix transform for the brush. If a matrix transform lookup key has not been set or if a local matrix transform has been /// set, a NULL pointer is returned. /// /// /// /// Most recent method called /// Object that is returned in key /// /// /// SetTransformLocal /// NULL pointer. /// /// /// SetTransformLookup /// The lookup key set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// /// /// /// /// /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph /// that is using the tile brush. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransformlookup // HRESULT GetTransformLookup( LPWSTR *key ); [return: MarshalAs(UnmanagedType.LPWStr)] new string GetTransformLookup(); /// /// Sets the lookup key name of a shared matrix transform that will be used as the transform for this brush.The shared matrix /// transform that is referenced by the lookup key is stored in the resource dictionary. /// /// /// A string variable that contains the lookup key name of a shared matrix transform in the resource dictionary. If a lookup key /// has already been set, a NULL pointer will clear it. /// /// /// /// The transform is applied before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. The /// tile brush has only one transform, which can be local or remote. /// /// /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL /// pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of /// this property. /// /// /// /// Most recent method called /// Object that is returned in transform by GetTransform /// Object that is returned in transform by GetTransformLocal /// String that is returned in key by GetTransformLookup /// /// /// SetTransformLocal /// The transform that is set by SetTransformLocal. /// The transform that is set by SetTransformLocal. /// NULL pointer. /// /// /// SetTransformLookup (this method) /// /// The transform which is retrieved—using a lookup key that matches the key that is set by SetTransformLookup— from the /// resource directory. /// /// NULL pointer. /// The lookup key that is set by SetTransformLookup. /// /// /// Neither SetTransformLocal nor SetTransformLookup has been called yet. /// NULL pointer. /// NULL pointer. /// NULL pointer. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settransformlookup // HRESULT SetTransformLookup( LPCWSTR key ); new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); /// Gets the portion of the source image to be used by the tile. /// The XPS_RECT structure that describes the area of the source content to be used by the tile. /// /// The brush's viewbox specifies the portion of a source image or visual to be used as the tile image. /// /// The coordinates of the brush's viewbox are relative to the source content, such that (0,0) specifies the upper-left corner /// of the source content. For images, dimensions specified by the brush's viewbox are expressed in the units of 1/96". The /// corresponding pixel coordinates in the source image are calculated as follows: /// /// /// In the illustration that follows, the image on the left is an example of a source image, the image in the center shows the /// selected viewbox, and the image on the right shows the resulting brush. /// /// /// If the source image resolution is 96 by 96 dots per inch and image dimensions are 96 by 96 pixels, the values of fields in /// the viewbox parameter would be: /// /// The preceding parameter values correspond to the source image as: /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-getviewbox HRESULT // GetViewbox( XPS_RECT *viewbox ); new XPS_RECT GetViewbox(); /// Sets the portion of the source content to be used as the tile image. /// An XPS_RECT structure that describes the portion of the source content to be used as the tile image. /// /// The brush's viewbox specifies the portion of a source image or visual to be used as the tile image. /// /// The coordinates of the brush's viewbox are relative to the source content, such that (0,0) specifies the upper-left corner /// of the source content. For images, dimensions specified by the brush's viewbox are expressed in the units of 1/96". The /// corresponding pixel coordinates in the source image are calculated as follows: /// /// /// In the illustration that follows, the image on the left is an example of a source image, while that on the right is the /// source image with the selected viewbox for the brush shown as a red rectangle. In this example, the part of the source image /// that is used as the content for the tile brush is the area within the red rectangle. The shaded area of the image is not /// used by the brush. /// /// /// If the source image resolution is 96 by 96 dots per inch and image dimensions are 96 by 96 pixels, the values of fields in /// the viewbox parameter would be: /// /// The preceding parameter values correspond to the source image as: /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-setviewbox HRESULT // SetViewbox( const XPS_RECT *viewbox ); new void SetViewbox(in XPS_RECT viewbox); /// Gets the portion of the destination geometry that is covered by a single tile. /// The XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile. /// /// The viewport is the portion of the output area where the first tile is drawn. In the illustration, the viewport is outlined /// by the purple rectangle inside the red, dotted rectangle. The tile mode of the brush determines how the rest of the tiles /// are drawn in the output area. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-getviewport HRESULT // GetViewport( XPS_RECT *viewport ); new XPS_RECT GetViewport(); /// Sets the portion of the destination geometry that is covered by a single tile. /// /// An XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile. /// /// /// The viewport is the portion of the output area where the tile is drawn. In the following illustration, the viewport is /// outlined by the blue rectangle inside the red, dotted rectangle. The tile mode of the brush determines how other tiles are /// drawn in the output area. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-setviewport HRESULT // SetViewport( const XPS_RECT *viewport ); new void SetViewport(in XPS_RECT viewport); /// Gets the XPS_TILE_MODE value that describes the tile mode of the brush. /// The XPS_TILE_MODE value that describes the tile mode of the brush. /// /// The tile mode determines how the tile image is repeated to fill the output area. If the tile mode value is /// XPS_TILE_MODE_NONE, the tile image is drawn only once. The following illustration shows examples of how the tile image /// appears in several tile modes. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettilemode HRESULT // GetTileMode( XPS_TILE_MODE *tileMode ); new XPS_TILE_MODE GetTileMode(); /// Sets the XPS_TILE_MODE value that describes the tiling mode of the brush. /// The XPS_TILE_MODE value to be set. /// /// The tile mode determines how the tile image is repeated to fill the output area. If the tile mode value is /// XPS_TILE_MODE_NONE, the tile image is drawn only once. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settilemode HRESULT // SetTileMode( XPS_TILE_MODE tileMode ); new void SetTileMode([In] XPS_TILE_MODE tileMode); /// /// Gets a pointer to the IXpsOMImageResource interface, which contains the image resource to be used as the source for the brush. /// /// /// A pointer to the IXpsOMImageResource interface that contains the image resource to be used as the source for the brush. /// /// /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. /// This occurs because all of the relationships are parsed when a resource is loaded. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-getimageresource HRESULT // GetImageResource( IXpsOMImageResource **imageResource ); IXpsOMImageResource GetImageResource(); /// /// Sets a pointer to the IXpsOMImageResource interface that contains the image resource to be used as the source for the brush. /// /// /// The image resource to be used as the source for the brush. This parameter must not be a NULL pointer. /// /// The image resource must be of type JPEG, PNG, TIFF 6.0, or HD Photo. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-setimageresource HRESULT // SetImageResource( IXpsOMImageResource *imageResource ); void SetImageResource([In] IXpsOMImageResource imageResource); /// /// Gets a pointer to the IXpsOMColorProfileResource interface, which contains the color profile resource that is associated /// with the image. /// /// /// A pointer to the IXpsOMColorProfileResource interface that contains the color profile resource that is associated with the /// image. If no color profile resource has been set, a NULL pointer is returned. /// /// /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. /// This occurs because all of the relationships are parsed when a resource is loaded. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-getcolorprofileresource // HRESULT GetColorProfileResource( IXpsOMColorProfileResource **colorProfileResource ); IXpsOMColorProfileResource GetColorProfileResource(); /// /// Sets a pointer to the IXpsOMColorProfileResource interface, which contains the color profile resource that is associated /// with the image. /// /// /// The color profile resource that is associated with the image. A NULL pointer will release any previously set color /// profile resources. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-setcolorprofileresource // HRESULT SetColorProfileResource( IXpsOMColorProfileResource *colorProfileResource ); void SetColorProfileResource([In] IXpsOMColorProfileResource colorProfileResource); /// Makes a deep copy of the interface. /// A pointer to the copy of the interface. /// This method does not update any of the resource pointers in the copy. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-clone HRESULT Clone( // IXpsOMImageBrush **imageBrush ); IXpsOMImageBrush Clone(); } /// Provides an IStream interface to an image resource. /// The code example that follows illustrates how to create an instance of this interface. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomimageresource [PInvokeData("xpsobjectmodel.h", MSDNShortId = "89a1530e-fa87-45bf-a1da-c8656ec09ba3")] [ComImport, Guid("3DB8417D-AE50-485E-9A44-D7758F78A23F"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMImageResource : IXpsOMResource { /// Gets the name that will be used when the part is serialized. /// /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName /// method), a NULL pointer is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] new IOpcPartUri GetPartName(); /// Sets the name that will be used when the part is serialized. /// /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. /// /// /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it /// has previously serialized. /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] new void SetPartName([In] IOpcPartUri partUri); /// Gets a new, read-only copy of the stream that is associated with this resource. /// A new, read-only copy of the stream that is associated with this resource. /// /// /// The IStream object returned by this method might return an error of E_PENDING, which indicates that the stream length has /// not been determined yet. This behavior is different from that of a standard IStream object. /// /// /// This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of /// this method will depend on that of the stream's Clone method. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresource-getstream HRESULT // GetStream( IStream **readerStream ); [MethodImpl(MethodImplOptions.InternalCall)] IStream GetStream(); /// Sets the read-only stream to be associated with this resource. /// The read-only stream to be associated with this resource. /// The XPS_IMAGE_TYPE value that describes the type of image in the stream. /// The part name to be assigned to this resource. /// /// /// The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the /// stream interface's methods. /// /// /// Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient /// cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresource-setcontent HRESULT // SetContent( IStream *sourceStream, XPS_IMAGE_TYPE imageType, IOpcPartUri *partName ); [MethodImpl(MethodImplOptions.InternalCall)] void SetContent([In] IStream sourceStream, [In] XPS_IMAGE_TYPE imageType, [In] IOpcPartUri partName); /// Gets the type of image resource. /// The XPS_IMAGE_TYPE value that describes the image type in the stream. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresource-getimagetype HRESULT // GetImageType( XPS_IMAGE_TYPE *imageType ); [MethodImpl(MethodImplOptions.InternalCall)] XPS_IMAGE_TYPE GetImageType(); } /// Represents an x- and y-coordinate pair in two-dimensional space. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/ns-xpsobjectmodel-xps_point typedef struct // __MIDL___MIDL_itf_xpsobjectmodel_0000_0000_0017 { FLOAT x; FLOAT y; } XPS_POINT; [PInvokeData("xpsobjectmodel.h", MSDNShortId = "NS:xpsobjectmodel.__MIDL___MIDL_itf_xpsobjectmodel_0000_0000_0017")] [StructLayout(LayoutKind.Sequential)] public struct XPS_POINT { /// The x-coordinate of a point. public float x; /// The y-coordinate of a point. public float y; } /// Describes the width, height, and location of a rectangle. /// The measurement units depend on the context and are not specified in the structure. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/ns-xpsobjectmodel-xps_rect typedef struct // __MIDL___MIDL_itf_xpsobjectmodel_0000_0000_0019 { FLOAT x; FLOAT y; FLOAT width; FLOAT height; } XPS_RECT; [PInvokeData("xpsobjectmodel.h", MSDNShortId = "NS:xpsobjectmodel.__MIDL___MIDL_itf_xpsobjectmodel_0000_0000_0019")] [StructLayout(LayoutKind.Sequential)] public struct XPS_RECT { /// The x-coordinate of the rectangle's left side. public float x; /// The y-coordinate of the rectangle's top side. public float y; /// A non-negative value that represents the object's size in the horizontal (x) dimension. public float width; /// A non-negative value that represents the object's size in the vertical (y) dimension. public float height; } /// Describes the size of an object. /// The measurement units are not specified in the structure. // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/ns-xpsobjectmodel-xps_size typedef struct // __MIDL___MIDL_itf_xpsobjectmodel_0000_0000_0018 { FLOAT width; FLOAT height; } XPS_SIZE; [PInvokeData("xpsobjectmodel.h", MSDNShortId = "NS:xpsobjectmodel.__MIDL___MIDL_itf_xpsobjectmodel_0000_0000_0018")] [StructLayout(LayoutKind.Sequential)] public struct XPS_SIZE { /// A non-negative value that represents the object's size in the horizontal (x) dimension. public float width; /// A non-negative value that represents the object's size in the vertical (y) dimension. public float height; } } }