• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class RecordingGraphics

A Graphics surface that records drawing operations into a VectorScene instead of rasterizing. Same public API as Graphics. Reuses all convenience overloads unchanged; only primitives and state hooks are intercepted.

Inheritance
object
Graphics
RecordingGraphics
Implements
IDisposable
Inherited Members
Graphics.FromImage(Image)
Graphics.FromHdc(IntPtr)
Graphics.FromHwnd(IntPtr)
Graphics.Transform
Graphics.PageUnit
Graphics.PageScale
Graphics.FontFallback
Graphics.SmoothingMode
Graphics.InterpolationMode
Graphics.CompositingMode
Graphics.CompositingQuality
Graphics.PixelOffsetMode
Graphics.TextRenderingHint
Graphics.Clip
Graphics.ClipBounds
Graphics.IsClipEmpty
Graphics.VisibleClipBounds
Graphics.RenderingOrigin
Graphics.ResetTransform()
Graphics.MultiplyTransform(Matrix, MatrixOrder)
Graphics.RotateTransform(float, MatrixOrder)
Graphics.ScaleTransform(float, float, MatrixOrder)
Graphics.TranslateTransform(float, float, MatrixOrder)
Graphics.DrawLine(Pen, float, float, float, float)
Graphics.DrawLine(Pen, PointF, PointF)
Graphics.DrawLine(Pen, int, int, int, int)
Graphics.DrawLines(Pen, PointF[])
Graphics.DrawPolylineGroup(Pen, IReadOnlyList<PointF[]>)
Graphics.DrawRectangle(Pen, Rectangle)
Graphics.DrawRectangle(Pen, float, float, float, float)
Graphics.DrawRectangle(Pen, RectangleF)
Graphics.DrawRectangles(Pen, RectangleF[])
Graphics.DrawEllipse(Pen, Rectangle)
Graphics.DrawEllipse(Pen, RectangleF)
Graphics.DrawArc(Pen, RectangleF, float, float)
Graphics.DrawBezier(Pen, PointF, PointF, PointF, PointF)
Graphics.DrawBeziers(Pen, PointF[])
Graphics.DrawCurve(Pen, PointF[], float)
Graphics.DrawClosedCurve(Pen, PointF[], float, FillMode)
Graphics.DrawPolygon(Pen, PointF[])
Graphics.DrawPolygon16(Pen, PointF[])
Graphics.DrawPath(Pen, GraphicsPath)
Graphics.DrawPie(Pen, RectangleF, float, float)
Graphics.FillRectangle(Brush, Rectangle)
Graphics.FillRectangle(Brush, float, float, float, float)
Graphics.FillRectangle(Brush, RectangleF)
Graphics.FillRectangles(Brush, RectangleF[])
Graphics.FillEllipse(Brush, Rectangle)
Graphics.FillEllipse(Brush, RectangleF)
Graphics.FillPolygon(Brush, PointF[], FillMode)
Graphics.FillPolygon16(Brush, PointF[])
Graphics.FillPolygons16(Brush, PointF[][])
Graphics.FillPie(Brush, RectangleF, float, float)
Graphics.FillPath(Brush, GraphicsPath)
Graphics.FillPath(Brush, GraphicsPath, FillMode)
Graphics.FillClosedCurve(Brush, PointF[], FillMode, float)
Graphics.FillRegion(Brush, Region)
Graphics.SetClip(Rectangle, CombineMode)
Graphics.SetClip(RectangleF, CombineMode)
Graphics.SetClip(GraphicsPath, CombineMode)
Graphics.SetClip(Region, CombineMode)
Graphics.IntersectClip(Rectangle)
Graphics.IntersectClip(RectangleF)
Graphics.IntersectClip(Region)
Graphics.ExcludeClip(Rectangle)
Graphics.ExcludeClip(Region)
Graphics.ResetClip()
Graphics.TranslateClip(float, float)
Graphics.BeginContainer()
Graphics.BeginContainer(RectangleF, RectangleF, GraphicsUnit)
Graphics.EndContainer(GraphicsContainer)
Graphics.Clear(Color)
Graphics.Flush()
Graphics.Flush(FlushIntention)
Graphics.CopyFromScreen(int, int, int, int, Size)
Graphics.DrawImage(Image, Point)
Graphics.DrawImage(Image, PointF)
Graphics.DrawImage(Image, int, int)
Graphics.DrawImage(Image, float, float)
Graphics.DrawImage(Image, Rectangle)
Graphics.DrawImage(Image, RectangleF)
Graphics.DrawImage(Image, Point[])
Graphics.DrawImage(Image, PointF[])
Graphics.DrawImage(Image, Rectangle, Rectangle, GraphicsUnit)
Graphics.DrawImage(Image, RectangleF, RectangleF, GraphicsUnit)
Graphics.DrawImage(Image, Rectangle, Rectangle, GraphicsUnit, ImageAttributes)
Graphics.DrawImage(Image, RectangleF, RectangleF, GraphicsUnit, ImageAttributes)
Graphics.DrawImage(Image, PointF, RectangleF, GraphicsUnit)
Graphics.DrawImage(Image, PointF, RectangleF, GraphicsUnit, ImageAttributes)
Graphics.DrawImage(Image, PointF[], RectangleF, GraphicsUnit)
Graphics.DrawImage(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes)
Graphics.DrawImage(Image, Rectangle, int, int, int, int, GraphicsUnit)
Graphics.DrawImage(Image, Rectangle, int, int, int, int, GraphicsUnit, ImageAttributes)
Graphics.DrawImage(Image, Rectangle, float, float, float, float, GraphicsUnit)
Graphics.DrawImage(Image, Rectangle, float, float, float, float, GraphicsUnit, ImageAttributes)
Graphics.DrawImageUnscaled(Image, Point)
Graphics.DrawImageUnscaledAndClipped(Image, Rectangle)
Graphics.GetNearestColor(Color)
Graphics.IsVisible(PointF)
Graphics.IsVisible(RectangleF)
Graphics.Dispose()
Graphics.DrawString(string, Font, Brush, float, float)
Graphics.DrawString(string, Font, Brush, PointF)
Graphics.DrawString(string, Font, Brush, RectangleF)
Graphics.DrawString(string, Font, Brush, float, float, StringFormat)
Graphics.DrawString(string, Font, Brush, PointF, StringFormat)
Graphics.DrawString(string, Font, Brush, RectangleF, StringFormat)
Graphics.DrawStringOnPath(string, Font, Brush, GraphicsPath)
Graphics.DrawStringOnPath(string, Font, Brush, GraphicsPath, StringFormat)
Graphics.DrawStringOnPath(string, Font, Brush, GraphicsPath, StringFormat, TextOnPathOptions)
Graphics.MeasureString(string, Font)
Graphics.MeasureString(string, Font, int)
Graphics.MeasureString(string, Font, SizeF)
Graphics.MeasureString(string, Font, SizeF, StringFormat)
Graphics.MeasureString(string, Font, PointF, StringFormat)
Graphics.DrawRichText(string, RichTextOptions, Brush, RectangleF)
Graphics.DrawRichText(string, RichTextOptions, Brush, RectangleF, StringFormat)
Graphics.MeasureRichText(string, RichTextOptions, SizeF)
Graphics.MeasureRichText(string, RichTextOptions, SizeF, StringFormat)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DRIT.Drawing
Assembly: DRIT.Drawing.dll
Syntax
public sealed class RecordingGraphics : Graphics, IDisposable

