Table of Contents

Method DrawGeometryRealization

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

DrawGeometryRealization(IGeometryRealization, IDeviceBrush)

Renders a given geometry realization to the target with the specified brush.

void DrawGeometryRealization(IGeometryRealization geometryRealization, IDeviceBrush brush)

Parameters

geometryRealization IGeometryRealization

The geometry realization to be rendered.

brush IDeviceBrush

The brush to render the realization with.

Remarks

This method respects all currently set state (transform, DPI, unit mode, target image, clips, layers); however, artifacts such as faceting may appear when rendering the realizations with a large effective scale (either via the transform or the DPI). Callers should create their realizations with an appropriate flattening tolerance using either Default or Compute(in Matrix3x2Float, Vector2Float, float) to compensate for this.
Additionally, callers should be aware of the safe render bounds when creating geometry realizations. If a geometry extends outside of [-524287, 524287] DIPs in either the X- or the Y- direction in its original (pre-transform) coordinate space, then it may be clipped to those bounds when it is realized. This clipping will be visible even if the realization is subsequently transformed to fit within the safe render bounds.