[]
Implements a Direct2D drawing surface.
To create an instance of this class, use the CreateGraphics(Color?) method.
public class GcD2DBitmapGraphics : GcDXGraphics, IDisposable
The owning GcD2DBitmap object.
public readonly GcD2DBitmap Bitmap
For internal use. Gets the features supported by this graphics.
public override GcGraphicsFeatures Features { get; }
Gets the resolution of the underlying drawing surface (pixels per inch).
public override float? SurfaceResolution { get; }
Called after any draw action on the underlying render target.
protected override void AfterDrawAction()
Called before any draw action on the underlying render target.
protected override void BeforeDrawAction()
For internal use. Composites this GcGraphics and the IGcTransparencyGroup created with the CreateTransparencyGroup(Rectangle, bool, bool, bool) method.
public override void Composite(IGcTransparencyGroup srcLayer, Rectangle srcBounds, Point dstPosition, float? alpha)
srcLayer
IGcTransparencyGroupsrcBounds
RectangledstPosition
Pointalpha
float?For internal use. Creates a IGcTransparencyGroup compatible with this graphics. This group can be used later for:
public override IGcTransparencyGroup CreateTransparencyGroup(Rectangle size, bool isolated, bool knockout, bool pdfSoftMask)
For internal use. Creates a transparency mask from a IGcTransparencyGroup, this mask can be specified for this graphics using SetTransparencyMask(object) method. Note! If the transparency mask supports IDisposable interface it will be automatically disposed after usage.
public override object CreateTransparencyMask(IGcTransparencyGroup layer, TransparencyMaskType maskType, Rectangle maskBounds, IGcTransparencyMaskFilter filter)
layer
IGcTransparencyGroupmaskType
TransparencyMaskTypemaskBounds
Rectanglefilter
IGcTransparencyMaskFilterPerforms cleanup operations on managed and unmanaged resources.
protected override void Dispose(bool disposing)
disposing
boolFor internal use. Returns the current blend mode.
protected override BlendMode GetBlendMode()
For internal use.
protected override IClipRegion InternalCreateClipRegion(IPath graphicsPath)
graphicsPath
IPathFor internal use.
protected override IClipRegion InternalCreateClipRegion(RectangleF bounds)
bounds
RectangleFIndicates whether this graphics implementation supports a specified blend mode.
GcD2DBitmapGraphics supports all blend modes, so this method always returns true.
public override bool IsBlendModeSupported(BlendMode blendMode)
blendMode
BlendModeThe blend mode to check.
Stops redirecting drawing operations to the transparency layer that was created by the last PushTransparencyLayer(RectangleF?, float) call.
public override void PopTransparencyLayer()
Adds a transparency layer to the current graphics. That layer receives all subsequent drawing operations until PopTransparencyLayer() is called.
public override void PushTransparencyLayer(RectangleF? contentBounds, float opacity)
contentBounds
RectangleF?The content bounds of the transparency layer. Content won't render outside these bounds. When set to null, the content bounds are effectively taken to be the bounds of the current graphics.
opacity
floatAn opacity value that is applied uniformly to all drawings in the layer when compositing to the backplate.
For internal use. Sets the current blend mode.
protected override void SetBlendMode(BlendMode value)
value
BlendModeFor internal use.
Sets a transparency mask for subsequent drawing operations, mask
was created with IGcGraphicsLayer.CreateTransparencyMask().
Note! mask
can be null, in this case mask should be removed.
public override void SetTransparencyMask(object nativeMask)
nativeMask
object