Properties

DpiX

Gets the horizontal resolution of the graphics context in pixels per inch.

Declaration
public override float DpiX { get; }
Property Value
Type Description
float
Overrides
Graphics.DpiX

DpiY

Gets the vertical resolution of the graphics context in pixels per inch.

Declaration
public override float DpiY { get; }
Property Value
Type Description
float
Overrides
Graphics.DpiY

Height

Gets the height of the drawing surface in pixels.

Declaration
public override int Height { get; }
Property Value
Type Description
int
Overrides
Graphics.Height

IsRecording

Gets a value indicating whether this graphics surface is a recording (non-raster) surface. When true, DRIT.Drawing.Graphics._target is null and raster core methods are never called.

Declaration
protected override bool IsRecording { get; }
Property Value
Type Description
bool
Overrides
Graphics.IsRecording

Width

Gets the width of the drawing surface in pixels.

Declaration
public override int Width { get; }
Property Value
Type Description
int
Overrides
Graphics.Width

Methods

ClearCore(Color)

Core implementation that clears the surface. Override in a recording surface to capture the command instead of rasterizing.

Declaration
protected override void ClearCore(Color color)
Parameters
Type Name Description
Color color
Overrides
Graphics.ClearCore(Color)

DrawImageCore(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes?)

Core implementation that draws an affine-transformed image. Override in a recording surface to capture the command instead of rasterizing.

