[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.Windows.GcD2DBitmapGraphics

Class GcD2DBitmapGraphics

Namespace
GrapeCity.Documents.Imaging.Windows
Assembly
GcDocs.Imaging.Windows.dll

Implements a Direct2D drawing surface.

To create an instance of this class, use the CreateGraphics(Color?) method.

public class GcD2DBitmapGraphics : GcDXGraphics, IDisposable
Inheritance
GcD2DBitmapGraphics
Implements
Inherited Members

Fields

Bitmap

The owning GcD2DBitmap object.

public readonly GcD2DBitmap Bitmap

Field Value

GcD2DBitmap

Properties

Features

For internal use. Gets the features supported by this graphics.

public override GcGraphicsFeatures Features { get; }

Property Value

GcGraphicsFeatures

SurfaceResolution

Gets the resolution of the underlying drawing surface (pixels per inch).

public override float? SurfaceResolution { get; }

Property Value

float?

Methods

AfterDrawAction()

Called after any draw action on the underlying render target.

protected override void AfterDrawAction()

BeforeDrawAction()

Called before any draw action on the underlying render target.

protected override void BeforeDrawAction()

Composite(IGcTransparencyGroup, Rectangle, Point, float?)

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)

Parameters

srcLayer IGcTransparencyGroup
srcBounds Rectangle
dstPosition Point
alpha float?

CreateTransparencyGroup(Rectangle, bool, bool, bool)

For internal use. Creates a IGcTransparencyGroup compatible with this graphics. This group can be used later for:

  1. Compose with graphics using the Composite(IGcTransparencyGroup, Rectangle, Point, float?) method
  2. Create a transparency mask from this group using the CreateTransparencyMask(IGcTransparencyGroup, TransparencyMaskType, Rectangle, IGcTransparencyMaskFilter) method Note! If the transparency group supports IDisposable interface it will be automatically disposed after usage.
public override IGcTransparencyGroup CreateTransparencyGroup(Rectangle size, bool isolated, bool knockout, bool pdfSoftMask)

Parameters

size Rectangle
isolated bool
knockout bool
pdfSoftMask bool

Returns

IGcTransparencyGroup

CreateTransparencyMask(IGcTransparencyGroup, TransparencyMaskType, Rectangle, IGcTransparencyMaskFilter)

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)

Parameters

layer IGcTransparencyGroup
maskType TransparencyMaskType
maskBounds Rectangle
filter IGcTransparencyMaskFilter

Returns

object

Dispose(bool)

Performs cleanup operations on managed and unmanaged resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

GetBlendMode()

For internal use. Returns the current blend mode.

protected override BlendMode GetBlendMode()

Returns

BlendMode

InternalCreateClipRegion(IPath)

For internal use.

protected override IClipRegion InternalCreateClipRegion(IPath graphicsPath)

Parameters

graphicsPath IPath

Returns

IClipRegion

InternalCreateClipRegion(RectangleF)

For internal use.

protected override IClipRegion InternalCreateClipRegion(RectangleF bounds)

Parameters

bounds RectangleF

Returns

IClipRegion

IsBlendModeSupported(BlendMode)

Indicates 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)

Parameters

blendMode BlendMode

The blend mode to check.

Returns

bool

true.

PopTransparencyLayer()

Stops redirecting drawing operations to the transparency layer that was created by the last PushTransparencyLayer(RectangleF?, float) call.

public override void PopTransparencyLayer()

PushTransparencyLayer(RectangleF?, float)

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)

Parameters

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 float

An opacity value that is applied uniformly to all drawings in the layer when compositing to the backplate.

SetBlendMode(BlendMode)

For internal use. Sets the current blend mode.

protected override void SetBlendMode(BlendMode value)

Parameters

value BlendMode

SetTransparencyMask(object)

For 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)

Parameters

nativeMask object