• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • JeremyAnsel.DirectX.D2D1
      • D2D1AlphaMode
      • D2D1AntialiasMode
      • D2D1ArcSegment
      • D2D1ArcSize
      • D2D1BezierSegment
      • D2D1Bitmap
      • D2D1BitmapBrush
      • D2D1BitmapBrushProperties
      • D2D1BitmapInterpolationMode
      • D2D1BitmapProperties
      • D2D1BitmapRenderTarget
      • D2D1Brush
      • D2D1BrushProperties
      • D2D1CapStyle
      • D2D1ColorF
      • D2D1CombineMode
      • D2D1CompatibleRenderTargetOptions
      • D2D1Constants
      • D2D1DCInitializeMode
      • D2D1DCRenderTarget
      • D2D1DashStyle
      • D2D1DebugLevel
      • D2D1DrawTextOptions
      • D2D1DrawingStateBlock
      • D2D1DrawingStateDescription
      • D2D1Ellipse
      • D2D1EllipseGeometry
      • D2D1Error
      • D2D1ExtendMode
      • D2D1Factory
      • D2D1FactoryOptions
      • D2D1FactoryType
      • D2D1FeatureLevel
      • D2D1FigureBegin
      • D2D1FigureEnd
      • D2D1FillMode
      • D2D1Gamma
      • D2D1Geometry
      • D2D1GeometryGroup
      • D2D1GeometryRelation
      • D2D1GeometrySimplificationOption
      • D2D1GeometrySink
      • D2D1GradientStop
      • D2D1GradientStopCollection
      • D2D1HwndRenderTarget
      • D2D1HwndRenderTargetProperties
      • D2D1Image
      • D2D1InterpolationModeDefinition
      • D2D1KnownColor
      • D2D1Layer
      • D2D1LayerOptions
      • D2D1LayerParameters
      • D2D1LineJoin
      • D2D1LinearGradientBrush
      • D2D1LinearGradientBrushProperties
      • D2D1Matrix3X2F
      • D2D1Matrix4X3F
      • D2D1Matrix4X4F
      • D2D1Matrix5X4F
      • D2D1Mesh
      • D2D1OpacityMaskContent
      • D2D1PathGeometry
      • D2D1PathSegmentOptions
      • D2D1PixelFormat
      • D2D1Point2F
      • D2D1Point2L
      • D2D1Point2U
      • D2D1PresentOptions
      • D2D1QuadraticBezierSegment
      • D2D1RadialGradientBrush
      • D2D1RadialGradientBrushProperties
      • D2D1RectF
      • D2D1RectL
      • D2D1RectU
      • D2D1RectangleGeometry
      • D2D1RenderTarget
      • D2D1RenderTargetProperties
      • D2D1RenderTargetType
      • D2D1RenderTargetUsages
      • D2D1Resource
      • D2D1RoundedRect
      • D2D1RoundedRectangleGeometry
      • D2D1SimplifiedGeometrySink
      • D2D1SizeF
      • D2D1SizeU
      • D2D1SolidColorBrush
      • D2D1StrokeStyle
      • D2D1StrokeStyleProperties
      • D2D1SweepDirection
      • D2D1TessellationSink
      • D2D1TextAntialiasMode
      • D2D1TransformedGeometry
      • D2D1Triangle
      • D2D1Utils
      • D2D1Vector2F
      • D2D1Vector3F
      • D2D1Vector4F
      • D2D1WindowStates
      • ID2D1Releasable
    • JeremyAnsel.DirectX.D3D10
      • D3D10CreateDeviceOptions
      • D3D10Device1
      • D3D10DriverType
      • D3D10Error
      • D3D10FeatureLevel
      • D3D10Utils
      • ID3D10Releasable
    • JeremyAnsel.DirectX.D3D11
      • D3D11AsyncGetDataOptions
      • D3D11Asynchronous
      • D3D11BindOptions
      • D3D11BlendDesc
      • D3D11BlendOperation
      • D3D11BlendState
      • D3D11BlendValue
      • D3D11Box
      • D3D11Buffer
      • D3D11BufferDesc
      • D3D11BufferExSrv
      • D3D11BufferExSrvOptions
      • D3D11BufferRtv
      • D3D11BufferSrv
      • D3D11BufferUav
      • D3D11BufferUavOptions
      • D3D11ClassInstance
      • D3D11ClassInstanceDesc
      • D3D11ClassLinkage
      • D3D11ClearOptions
      • D3D11ColorWriteEnables
      • D3D11CommandList
      • D3D11ComparisonFunction
      • D3D11ComputeShader
      • D3D11Constants
      • D3D11Counter
      • D3D11CounterDataType
      • D3D11CounterDesc
      • D3D11CounterInfo
      • D3D11CounterType
      • D3D11CpuAccessOptions
      • D3D11CreateDeviceOptions
      • D3D11CullMode
      • D3D11DepthStencilDesc
      • D3D11DepthStencilOperationDesc
      • D3D11DepthStencilState
      • D3D11DepthStencilView
      • D3D11DepthStencilViewDesc
      • D3D11DepthStencilViewOptions
      • D3D11DepthWriteMask
      • D3D11Device
      • D3D11DeviceChild
      • D3D11DeviceContext
      • D3D11DeviceContextType
      • D3D11DomainShader
      • D3D11DriverType
      • D3D11DsvDimension
      • D3D11Error
      • D3D11Feature
      • D3D11FeatureDataArchitectureInfo
      • D3D11FeatureDataD3D10XHardwareOptions
      • D3D11FeatureDataD3D11Options
      • D3D11FeatureDataD3D11Options1
      • D3D11FeatureDataD3D9Options
      • D3D11FeatureDataD3D9Options1
      • D3D11FeatureDataD3D9ShadowSupport
      • D3D11FeatureDataD3D9SimpleInstancingSupport
      • D3D11FeatureDataDoubles
      • D3D11FeatureDataFormatSupport
      • D3D11FeatureDataFormatSupport2
      • D3D11FeatureDataMarkerSupport
      • D3D11FeatureDataShaderMinPrecisionSupport
      • D3D11FeatureDataThreading
      • D3D11FeatureLevel
      • D3D11FillMode
      • D3D11Filter
      • D3D11FormatSupport
      • D3D11FormatSupport2
      • D3D11GeometryShader
      • D3D11HullShader
      • D3D11InputClassification
      • D3D11InputElementDesc
      • D3D11InputLayout
      • D3D11MapCpuPermission
      • D3D11MapOptions
      • D3D11MappedSubResource
      • D3D11PixelShader
      • D3D11Predicate
      • D3D11Primitive
      • D3D11PrimitiveTopology
      • D3D11Query
      • D3D11QueryDataPipelineStatistics
      • D3D11QueryDataStreamOutputStatistics
      • D3D11QueryDataTimestampDisjoint
      • D3D11QueryDesc
      • D3D11QueryMiscOptions
      • D3D11QueryType
      • D3D11RaiseOptions
      • D3D11RasterizerDesc
      • D3D11RasterizerState
      • D3D11Rect
      • D3D11RenderTargetBlendDesc
      • D3D11RenderTargetView
      • D3D11RenderTargetViewDesc
      • D3D11Resource
      • D3D11ResourceDimension
      • D3D11ResourceMiscOptions
      • D3D11RtvDimension
      • D3D11SamplerDesc
      • D3D11SamplerState
      • D3D11ShaderMinPrecisionSupports
      • D3D11ShaderResourceView
      • D3D11ShaderResourceViewDesc
      • D3D11SrvDimension
      • D3D11StencilOperation
      • D3D11StreamOutputDeclarationEntry
      • D3D11SubResourceData
      • D3D11Texture1D
      • D3D11Texture1DArrayDsv
      • D3D11Texture1DArrayRtv
      • D3D11Texture1DArraySrv
      • D3D11Texture1DArrayUav
      • D3D11Texture1DDesc
      • D3D11Texture1DDsv
      • D3D11Texture1DRtv
      • D3D11Texture1DSrv
      • D3D11Texture1DUav
      • D3D11Texture2D
      • D3D11Texture2DArrayDsv
      • D3D11Texture2DArrayRtv
      • D3D11Texture2DArraySrv
      • D3D11Texture2DArrayUav
      • D3D11Texture2DDesc
      • D3D11Texture2DDsv
      • D3D11Texture2DMsArrayDsv
      • D3D11Texture2DMsArrayRtv
      • D3D11Texture2DMsArraySrv
      • D3D11Texture2DMsDsv
      • D3D11Texture2DMsRtv
      • D3D11Texture2DMsSrv
      • D3D11Texture2DRtv
      • D3D11Texture2DSrv
      • D3D11Texture2DUav
      • D3D11Texture3D
      • D3D11Texture3DDesc
      • D3D11Texture3DRtv
      • D3D11Texture3DSrv
      • D3D11Texture3DUav
      • D3D11TextureAddressMode
      • D3D11TextureCubeArraySrv
      • D3D11TextureCubeFace
      • D3D11TextureCubeSrv
      • D3D11TiledResourcesTier
      • D3D11UavDimension
      • D3D11UnorderedAccessView
      • D3D11UnorderedAccessViewDesc
      • D3D11Usage
      • D3D11Utils
      • D3D11VertexShader
      • D3D11View
      • D3D11Viewport
      • D3D11WellKnownPrivateDataId
      • DxgiSwapChainExtensions
      • ID3D11Releasable
    • JeremyAnsel.DirectX.D3DCompiler
      • D3DCompile
      • D3DCompileOptions
      • D3DDisassembleOptions
      • D3DShaderMacro
      • D3DTargets
    • JeremyAnsel.DirectX.DWrite
      • DWriteBreakCondition
      • DWriteClusterMetrics
      • DWriteError
      • DWriteFactory
      • DWriteFactoryType
      • DWriteFlowDirection
      • DWriteFont
      • DWriteFontCollection
      • DWriteFontFace
      • DWriteFontFaceType
      • DWriteFontFamily
      • DWriteFontFeature
      • DWriteFontFeatureTag
      • DWriteFontFile
      • DWriteFontFileType
      • DWriteFontList
      • DWriteFontMetrics
      • DWriteFontSimulations
      • DWriteFontStretch
      • DWriteFontStyle
      • DWriteFontWeight
      • DWriteGlyphMetrics
      • DWriteGlyphOffset
      • DWriteGlyphRun
      • DWriteGlyphRunDescription
      • DWriteHitTestMetrics
      • DWriteInformationalStringId
      • DWriteInlineObjectMetrics
      • DWriteLineBreakpoint
      • DWriteLineMetrics
      • DWriteLineSpacingMethod
      • DWriteLocalizedStrings
      • DWriteMatrix
      • DWriteMeasuringMode
      • DWriteNumberSubstitutionMethod
      • DWriteOverhangMetrics
      • DWriteParagraphAlignment
      • DWritePixelGeometry
      • DWriteReadingDirection
      • DWriteRect
      • DWriteRenderingMode
      • DWriteRenderingParams
      • DWriteScriptAnalysis
      • DWriteScriptShape
      • DWriteShapingGlyphProperties
      • DWriteShapingTextProperties
      • DWriteSize
      • DWriteStrikethrough
      • DWriteTextAlignment
      • DWriteTextFormat
      • DWriteTextLayout
      • DWriteTextMetrics
      • DWriteTextRange
      • DWriteTextureType
      • DWriteTrimming
      • DWriteTrimmingGranularity
      • DWriteTypography
      • DWriteUnderline
      • DWriteUtils
      • DWriteWordWrapping
      • IDWriteReleasable
    • JeremyAnsel.DirectX.DXMath
      • XMColor
      • XMComparisonRecord
      • XMFloat2
      • XMFloat3
      • XMFloat3X3
      • XMFloat4
      • XMFloat4X3
      • XMFloat4X4
      • XMInt2
      • XMInt3
      • XMInt4
      • XMKnownColor
      • XMMath
      • XMMatrix
      • XMPermutation
      • XMPlane
      • XMQuaternion
      • XMScalar
      • XMSelection
      • XMSwizzle
      • XMUInt2
      • XMUInt3
      • XMUInt4
      • XMVector
      • XMVector2
      • XMVector3
      • XMVector4
    • JeremyAnsel.DirectX.DXMath.Collision
      • BoundingBox
      • BoundingFrustum
      • BoundingOrientedBox
      • BoundingSphere
      • ContainmentType
      • PlaneIntersectionType
      • TriangleTest
    • JeremyAnsel.DirectX.DXMath.PackedVector
      • Half
      • XMByte2
      • XMByte4
      • XMByteN2
      • XMByteN4
      • XMColorRgba
      • XMDec4
      • XMDecN4
      • XMFloat3Packed
      • XMFloat3SharedExponent
      • XMHalf2
      • XMHalf4
      • XMShort2
      • XMShort4
      • XMShortN2
      • XMShortN4
      • XMU555
      • XMU565
      • XMUByte2
      • XMUByte4
      • XMUByteN2
      • XMUByteN4
      • XMUDec4
      • XMUDecN4
      • XMUDecN4XR
      • XMUNibble4
      • XMUShort2
      • XMUShort4
      • XMUShortN2
      • XMUShortN4
      • XMXDec4
      • XMXDecN4
    • JeremyAnsel.DirectX.Dxgi
      • DxgiAdapter
      • DxgiAdapter1
      • DxgiAdapter2
      • DxgiAdapter3
      • DxgiAdapterDesc
      • DxgiAdapterDesc1
      • DxgiAdapterDesc2
      • DxgiAdapterType
      • DxgiAlphaMode
      • DxgiColorRgb
      • DxgiColorRgba
      • DxgiComputePreemptionGranularity
      • DxgiCpuAccess
      • DxgiCreateFactoryOptions
      • DxgiDevice
      • DxgiDevice1
      • DxgiDevice2
      • DxgiDevice3
      • DxgiDeviceSubObject
      • DxgiEnumModes
      • DxgiError
      • DxgiFactory
      • DxgiFactory1
      • DxgiFactory2
      • DxgiFactory3
      • DxgiFormat
      • DxgiFrameStatistics
      • DxgiGammaControl
      • DxgiGammaControlCapabilities
      • DxgiGraphicsPreemptionGranularity
      • DxgiKeyedMutex
      • DxgiMapOptions
      • DxgiMappedRect
      • DxgiMatrix3x2F
      • DxgiModeDesc
      • DxgiModeDesc1
      • DxgiModeRotation
      • DxgiModeScaling
      • DxgiModeScanlineOrder
      • DxgiObject
      • DxgiOfferResourcePriority
      • DxgiOutput
      • DxgiOutput1
      • DxgiOutput2
      • DxgiOutput3
      • DxgiOutputDesc
      • DxgiPoint
      • DxgiPresentOptions
      • DxgiRational
      • DxgiRect
      • DxgiResidency
      • DxgiResource
      • DxgiResource1
      • DxgiResource2
      • DxgiResource3
      • DxgiResourceEvictionPriority
      • DxgiSampleDesc
      • DxgiScaling
      • DxgiSharedResource
      • DxgiSharedResourceAccess
      • DxgiSurface
      • DxgiSurface1
      • DxgiSurface2
      • DxgiSurface3
      • DxgiSurfaceDesc
      • DxgiSwapChain
      • DxgiSwapChain1
      • DxgiSwapChain2
      • DxgiSwapChain3
      • DxgiSwapChainDesc
      • DxgiSwapChainDesc1
      • DxgiSwapChainFullscreenDesc
      • DxgiSwapChainOptions
      • DxgiSwapEffect
      • DxgiUsages
      • DxgiUtils
      • DxgiWindowAssociationOptions
      • IDxgiReleasable

    Class D2D1RenderTarget

    Represents an object that can receive drawing commands.

    Inheritance
    object
    D2D1Resource
    D2D1RenderTarget
    D2D1BitmapRenderTarget
    D2D1DCRenderTarget
    D2D1HwndRenderTarget
    Implements
    IDisposable
    ID2D1Releasable
    Inherited Members
    D2D1Resource.Handle
    D2D1Resource.ToBoolean()
    D2D1Resource.Dispose()
    D2D1Resource.Release()
    D2D1Resource.GetFactory()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: JeremyAnsel.DirectX.D2D1
    Assembly: JeremyAnsel.DirectX.D2D1.dll
    Syntax
    public abstract class D2D1RenderTarget : D2D1Resource, IDisposable, ID2D1Releasable

    Properties

    | Edit this page View Source

    AntialiasMode

    Gets or sets the current antialiasing mode for nontext drawing operations.

    Declaration
    public D2D1AntialiasMode AntialiasMode { get; set; }
    Property Value
    Type Description
    D2D1AntialiasMode
    | Edit this page View Source

    MaximumBitmapSize

    Gets the maximum size, in device-dependent units (pixels), of any one bitmap dimension supported by the render target.

    Declaration
    public uint MaximumBitmapSize { get; }
    Property Value
    Type Description
    uint
    | Edit this page View Source

    PixelFormat

    Gets the pixel format and alpha mode of the render target.

    Declaration
    public D2D1PixelFormat PixelFormat { get; }
    Property Value
    Type Description
    D2D1PixelFormat
    | Edit this page View Source

    PixelSize

    Gets the size of the render target in device pixels.

    Declaration
    public D2D1SizeU PixelSize { get; }
    Property Value
    Type Description
    D2D1SizeU
    | Edit this page View Source

    Size

    Gets the size of the render target in device-independent pixels.

    Declaration
    public D2D1SizeF Size { get; }
    Property Value
    Type Description
    D2D1SizeF
    | Edit this page View Source

    TextAntialiasMode

    Gets or sets the current antialiasing mode for text and glyph drawing operations.

    Declaration
    public D2D1TextAntialiasMode TextAntialiasMode { get; set; }
    Property Value
    Type Description
    D2D1TextAntialiasMode
    | Edit this page View Source

    Transform

    Gets or sets the current transform of the render target.

    Declaration
    public D2D1Matrix3X2F Transform { get; set; }
    Property Value
    Type Description
    D2D1Matrix3X2F

    Methods

    | Edit this page View Source

    BeginDraw()

    Initiates drawing on this render target.

    Declaration
    public void BeginDraw()
    | Edit this page View Source

    Clear()

    Clears the drawing area to the specified color.

    Declaration
    public void Clear()
    | Edit this page View Source

    Clear(D2D1ColorF)

    Clears the drawing area to the specified color.

    Declaration
    public void Clear(D2D1ColorF clearColor)
    Parameters
    Type Name Description
    D2D1ColorF clearColor

    The color to which the drawing area is cleared.

    | Edit this page View Source

    CreateBitmap(D2D1SizeU, D2D1BitmapProperties)

    Creates a Direct2D bitmap from a pointer to in-memory source data.

    Declaration
    public D2D1Bitmap CreateBitmap(D2D1SizeU size, D2D1BitmapProperties bitmapProperties)
    Parameters
    Type Name Description
    D2D1SizeU size

    The dimension of the bitmap to create in pixels.

    D2D1BitmapProperties bitmapProperties

    The pixel format and dots per inch (DPI) of the bitmap to create.

    Returns
    Type Description
    D2D1Bitmap

    The new bitmap.

    | Edit this page View Source

    CreateBitmap(D2D1SizeU, byte[], uint, D2D1BitmapProperties)

    Creates a Direct2D bitmap from a pointer to in-memory source data.

    Declaration
    public D2D1Bitmap CreateBitmap(D2D1SizeU size, byte[] srcData, uint pitch, D2D1BitmapProperties bitmapProperties)
    Parameters
    Type Name Description
    D2D1SizeU size

    The dimension of the bitmap to create in pixels.

    byte[] srcData

    The image data, or null to create an uninitialized bitmap.

    uint pitch

    The byte count of each scanline, which is equal to (the image width in pixels × the number of bytes per pixel) + memory padding. If srcData is NULL, this value is ignored. (Note that pitch is also sometimes called stride.)

    D2D1BitmapProperties bitmapProperties

    The pixel format and dots per inch (DPI) of the bitmap to create.

    Returns
    Type Description
    D2D1Bitmap

    The new bitmap.

    | Edit this page View Source

    CreateBitmap(D2D1SizeU, nint, uint, D2D1BitmapProperties)

    Creates a Direct2D bitmap from a pointer to in-memory source data.

    Declaration
    public D2D1Bitmap CreateBitmap(D2D1SizeU size, nint srcData, uint pitch, D2D1BitmapProperties bitmapProperties)
    Parameters
    Type Name Description
    D2D1SizeU size

    The dimension of the bitmap to create in pixels.

    nint srcData

    A pointer to the memory location of the image data, or NULL to create an uninitialized bitmap.

    uint pitch

    The byte count of each scanline, which is equal to (the image width in pixels × the number of bytes per pixel) + memory padding. If srcData is NULL, this value is ignored. (Note that pitch is also sometimes called stride.)

    D2D1BitmapProperties bitmapProperties

    The pixel format and dots per inch (DPI) of the bitmap to create.

    Returns
    Type Description
    D2D1Bitmap

    The new bitmap.

    | Edit this page View Source

    CreateBitmapBrush(D2D1Bitmap)

    Creates an D2D1BitmapBrush from the specified bitmap.

    Declaration
    public D2D1BitmapBrush CreateBitmapBrush(D2D1Bitmap bitmap)
    Parameters
    Type Name Description
    D2D1Bitmap bitmap

    The bitmap contents of the new brush.

    Returns
    Type Description
    D2D1BitmapBrush

    The new brush.

    | Edit this page View Source

    CreateBitmapBrush(D2D1Bitmap, D2D1BitmapBrushProperties)

    Creates an D2D1BitmapBrush from the specified bitmap.

    Declaration
    public D2D1BitmapBrush CreateBitmapBrush(D2D1Bitmap bitmap, D2D1BitmapBrushProperties bitmapBrushProperties)
    Parameters
    Type Name Description
    D2D1Bitmap bitmap

    The bitmap contents of the new brush.

    D2D1BitmapBrushProperties bitmapBrushProperties

    The extend modes and interpolation mode of the new brush.

    Returns
    Type Description
    D2D1BitmapBrush

    The new brush.

    | Edit this page View Source

    CreateBitmapBrush(D2D1Bitmap, D2D1BitmapBrushProperties, D2D1BrushProperties)

    Creates an D2D1BitmapBrush from the specified bitmap.

    Declaration
    public D2D1BitmapBrush CreateBitmapBrush(D2D1Bitmap bitmap, D2D1BitmapBrushProperties bitmapBrushProperties, D2D1BrushProperties brushProperties)
    Parameters
    Type Name Description
    D2D1Bitmap bitmap

    The bitmap contents of the new brush.

    D2D1BitmapBrushProperties bitmapBrushProperties

    The extend modes and interpolation mode of the new brush.

    D2D1BrushProperties brushProperties

    A structure that contains the opacity and transform of the new brush.

    Returns
    Type Description
    D2D1BitmapBrush

    The new brush.

    | Edit this page View Source

    CreateBitmapFromWicBitmap(object)

    Creates an D2D1Bitmap by copying the specified Microsoft Windows Imaging Component (WIC) bitmap.

    Declaration
    public D2D1Bitmap CreateBitmapFromWicBitmap(object wicBitmapSource)
    Parameters
    Type Name Description
    object wicBitmapSource

    The WIC bitmap to copy.

    Returns
    Type Description
    D2D1Bitmap

    The new bitmap.

    | Edit this page View Source

    CreateBitmapFromWicBitmap(object, D2D1BitmapProperties)

    Creates an D2D1Bitmap by copying the specified Microsoft Windows Imaging Component (WIC) bitmap.

    Declaration
    public D2D1Bitmap CreateBitmapFromWicBitmap(object wicBitmapSource, D2D1BitmapProperties bitmapProperties)
    Parameters
    Type Name Description
    object wicBitmapSource

    The WIC bitmap to copy.

    D2D1BitmapProperties bitmapProperties

    The pixel format and DPI of the bitmap to create.

    Returns
    Type Description
    D2D1Bitmap

    The new bitmap.

    | Edit this page View Source

    CreateCompatibleRenderTarget()

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget()
    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1CompatibleRenderTargetOptions)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1CompatibleRenderTargetOptions options)
    Parameters
    Type Name Description
    D2D1CompatibleRenderTargetOptions options

    A value that specifies whether the new render target must be compatible with GDI.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1PixelFormat, D2D1CompatibleRenderTargetOptions)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1PixelFormat desiredFormat, D2D1CompatibleRenderTargetOptions options)
    Parameters
    Type Name Description
    D2D1PixelFormat desiredFormat

    The desired pixel format and alpha mode of the new render target.

    D2D1CompatibleRenderTargetOptions options

    A value that specifies whether the new render target must be compatible with GDI.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeF)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize)
    Parameters
    Type Name Description
    D2D1SizeF desiredSize

    The desired size of the new render target in device-independent pixels if it should be different from the original render target.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeF, D2D1CompatibleRenderTargetOptions)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1CompatibleRenderTargetOptions options)
    Parameters
    Type Name Description
    D2D1SizeF desiredSize

    The desired size of the new render target in device-independent pixels if it should be different from the original render target.

    D2D1CompatibleRenderTargetOptions options

    A value that specifies whether the new render target must be compatible with GDI.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeF, D2D1PixelFormat, D2D1CompatibleRenderTargetOptions)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1PixelFormat desiredFormat, D2D1CompatibleRenderTargetOptions options)
    Parameters
    Type Name Description
    D2D1SizeF desiredSize

    The desired size of the new render target in device-independent pixels if it should be different from the original render target.

    D2D1PixelFormat desiredFormat

    The desired pixel format and alpha mode of the new render target.

    D2D1CompatibleRenderTargetOptions options

    A value that specifies whether the new render target must be compatible with GDI.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeF, D2D1SizeU)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1SizeU desiredPixelSize)
    Parameters
    Type Name Description
    D2D1SizeF desiredSize

    The desired size of the new render target in device-independent pixels if it should be different from the original render target.

    D2D1SizeU desiredPixelSize

    The desired size of the new render target in pixels if it should be different from the original render target.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeF, D2D1SizeU, D2D1CompatibleRenderTargetOptions)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1SizeU desiredPixelSize, D2D1CompatibleRenderTargetOptions options)
    Parameters
    Type Name Description
    D2D1SizeF desiredSize

    The desired size of the new render target in device-independent pixels if it should be different from the original render target.

    D2D1SizeU desiredPixelSize

    The desired size of the new render target in pixels if it should be different from the original render target.

    D2D1CompatibleRenderTargetOptions options

    A value that specifies whether the new render target must be compatible with GDI.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeF, D2D1SizeU, D2D1PixelFormat)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1SizeU desiredPixelSize, D2D1PixelFormat desiredFormat)
    Parameters
    Type Name Description
    D2D1SizeF desiredSize

    The desired size of the new render target in device-independent pixels if it should be different from the original render target.

    D2D1SizeU desiredPixelSize

    The desired size of the new render target in pixels if it should be different from the original render target.

    D2D1PixelFormat desiredFormat

    The desired pixel format and alpha mode of the new render target.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeF, D2D1SizeU, D2D1PixelFormat, D2D1CompatibleRenderTargetOptions)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1SizeU desiredPixelSize, D2D1PixelFormat desiredFormat, D2D1CompatibleRenderTargetOptions options)
    Parameters
    Type Name Description
    D2D1SizeF desiredSize

    The desired size of the new render target in device-independent pixels if it should be different from the original render target.

    D2D1SizeU desiredPixelSize

    The desired size of the new render target in pixels if it should be different from the original render target.

    D2D1PixelFormat desiredFormat

    The desired pixel format and alpha mode of the new render target.

    D2D1CompatibleRenderTargetOptions options

    A value that specifies whether the new render target must be compatible with GDI.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeU, D2D1CompatibleRenderTargetOptions)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeU desiredPixelSize, D2D1CompatibleRenderTargetOptions options)
    Parameters
    Type Name Description
    D2D1SizeU desiredPixelSize

    The desired size of the new render target in pixels if it should be different from the original render target.

    D2D1CompatibleRenderTargetOptions options

    A value that specifies whether the new render target must be compatible with GDI.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateCompatibleRenderTarget(D2D1SizeU, D2D1PixelFormat, D2D1CompatibleRenderTargetOptions)

    Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.

    Declaration
    public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeU desiredPixelSize, D2D1PixelFormat desiredFormat, D2D1CompatibleRenderTargetOptions options)
    Parameters
    Type Name Description
    D2D1SizeU desiredPixelSize

    The desired size of the new render target in pixels if it should be different from the original render target.

    D2D1PixelFormat desiredFormat

    The desired pixel format and alpha mode of the new render target.

    D2D1CompatibleRenderTargetOptions options

    A value that specifies whether the new render target must be compatible with GDI.

    Returns
    Type Description
    D2D1BitmapRenderTarget

    The new bitmap render target.

    | Edit this page View Source

    CreateGradientStopCollection(D2D1GradientStop[])

    Creates an D2D1GradientStopCollection from the specified gradient stops, color interpolation gamma, and extend mode.

    Declaration
    public D2D1GradientStopCollection CreateGradientStopCollection(D2D1GradientStop[] gradientStops)
    Parameters
    Type Name Description
    D2D1GradientStop[] gradientStops

    An array of D2D1GradientStop structures.

    Returns
    Type Description
    D2D1GradientStopCollection

    The new gradient stop collection.

    | Edit this page View Source

    CreateGradientStopCollection(D2D1GradientStop[], D2D1Gamma, D2D1ExtendMode)

    Creates an D2D1GradientStopCollection from the specified gradient stops, color interpolation gamma, and extend mode.

    Declaration
    public D2D1GradientStopCollection CreateGradientStopCollection(D2D1GradientStop[] gradientStops, D2D1Gamma colorInterpolationGamma, D2D1ExtendMode extendMode)
    Parameters
    Type Name Description
    D2D1GradientStop[] gradientStops

    An array of D2D1GradientStop structures.

    D2D1Gamma colorInterpolationGamma

    The space in which color interpolation between the gradient stops is performed.

    D2D1ExtendMode extendMode

    The behavior of the gradient outside the [0,1] normalized range.

    Returns
    Type Description
    D2D1GradientStopCollection

    The new gradient stop collection.

    | Edit this page View Source

    CreateLayer()

    Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size.

    Declaration
    public D2D1Layer CreateLayer()
    Returns
    Type Description
    D2D1Layer

    The new layer.

    | Edit this page View Source

    CreateLayer(D2D1SizeF)

    Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size.

    Declaration
    public D2D1Layer CreateLayer(D2D1SizeF size)
    Parameters
    Type Name Description
    D2D1SizeF size

    The initial size of the layer in device-independent pixels.

    Returns
    Type Description
    D2D1Layer

    The new layer.

    | Edit this page View Source

    CreateLinearGradientBrush(D2D1LinearGradientBrushProperties, D2D1BrushProperties, D2D1GradientStopCollection)

    Creates an D2D1LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.

    Declaration
    public D2D1LinearGradientBrush CreateLinearGradientBrush(D2D1LinearGradientBrushProperties linearGradientBrushProperties, D2D1BrushProperties brushProperties, D2D1GradientStopCollection gradientStopCollection)
    Parameters
    Type Name Description
    D2D1LinearGradientBrushProperties linearGradientBrushProperties

    The start and end points of the gradient.

    D2D1BrushProperties brushProperties

    The transform and base opacity of the new brush.

    D2D1GradientStopCollection gradientStopCollection

    A collection of D2D1GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient line.

    Returns
    Type Description
    D2D1LinearGradientBrush

    The new brush.

    | Edit this page View Source

    CreateLinearGradientBrush(D2D1LinearGradientBrushProperties, D2D1GradientStopCollection)

    Creates an D2D1LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.

    Declaration
    public D2D1LinearGradientBrush CreateLinearGradientBrush(D2D1LinearGradientBrushProperties linearGradientBrushProperties, D2D1GradientStopCollection gradientStopCollection)
    Parameters
    Type Name Description
    D2D1LinearGradientBrushProperties linearGradientBrushProperties

    The start and end points of the gradient.

    D2D1GradientStopCollection gradientStopCollection

    A collection of D2D1GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient line.

    Returns
    Type Description
    D2D1LinearGradientBrush

    The new brush.

    | Edit this page View Source

    CreateMesh()

    Create a mesh that uses triangles to describe a shape.

    Declaration
    public D2D1Mesh CreateMesh()
    Returns
    Type Description
    D2D1Mesh

    The new mesh.

    | Edit this page View Source

    CreateRadialGradientBrush(D2D1RadialGradientBrushProperties, D2D1BrushProperties, D2D1GradientStopCollection)

    Creates an D2D1RadialGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.

    Declaration
    public D2D1RadialGradientBrush CreateRadialGradientBrush(D2D1RadialGradientBrushProperties radialGradientBrushProperties, D2D1BrushProperties brushProperties, D2D1GradientStopCollection gradientStopCollection)
    Parameters
    Type Name Description
    D2D1RadialGradientBrushProperties radialGradientBrushProperties

    The center, gradient origin offset, and x-radius and y-radius of the brush's gradient.

    D2D1BrushProperties brushProperties

    The transform and base opacity of the new brush.

    D2D1GradientStopCollection gradientStopCollection

    A collection of D2D1GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient.

    Returns
    Type Description
    D2D1RadialGradientBrush

    The new brush.

    | Edit this page View Source

    CreateRadialGradientBrush(D2D1RadialGradientBrushProperties, D2D1GradientStopCollection)

    Creates an D2D1RadialGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.

    Declaration
    public D2D1RadialGradientBrush CreateRadialGradientBrush(D2D1RadialGradientBrushProperties radialGradientBrushProperties, D2D1GradientStopCollection gradientStopCollection)
    Parameters
    Type Name Description
    D2D1RadialGradientBrushProperties radialGradientBrushProperties

    The center, gradient origin offset, and x-radius and y-radius of the brush's gradient.

    D2D1GradientStopCollection gradientStopCollection

    A collection of D2D1GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient.

    Returns
    Type Description
    D2D1RadialGradientBrush

    The new brush.

    | Edit this page View Source

    CreateSharedBitmap(Guid, object)

    Creates an D2D1Bitmap whose data is shared with another resource.

    Declaration
    public D2D1Bitmap CreateSharedBitmap(Guid riid, object data)
    Parameters
    Type Name Description
    Guid riid

    The interface ID of the object supplying the source data.

    object data

    The data to share.

    Returns
    Type Description
    D2D1Bitmap

    The new bitmap.

    | Edit this page View Source

    CreateSharedBitmap(Guid, object, D2D1BitmapProperties)

    Creates an D2D1Bitmap whose data is shared with another resource.

    Declaration
    public D2D1Bitmap CreateSharedBitmap(Guid riid, object data, D2D1BitmapProperties bitmapProperties)
    Parameters
    Type Name Description
    Guid riid

    The interface ID of the object supplying the source data.

    object data

    The data to share.

    D2D1BitmapProperties bitmapProperties

    The pixel format and DPI of the bitmap to create.

    Returns
    Type Description
    D2D1Bitmap

    The new bitmap.

    | Edit this page View Source

    CreateSolidColorBrush(D2D1ColorF)

    Creates a new D2D1SolidColorBrush that has the specified color and opacity.

    Declaration
    public D2D1SolidColorBrush CreateSolidColorBrush(D2D1ColorF color)
    Parameters
    Type Name Description
    D2D1ColorF color

    The red, green, blue, and alpha values of the brush's color.

    Returns
    Type Description
    D2D1SolidColorBrush

    The new brush.

    | Edit this page View Source

    CreateSolidColorBrush(D2D1ColorF, D2D1BrushProperties)

    Creates a new D2D1SolidColorBrush that has the specified color and opacity.

    Declaration
    public D2D1SolidColorBrush CreateSolidColorBrush(D2D1ColorF color, D2D1BrushProperties brushProperties)
    Parameters
    Type Name Description
    D2D1ColorF color

    The red, green, blue, and alpha values of the brush's color.

    D2D1BrushProperties brushProperties

    The base opacity of the brush.

    Returns
    Type Description
    D2D1SolidColorBrush

    The new brush.

    | Edit this page View Source

    DrawBitmap(D2D1Bitmap)

    Draws the specified bitmap after scaling it to the size of the specified rectangle.

    Declaration
    public void DrawBitmap(D2D1Bitmap bitmap)
    Parameters
    Type Name Description
    D2D1Bitmap bitmap

    The bitmap to render.

    | Edit this page View Source

    DrawBitmap(D2D1Bitmap, D2D1RectF)

    Draws the specified bitmap after scaling it to the size of the specified rectangle.

    Declaration
    public void DrawBitmap(D2D1Bitmap bitmap, D2D1RectF destinationRectangle)
    Parameters
    Type Name Description
    D2D1Bitmap bitmap

    The bitmap to render.

    D2D1RectF destinationRectangle

    The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn.

    | Edit this page View Source

    DrawBitmap(D2D1Bitmap, D2D1RectF, float)

    Draws the specified bitmap after scaling it to the size of the specified rectangle.

    Declaration
    public void DrawBitmap(D2D1Bitmap bitmap, D2D1RectF destinationRectangle, float opacity)
    Parameters
    Type Name Description
    D2D1Bitmap bitmap

    The bitmap to render.

    D2D1RectF destinationRectangle

    The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn.

    float opacity

    A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents.

    | Edit this page View Source

    DrawBitmap(D2D1Bitmap, D2D1RectF, float, D2D1BitmapInterpolationMode)

    Draws the specified bitmap after scaling it to the size of the specified rectangle.

    Declaration
    public void DrawBitmap(D2D1Bitmap bitmap, D2D1RectF destinationRectangle, float opacity, D2D1BitmapInterpolationMode interpolationMode)
    Parameters
    Type Name Description
    D2D1Bitmap bitmap

    The bitmap to render.

    D2D1RectF destinationRectangle

    The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn.

    float opacity

    A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents.

    D2D1BitmapInterpolationMode interpolationMode

    The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation.

    | Edit this page View Source

    DrawBitmap(D2D1Bitmap, D2D1RectF, float, D2D1BitmapInterpolationMode, D2D1RectF)

    Draws the specified bitmap after scaling it to the size of the specified rectangle.

    Declaration
    public void DrawBitmap(D2D1Bitmap bitmap, D2D1RectF destinationRectangle, float opacity, D2D1BitmapInterpolationMode interpolationMode, D2D1RectF sourceRectangle)
    Parameters
    Type Name Description
    D2D1Bitmap bitmap

    The bitmap to render.

    D2D1RectF destinationRectangle

    The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn.

    float opacity

    A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents.

    D2D1BitmapInterpolationMode interpolationMode

    The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation.

    D2D1RectF sourceRectangle

    The size and position, in device-independent pixels in the bitmap's coordinate space, of the area within the bitmap to be drawn.

    | Edit this page View Source

    DrawEllipse(D2D1Ellipse, D2D1Brush)

    Draws the outline of the specified ellipse using the specified stroke style.

    Declaration
    public void DrawEllipse(D2D1Ellipse ellipse, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1Ellipse ellipse

    The position and radius of the ellipse to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the ellipse's outline.

    | Edit this page View Source

    DrawEllipse(D2D1Ellipse, D2D1Brush, float)

    Draws the outline of the specified ellipse using the specified stroke style.

    Declaration
    public void DrawEllipse(D2D1Ellipse ellipse, D2D1Brush brush, float strokeWidth)
    Parameters
    Type Name Description
    D2D1Ellipse ellipse

    The position and radius of the ellipse to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the ellipse's outline.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    | Edit this page View Source

    DrawEllipse(D2D1Ellipse, D2D1Brush, float, D2D1StrokeStyle)

    Draws the outline of the specified ellipse using the specified stroke style.

    Declaration
    public void DrawEllipse(D2D1Ellipse ellipse, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
    Parameters
    Type Name Description
    D2D1Ellipse ellipse

    The position and radius of the ellipse to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the ellipse's outline.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    D2D1StrokeStyle strokeStyle

    The style of stroke to apply to the ellipse's outline.

    | Edit this page View Source

    DrawGeometry(D2D1Geometry, D2D1Brush)

    Draws the outline of the specified geometry using the specified stroke style.

    Declaration
    public void DrawGeometry(D2D1Geometry geometry, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1Geometry geometry

    The geometry to draw.

    D2D1Brush brush

    The brush used to paint the geometry's stroke.

    | Edit this page View Source

    DrawGeometry(D2D1Geometry, D2D1Brush, float)

    Draws the outline of the specified geometry using the specified stroke style.

    Declaration
    public void DrawGeometry(D2D1Geometry geometry, D2D1Brush brush, float strokeWidth)
    Parameters
    Type Name Description
    D2D1Geometry geometry

    The geometry to draw.

    D2D1Brush brush

    The brush used to paint the geometry's stroke.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    | Edit this page View Source

    DrawGeometry(D2D1Geometry, D2D1Brush, float, D2D1StrokeStyle)

    Draws the outline of the specified geometry using the specified stroke style.

    Declaration
    public void DrawGeometry(D2D1Geometry geometry, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
    Parameters
    Type Name Description
    D2D1Geometry geometry

    The geometry to draw.

    D2D1Brush brush

    The brush used to paint the geometry's stroke.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    D2D1StrokeStyle strokeStyle

    The style of stroke to apply to the geometry's outline.

    | Edit this page View Source

    DrawGlyphRun(D2D1Point2F, DWriteGlyphRun, D2D1Brush)

    Draws the specified glyphs.

    Declaration
    public void DrawGlyphRun(D2D1Point2F baselineOrigin, DWriteGlyphRun glyphRun, D2D1Brush foregroundBrush)
    Parameters
    Type Name Description
    D2D1Point2F baselineOrigin

    The origin, in device-independent pixels, of the glyphs' baseline.

    DWriteGlyphRun glyphRun

    The glyphs to render.

    D2D1Brush foregroundBrush

    The brush used to paint the specified glyphs.

    | Edit this page View Source

    DrawGlyphRun(D2D1Point2F, DWriteGlyphRun, D2D1Brush, DWriteMeasuringMode)

    Draws the specified glyphs.

    Declaration
    public void DrawGlyphRun(D2D1Point2F baselineOrigin, DWriteGlyphRun glyphRun, D2D1Brush foregroundBrush, DWriteMeasuringMode measuringMode)
    Parameters
    Type Name Description
    D2D1Point2F baselineOrigin

    The origin, in device-independent pixels, of the glyphs' baseline.

    DWriteGlyphRun glyphRun

    The glyphs to render.

    D2D1Brush foregroundBrush

    The brush used to paint the specified glyphs.

    DWriteMeasuringMode measuringMode

    A value that indicates how glyph metrics are used to measure text when it is formatted.

    | Edit this page View Source

    DrawLine(D2D1Point2F, D2D1Point2F, D2D1Brush)

    Draws a line between the specified points using the specified stroke style.

    Declaration
    public void DrawLine(D2D1Point2F point0, D2D1Point2F point1, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1Point2F point0

    The start point of the line, in device-independent pixels.

    D2D1Point2F point1

    The end point of the line, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the line's stroke.

    | Edit this page View Source

    DrawLine(D2D1Point2F, D2D1Point2F, D2D1Brush, float)

    Draws a line between the specified points using the specified stroke style.

    Declaration
    public void DrawLine(D2D1Point2F point0, D2D1Point2F point1, D2D1Brush brush, float strokeWidth)
    Parameters
    Type Name Description
    D2D1Point2F point0

    The start point of the line, in device-independent pixels.

    D2D1Point2F point1

    The end point of the line, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the line's stroke.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    | Edit this page View Source

    DrawLine(D2D1Point2F, D2D1Point2F, D2D1Brush, float, D2D1StrokeStyle)

    Draws a line between the specified points using the specified stroke style.

    Declaration
    public void DrawLine(D2D1Point2F point0, D2D1Point2F point1, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
    Parameters
    Type Name Description
    D2D1Point2F point0

    The start point of the line, in device-independent pixels.

    D2D1Point2F point1

    The end point of the line, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the line's stroke.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    D2D1StrokeStyle strokeStyle

    The style of stroke to paint.

    | Edit this page View Source

    DrawRectangle(D2D1RectF, D2D1Brush)

    Draws the outline of a rectangle that has the specified dimensions and stroke style.

    Declaration
    public void DrawRectangle(D2D1RectF rect, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1RectF rect

    The dimensions of the rectangle to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the rectangle's stroke.

    | Edit this page View Source

    DrawRectangle(D2D1RectF, D2D1Brush, float)

    Draws the outline of a rectangle that has the specified dimensions and stroke style.

    Declaration
    public void DrawRectangle(D2D1RectF rect, D2D1Brush brush, float strokeWidth)
    Parameters
    Type Name Description
    D2D1RectF rect

    The dimensions of the rectangle to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the rectangle's stroke.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    | Edit this page View Source

    DrawRectangle(D2D1RectF, D2D1Brush, float, D2D1StrokeStyle)

    Draws the outline of a rectangle that has the specified dimensions and stroke style.

    Declaration
    public void DrawRectangle(D2D1RectF rect, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
    Parameters
    Type Name Description
    D2D1RectF rect

    The dimensions of the rectangle to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the rectangle's stroke.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    D2D1StrokeStyle strokeStyle

    The style of stroke to paint.

    | Edit this page View Source

    DrawRoundedRectangle(D2D1RoundedRect, D2D1Brush)

    Draws the outline of the specified rounded rectangle using the specified stroke style.

    Declaration
    public void DrawRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1RoundedRect roundedRect

    The dimensions of the rounded rectangle to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the rounded rectangle's outline.

    | Edit this page View Source

    DrawRoundedRectangle(D2D1RoundedRect, D2D1Brush, float)

    Draws the outline of the specified rounded rectangle using the specified stroke style.

    Declaration
    public void DrawRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush, float strokeWidth)
    Parameters
    Type Name Description
    D2D1RoundedRect roundedRect

    The dimensions of the rounded rectangle to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the rounded rectangle's outline.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    | Edit this page View Source

    DrawRoundedRectangle(D2D1RoundedRect, D2D1Brush, float, D2D1StrokeStyle)

    Draws the outline of the specified rounded rectangle using the specified stroke style.

    Declaration
    public void DrawRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
    Parameters
    Type Name Description
    D2D1RoundedRect roundedRect

    The dimensions of the rounded rectangle to draw, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the rounded rectangle's outline.

    float strokeWidth

    The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

    D2D1StrokeStyle strokeStyle

    The style of the rounded rectangle's stroke.

    | Edit this page View Source

    DrawText(string, DWriteTextFormat, D2D1RectF, D2D1Brush)

    Draws the specified text using the format information provided by an DWriteTextFormat object.

    Declaration
    public void DrawText(string text, DWriteTextFormat textFormat, D2D1RectF layoutRect, D2D1Brush defaultForegroundBrush)
    Parameters
    Type Name Description
    string text

    An array of Unicode characters to draw.

    DWriteTextFormat textFormat

    An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.

    D2D1RectF layoutRect

    The size and position of the area in which the text is drawn.

    D2D1Brush defaultForegroundBrush

    The brush used to paint the text.

    | Edit this page View Source

    DrawText(string, DWriteTextFormat, D2D1RectF, D2D1Brush, D2D1DrawTextOptions)

    Draws the specified text using the format information provided by an DWriteTextFormat object.

    Declaration
    public void DrawText(string text, DWriteTextFormat textFormat, D2D1RectF layoutRect, D2D1Brush defaultForegroundBrush, D2D1DrawTextOptions options)
    Parameters
    Type Name Description
    string text

    An array of Unicode characters to draw.

    DWriteTextFormat textFormat

    An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.

    D2D1RectF layoutRect

    The size and position of the area in which the text is drawn.

    D2D1Brush defaultForegroundBrush

    The brush used to paint the text.

    D2D1DrawTextOptions options

    A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle.

    | Edit this page View Source

    DrawText(string, DWriteTextFormat, D2D1RectF, D2D1Brush, D2D1DrawTextOptions, DWriteMeasuringMode)

    Draws the specified text using the format information provided by an DWriteTextFormat object.

    Declaration
    public void DrawText(string text, DWriteTextFormat textFormat, D2D1RectF layoutRect, D2D1Brush defaultForegroundBrush, D2D1DrawTextOptions options, DWriteMeasuringMode measuringMode)
    Parameters
    Type Name Description
    string text

    An array of Unicode characters to draw.

    DWriteTextFormat textFormat

    An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.

    D2D1RectF layoutRect

    The size and position of the area in which the text is drawn.

    D2D1Brush defaultForegroundBrush

    The brush used to paint the text.

    D2D1DrawTextOptions options

    A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle.

    DWriteMeasuringMode measuringMode

    A value that indicates how glyph metrics are used to measure text when it is formatted.

    | Edit this page View Source

    DrawTextLayout(D2D1Point2F, DWriteTextLayout, D2D1Brush)

    Draws the formatted text described by the specified DWriteTextLayout object.

    Declaration
    public void DrawTextLayout(D2D1Point2F origin, DWriteTextLayout textLayout, D2D1Brush defaultForegroundBrush)
    Parameters
    Type Name Description
    D2D1Point2F origin

    The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.

    DWriteTextLayout textLayout

    The formatted text to draw.

    D2D1Brush defaultForegroundBrush

    The brush used to paint any text in textLayout that does not already have a brush associated with it as a drawing effect.

    | Edit this page View Source

    DrawTextLayout(D2D1Point2F, DWriteTextLayout, D2D1Brush, D2D1DrawTextOptions)

    Draws the formatted text described by the specified DWriteTextLayout object.

    Declaration
    public void DrawTextLayout(D2D1Point2F origin, DWriteTextLayout textLayout, D2D1Brush defaultForegroundBrush, D2D1DrawTextOptions options)
    Parameters
    Type Name Description
    D2D1Point2F origin

    The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.

    DWriteTextLayout textLayout

    The formatted text to draw.

    D2D1Brush defaultForegroundBrush

    The brush used to paint any text in textLayout that does not already have a brush associated with it as a drawing effect.

    D2D1DrawTextOptions options

    A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle.

    | Edit this page View Source

    EndDraw()

    Ends drawing operations on the render target and indicates the current error state and associated tags.

    Declaration
    public void EndDraw()
    | Edit this page View Source

    EndDraw(out ulong, out ulong)

    Ends drawing operations on the render target and indicates the current error state and associated tags.

    Declaration
    public void EndDraw(out ulong tag1, out ulong tag2)
    Parameters
    Type Name Description
    ulong tag1

    The first tag for drawing operations that caused errors or 0 if there were no errors.

    ulong tag2

    The second tag for drawing operations that caused errors or 0 if there were no errors.

    | Edit this page View Source

    EndDrawIgnoringRecreateTargetError()

    Ends drawing operations on the render target, ignoring the recreate target error.

    Declaration
    public void EndDrawIgnoringRecreateTargetError()
    | Edit this page View Source

    FillEllipse(D2D1Ellipse, D2D1Brush)

    Paints the interior of the specified ellipse.

    Declaration
    public void FillEllipse(D2D1Ellipse ellipse, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1Ellipse ellipse

    The position and radius, in device-independent pixels, of the ellipse to paint.

    D2D1Brush brush

    The brush used to paint the interior of the ellipse.

    | Edit this page View Source

    FillGeometry(D2D1Geometry, D2D1Brush)

    Paints the interior of the specified geometry.

    Declaration
    public void FillGeometry(D2D1Geometry geometry, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1Geometry geometry

    The geometry to paint.

    D2D1Brush brush

    The brush used to paint the geometry's interior.

    | Edit this page View Source

    FillGeometry(D2D1Geometry, D2D1Brush, D2D1Brush)

    Paints the interior of the specified geometry.

    Declaration
    public void FillGeometry(D2D1Geometry geometry, D2D1Brush brush, D2D1Brush opacityBrush)
    Parameters
    Type Name Description
    D2D1Geometry geometry

    The geometry to paint.

    D2D1Brush brush

    The brush used to paint the geometry's interior.

    D2D1Brush opacityBrush

    The opacity mask to apply to the geometry.

    | Edit this page View Source

    FillMesh(D2D1Mesh, D2D1Brush)

    Paints the interior of the specified mesh.

    Declaration
    public void FillMesh(D2D1Mesh mesh, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1Mesh mesh

    The mesh to paint.

    D2D1Brush brush

    The brush used to paint the mesh.

    | Edit this page View Source

    FillOpacityMask(D2D1Bitmap, D2D1Brush, D2D1OpacityMaskContent)

    Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target.

    Declaration
    public void FillOpacityMask(D2D1Bitmap opacityMask, D2D1Brush brush, D2D1OpacityMaskContent content)
    Parameters
    Type Name Description
    D2D1Bitmap opacityMask

    The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle.

    D2D1Brush brush

    The brush used to paint the region of the render target specified by destinationRectangle.

    D2D1OpacityMaskContent content

    The type of content the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended.

    | Edit this page View Source

    FillOpacityMask(D2D1Bitmap, D2D1Brush, D2D1OpacityMaskContent, D2D1RectF)

    Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target.

    Declaration
    public void FillOpacityMask(D2D1Bitmap opacityMask, D2D1Brush brush, D2D1OpacityMaskContent content, D2D1RectF destinationRectangle)
    Parameters
    Type Name Description
    D2D1Bitmap opacityMask

    The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle.

    D2D1Brush brush

    The brush used to paint the region of the render target specified by destinationRectangle.

    D2D1OpacityMaskContent content

    The type of content the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended.

    D2D1RectF destinationRectangle

    The region of the render target to paint, in device-independent pixels.

    | Edit this page View Source

    FillOpacityMask(D2D1Bitmap, D2D1Brush, D2D1OpacityMaskContent, D2D1RectF, D2D1RectF)

    Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target.

    Declaration
    public void FillOpacityMask(D2D1Bitmap opacityMask, D2D1Brush brush, D2D1OpacityMaskContent content, D2D1RectF destinationRectangle, D2D1RectF sourceRectangle)
    Parameters
    Type Name Description
    D2D1Bitmap opacityMask

    The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle.

    D2D1Brush brush

    The brush used to paint the region of the render target specified by destinationRectangle.

    D2D1OpacityMaskContent content

    The type of content the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended.

    D2D1RectF destinationRectangle

    The region of the render target to paint, in device-independent pixels.

    D2D1RectF sourceRectangle

    The region of the bitmap to use as the opacity mask, in device-independent pixels.

    | Edit this page View Source

    FillRectangle(D2D1RectF, D2D1Brush)

    Paints the interior of the specified rectangle.

    Declaration
    public void FillRectangle(D2D1RectF rect, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1RectF rect

    The dimension of the rectangle to paint, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the rectangle's interior.

    | Edit this page View Source

    FillRoundedRectangle(D2D1RoundedRect, D2D1Brush)

    Paints the interior of the specified rounded rectangle.

    Declaration
    public void FillRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush)
    Parameters
    Type Name Description
    D2D1RoundedRect roundedRect

    The dimensions of the rounded rectangle to paint, in device-independent pixels.

    D2D1Brush brush

    The brush used to paint the interior of the rounded rectangle.

    | Edit this page View Source

    Flush()

    Executes all pending drawing commands.

    Declaration
    public void Flush()
    | Edit this page View Source

    Flush(out ulong, out ulong)

    Executes all pending drawing commands.

    Declaration
    public void Flush(out ulong tag1, out ulong tag2)
    Parameters
    Type Name Description
    ulong tag1

    The first tag for drawing operations that caused errors or 0 if there were no errors.

    ulong tag2

    The second tag for drawing operations that caused errors or 0 if there were no errors.

    | Edit this page View Source

    GetDpi(out float, out float)

    Return the render target's dots per inch (DPI).

    Declaration
    public void GetDpi(out float dpiX, out float dpiY)
    Parameters
    Type Name Description
    float dpiX

    The horizontal DPI of the render target.

    float dpiY

    The vertical DPI of the render target.

    | Edit this page View Source

    GetTags(out ulong, out ulong)

    Gets the label for subsequent drawing operations.

    Declaration
    public void GetTags(out ulong tag1, out ulong tag2)
    Parameters
    Type Name Description
    ulong tag1

    The first label for subsequent drawing operations.

    ulong tag2

    The second label for subsequent drawing operations.

    | Edit this page View Source

    GetTextRenderingParams()

    Retrieves the render target's current text rendering options.

    Declaration
    public DWriteRenderingParams GetTextRenderingParams()
    Returns
    Type Description
    DWriteRenderingParams

    The render target's current text rendering options.

    | Edit this page View Source

    IsSupported(D2D1RenderTargetProperties)

    Indicates whether the render target supports the specified properties.

    Declaration
    public bool IsSupported(D2D1RenderTargetProperties renderTargetProperties)
    Parameters
    Type Name Description
    D2D1RenderTargetProperties renderTargetProperties

    The render target properties to test.

    Returns
    Type Description
    bool

    true if the specified render target properties are supported by this render target; otherwise, false.

    | Edit this page View Source

    PopAxisAlignedClip()

    Removes the last axis-aligned clip from the render target. After this method is called, the clip is no longer applied to subsequent drawing operations.

    Declaration
    public void PopAxisAlignedClip()
    | Edit this page View Source

    PopLayer()

    Stops redirecting drawing operations to the layer that is specified by the last PushLayer(D2D1LayerParameters, D2D1Layer) call.

    Declaration
    public void PopLayer()
    | Edit this page View Source

    PushAxisAlignedClip(D2D1RectF, D2D1AntialiasMode)

    Specifies a rectangle to which all subsequent drawing operations are clipped.

    Declaration
    public void PushAxisAlignedClip(D2D1RectF clipRect, D2D1AntialiasMode antialiasMode)
    Parameters
    Type Name Description
    D2D1RectF clipRect

    The size and position of the clipping area, in device-independent pixels.

    D2D1AntialiasMode antialiasMode

    The antialiasing mode that is used to draw the edges of clip rectangles that have subpixel boundaries, and to blend the clip with the scene contents. The blending is performed once when the PopAxisAlignedClip() method is called, and does not apply to each primitive within the layer.

    | Edit this page View Source

    PushLayer(D2D1LayerParameters, D2D1Layer)

    Adds the specified layer to the render target so that it receives all subsequent drawing operations until PopLayer() is called.

    Declaration
    public void PushLayer(D2D1LayerParameters layerParameters, D2D1Layer layer)
    Parameters
    Type Name Description
    D2D1LayerParameters layerParameters

    The content bounds, geometric mask, opacity, opacity mask, and antialiasing options for the layer.

    D2D1Layer layer

    The layer that receives subsequent drawing operations.

    | Edit this page View Source

    RestoreDrawingState(D2D1DrawingStateBlock)

    Sets the render target's drawing state to that of the specified D2D1DrawingStateBlock.

    Declaration
    public void RestoreDrawingState(D2D1DrawingStateBlock drawingStateBlock)
    Parameters
    Type Name Description
    D2D1DrawingStateBlock drawingStateBlock

    The new drawing state of the render target.

    | Edit this page View Source

    SaveDrawingState(D2D1DrawingStateBlock)

    Saves the current drawing state to the specified D2D1DrawingStateBlock.

    Declaration
    public void SaveDrawingState(D2D1DrawingStateBlock drawingStateBlock)
    Parameters
    Type Name Description
    D2D1DrawingStateBlock drawingStateBlock

    The current drawing state of the render target.

    | Edit this page View Source

    SetDpi(float, float)

    Sets the dots per inch (DPI) of the render target.

    Declaration
    public void SetDpi(float dpiX, float dpiY)
    Parameters
    Type Name Description
    float dpiX

    A value greater than or equal to zero that specifies the horizontal DPI of the render target.

    float dpiY

    A value greater than or equal to zero that specifies the vertical DPI of the render target.

    | Edit this page View Source

    SetTags(ulong, ulong)

    Specifies a label for subsequent drawing operations.

    Declaration
    public void SetTags(ulong tag1, ulong tag2)
    Parameters
    Type Name Description
    ulong tag1

    The first to apply to subsequent drawing operations.

    ulong tag2

    The second to apply to subsequent drawing operations.

    | Edit this page View Source

    SetTextRenderingParams()

    Specifies text rendering options to be applied to all subsequent text and glyph drawing operations.

    Declaration
    public void SetTextRenderingParams()
    | Edit this page View Source

    SetTextRenderingParams(DWriteRenderingParams)

    Specifies text rendering options to be applied to all subsequent text and glyph drawing operations.

    Declaration
    public void SetTextRenderingParams(DWriteRenderingParams textRenderingParams)
    Parameters
    Type Name Description
    DWriteRenderingParams textRenderingParams

    The text rendering options to be applied to all subsequent text and glyph drawing operations.

    Implements

    IDisposable
    ID2D1Releasable
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2014-2022 Jérémy Ansel