Table of Contents

Interface IGraphics

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Contains methods and properties which allow to paint on the drawing context.

public interface IGraphics

Properties

InterpolationMode

Gets or sets the interpolation mode associated with this Graphics.

IsOk

Returns true if the object is ok to use.

Name

Gets or sets name of the Graphics for the debug purposes.

NativeObject

Gets native drawing context.

Transform

Gets or sets a copy of the geometric world transformation for this Graphics.

Methods

Circle(Pen, Brush, PointD, float)

Calls FillCircle(Brush, PointD, float) and than DrawCircle(Pen, PointD, float).

DrawArc(Pen, PointD, float, float, float)

Draws an arc representing a portion of a circle specified by a center PointD and a radius.

DrawBezier(Pen, PointD, PointD, PointD, PointD)

Draws a Bezier spline defined by four PointD structures.

DrawBeziers(Pen, ReadOnlySpan<PointD>)

Draws a series of Bezier splines from an array of PointD structures.

DrawCircle(Pen, PointD, float)

Draws an circle specified by a center PointD and a radius.

DrawEllipse(Pen, RectD)

Draws an ellipse defined by a bounding RectD.

DrawImage(Image, PointD)

Draws the specified Image, using its original size, at the specified location.

DrawImage(Image, RectD)

Draws an image into the region defined by the specified RectD.

DrawImageUnscaled(Image, PointD)

Draws the specified Image, using its original size, at the specified location.

DrawLabel(ReadOnlySpan<char>, Font, Color, Color, Image?, RectD, HVAlignment?, int)

Draws text with the specified font, background and foreground colors, optional image, alignment and underlined mnemonic character.

DrawLine(Pen, PointD, PointD)

Draws a line connecting two points.

DrawLine(Pen, float, float, float, float)

Draws a line connecting two points.

DrawPath(Pen, GraphicsPath)

Draws a GraphicsPath.

DrawPie(Pen, PointD, float, float, float)

Draws an outline of a pie section defined by a circle specified by a center PointD and a radius.

DrawPolygon(Pen, ReadOnlySpan<PointD>)

Draws a polygon defined by an array of PointD structures.

DrawRectangle(Pen, RectD)

Draws a rectangle specified by a RectD structure.

DrawRectangles(Pen, ReadOnlySpan<RectD>)

Draws a series of rectangles specified by RectD structures.

DrawRoundedRectangle(Pen, RectD, float)

Draws a rounded rectangle specified by a RectD and a corner radius.

DrawText(ReadOnlySpan<char>, Font, Brush, PointD)

Draws text string with the specified location, Brush and Font objects.

DrawText(ReadOnlySpan<char>, Font, Brush, RectD)

Draws text string with the specified bounds, Brush and Font objects.

DrawText(ReadOnlySpan<char>, PointD)

Draws text with DefaultFont and Default.

DrawText(ReadOnlySpan<char>, PointD, Font, Color, Color)

Draws text with the specified font, background and foreground colors. This is the fastest method to draw text.

DrawWave(RectD, Color)

Draws waved line in the specified rectangular area.

Ellipse(Pen, Brush, RectD)

Calls FillEllipse(Brush, RectD) and than DrawEllipse(Pen, RectD).

FillCircle(Brush, PointD, float)

Fills the interior of a circle specified by a center PointD and a radius.

FillEllipse(Brush, RectD)

Fills the interior of an ellipse defined by a bounding rectangle specified by a RectD structure.

FillPath(Brush, GraphicsPath)

Fills the interior of a GraphicsPath.

FillPie(Brush, PointD, float, float, float)

Fills the interior of a pie section defined by a circle specified by a center PointD and a radius.

FillPolygon(Brush, ReadOnlySpan<PointD>, FillMode)

Fills the interior of a polygon defined by an array of PointD structures.

FillRectangle(Brush, RectD)

Fills the interior of a rectangle specified by a RectD structure. Rectangle is specified in device-independent units.

FillRectangles(Brush, ReadOnlySpan<RectD>)

Fills a series of rectangles specified by RectD structures.

FillRoundedRectangle(Brush, RectD, float)

Fills the interior of a rounded rectangle specified by a RectD and a corner radius.

GetDPI()

Returns the DPI of the display used by this object.

GetTextExtent(ReadOnlySpan<char>, Font)

Gets the dimensions of the string using the specified font.

MeasureText(ReadOnlySpan<char>, Font)

Measures the specified string when drawn with the specified Font. Calls internally GetTextExtent(ReadOnlySpan<char>, Font).

Path(Pen, Brush, GraphicsPath)

Calls FillPath(Brush, GraphicsPath) and than DrawPath(Pen, GraphicsPath).

Pie(Pen, Brush, PointD, float, float, float)

Calls FillPie(Brush, PointD, float, float, float) and than DrawPie(Pen, PointD, float, float, float).

Polygon(Pen, Brush, ReadOnlySpan<PointD>, FillMode)

Calls FillPolygon(Brush, ReadOnlySpan<PointD>, FillMode) and than DrawPolygon(Pen, ReadOnlySpan<PointD>).

PopTransform()

Pops a stored transformation matrix from the stack and sets it to the Transform property.

PushTransform()

Pushes the current state of the transformation matrix on a stack.

PushTransform(TransformMatrix)

Pushes the current state of the Graphics transformation matrix on a stack and concatenates the current transform with a new transform.

Rectangle(Pen, Brush, RectD)

Calls FillRectangle(Brush, RectD) and than DrawRectangle(Pen, RectD).

Restore()

Restore the saved canvas state.

RoundedRectangle(Pen, Brush, RectD, float)

Calls FillRoundedRectangle(Brush, RectD, float) and than DrawRoundedRectangle(Pen, RectD, float).

Save()

Saves the current state of the canvas.