Declaration
protected override void DrawImageCore(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes? attr)
Parameters
Type Name Description
Image image
PointF[] destPoints
RectangleF srcRect
GraphicsUnit srcUnit
ImageAttributes attr
Overrides
Graphics.DrawImageCore(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes?)

DrawImageCore(Image, RectangleF, RectangleF, GraphicsUnit, ImageAttributes?)

Core implementation that draws a scaled image. Override in a recording surface to capture the command instead of rasterizing.

Declaration
protected override void DrawImageCore(Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes? attr)
Parameters
Type Name Description
Image image
RectangleF destRect
RectangleF srcRect
GraphicsUnit srcUnit
ImageAttributes attr
Overrides
Graphics.DrawImageCore(Image, RectangleF, RectangleF, GraphicsUnit, ImageAttributes?)

DrawPathCore(Pen, GraphicsPath)

Core implementation that strokes a graphics path. Override in a recording surface to capture the command instead of rasterizing.

Declaration
protected override void DrawPathCore(Pen pen, GraphicsPath path)
Parameters
Type Name Description
Pen pen

The pen to stroke with.

GraphicsPath path

The path to stroke.

Overrides
Graphics.DrawPathCore(Pen, GraphicsPath)

DrawStringCore(string, Font, Brush, RectangleF, StringFormat?)

Draws text using the supplied string, font, brush, and layout rectangle.

Declaration
protected override void DrawStringCore(string s, Font font, Brush brush, RectangleF layoutRect, StringFormat? format)
Parameters
Type Name Description
string s
Font font
Brush brush
RectangleF layoutRect
StringFormat format
Overrides
Graphics.DrawStringCore(string, Font, Brush, RectangleF, StringFormat?)

FillPathCore(Brush, GraphicsPath, FillMode)

Core implementation that fills a graphics path. Override in a recording surface to capture the command instead of rasterizing.

Declaration
protected override void FillPathCore(Brush brush, GraphicsPath path, FillMode fillMode)
Parameters
Type Name Description
Brush brush
GraphicsPath path
FillMode fillMode
Overrides
Graphics.FillPathCore(Brush, GraphicsPath, FillMode)

OnClipChanged()

Called after the clip region changes. Override in a recording surface to capture the new clip state.

Declaration
protected override void OnClipChanged()
Overrides
Graphics.OnClipChanged()

OnHintChanged(object)

Called after a rendering hint, page unit, page scale, or rendering origin changes. Override in a recording surface to capture the new value.

Declaration
protected override void OnHintChanged(object hintValue)
Parameters
Type Name Description
object hintValue

The new hint value.

Overrides
Graphics.OnHintChanged(object)

OnTransformChanged()

Called after the world transform changes. Override in a recording surface to capture the new transform state.

Declaration
protected override void OnTransformChanged()
Overrides
Graphics.OnTransformChanged()

Restore(GraphicsState)

Restores the graphics state to the specified state.

Declaration
public override void Restore(GraphicsState graphicsState)
Parameters
Type Name Description
GraphicsState graphicsState

The graphics state to restore.

Overrides
Graphics.Restore(GraphicsState)

Save()

Saves the current graphics state and returns a GraphicsState object.

Declaration
public override GraphicsState Save()
Returns
Type Description
GraphicsState

The saved graphics state.

Overrides
Graphics.Save()

Implements

IDisposable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX