GraphicsExtensionMethods

public static class GraphicsExtensionMethods
Provides extension methods for the Eto graphics object.

Fields

StandardRuleLine

#
public static readonly Color StandardRuleLine

StandardRuleMargin

#
public static readonly Color StandardRuleMargin

Methods

AddNoise

#Example
Add noise to an entire control.
public static void AddNoise(
this Context
context,
Graphics context.
flavour,
Flavour of noise.
strength
Strength of noise in the (0, 1) range.
)

AddNoise

#Example
Fill a region with noise.
public static void AddNoise(
this Graphics
graphics,
Graphics object to draw with.
flavour,
Flavour of noise.
strength,
Strength of noise in the (0, 1) range.
region
Region to fill.
)

AddNoise

#Example
Fill a region with noise.
public static void AddNoise(
this Graphics
graphics,
Graphics object to draw with.
flavour,
Flavour of noise.
strength,
Strength of noise in the (0, 1) range.
GraphicsPath
region
Region to fill.
)

AddNoise

#Example
Fill a region with noise.
public static void AddNoise(
this Graphics
graphics,
Graphics object to draw with.
flavour,
Flavour of noise.
strength,
Strength of noise in the (0, 1) range.
RectangleF
region
Region to fill.
)
Clear the graphics using black-based transparent.
public static void Clear(
this Graphics
graphics
)

DrawAnchoredText

#Example
Draw text whose anchor is at a specific location.
public static RectangleF DrawAnchoredText(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to use.
Color
colour,
Colour of text.
text,
Text.
anchor,
Anchor point.
PointF
point
Location.
)

DrawAngledText

#Example
Draw text at a point along a direction. This method automatically aligns and rotates text to keep it as upright as possible.
public static void DrawAngledText(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to use.
Color
colour,
Colour of text.
text,
Text.
PointF
point,
Location.
SizeF
direction
Text base line vector.
)

DrawAngledText

#Example
Draw rotated text.
public static void DrawAngledText(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to use.
Color
colour,
Colour of text.
text,
Text.
anchor,
Anchor point.
PointF
point,
Location.
angle
Rotation angle.
)

DrawArc

#Example
Draw an arc.
public static void DrawArc(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Edge colour.
width,
Edge thickness
arc
Arc.
)

DrawArc

#Example
Draw an arc.
public static void DrawArc(
this Graphics
graphics,
Graphics object to draw with.
Pen
pen,
Edge edge.
arc
Arc.
)

DrawArrow

#Example
Draw an arrow.
public static void DrawArrow(
this Graphics
graphics,
Graphics object.
Color
colour,
Colour of arrow.
width,
Width of arrow line
line,
Arrow shaft.
size
Size of arrowhead in pixels.
)

DrawArrow

#Example
Draw an arrow.
public static void DrawArrow(
this Graphics
graphics,
Graphics object.
Pen
pen,
Pen for arrow shape.
line,
Arrow shaft.
size
Size of arrowhead in pixels.
)

DrawArrowBi

#Example
Draw an arrow at both ends of a line segment.
public static void DrawArrowBi(
this Graphics
graphics,
Graphics object.
Pen
pen,
Pen for arrow shape.
line,
Arrow shaft.
size
Size of arrowhead in pixels.
)

DrawArrowDimples

#Example
Draw a set of three dimples hinting at a draggable area.
public static void DrawArrowDimples(
this Graphics
graphics,
Graphics object to draw with.
PointF
centre,
Centre coordinate of dimples.
direction
Arrow direction (0=up, 1=down, s=left, 3=right)
)

DrawBalloonLabel

#Example
Draw a balloon with a text label.
public static void DrawBalloonLabel(
this Graphics
graphics,
Graphics object to draw with.
PointF
tip,
Balloon tip.
text,
Text to draw.
Font
font = null,
Font to use.
shade = null,
Balloon shading.
SizeF?
size = null,
Size override, handy for keeping consecutive balloon drawings the same size while the content changes.
scale = 1
Scaling factor for entire shape.
)

DrawBalloonLabel

#Example
public static void DrawBalloonLabel(
this Graphics
graphics,
PointF
tip,
text,
Font
font,
Color
colour
)

DrawBarDimples

#Example
Draw a set of five dimples hinting at a draggable area.
public static void DrawBarDimples(
this Graphics
graphics,
Graphics object to draw with.
PointF
centre,
Centre coordinate of dimples.
vertical
If true, the dimples will be ordered in two columns. If false, two rows.
)

DrawBezier

#Example
Draw a bezier segment.
public static void DrawBezier(
this Graphics
graphics,
Graphics object to draw with.
Pen
pen,
Edge edge.
bezier
Bezier segment.
)

DrawBox

#Example
Draw the edges of a box.
public static void DrawBox(
this Graphics
graphics,
Graphics object to draw with.
box,
Box to draw.
Pen
edges
Pen for all edges.
)

DrawBox

#Example
Draw the edges of a box.
public static void DrawBox(
this Graphics
graphics,
Graphics object to draw with.
box,
Box to draw.
Pen
silhouette,
Optional edge for box outline.
Pen
interior,
Optional edge for interior visible edges.
Pen
hidden
Optional edge for hidden edges.
)

DrawBox

#Example
Draw the edges of a box.
public static void DrawBox(
this Graphics
graphics,
Graphics object to draw with.
box,
Box to draw.
Pen
visible,
Optional edge for visible edges.
Pen
hidden
Optional edge for hidden edges.
)

DrawBracketLabel

#Example
Draw a bracketed label underneath some anchor points.
public static void DrawBracketLabel(
this Graphics
graphics,
Graphic object.
Font
font,
Font to use.
Color
colour,
Colour of text and bracket.
PointF
left,
Anchor point for left edge of bracket.
PointF
right,
Anchor point for right edge of bracket.
text
Label text.
)

DrawCenteredText

#Example
Draw centered text.
public static void DrawCenteredText(
this Graphics
graphics,
Graphics objects to draw with.
PointF
centre,
Centre point.
Font
font,
Font to draw with.
Brush
fill,
Text fill.
text
Text to draw.
)

DrawCenteredText

#Example
Draw centered text.
public static void DrawCenteredText(
this Graphics
graphics,
Graphics objects to draw with.
PointF
centre,
Centre point.
Font
font,
Font to draw with.
Color
colour,
Text colour.
text
Text to draw.
)

DrawCircle

#Example
Draw a circle.
public static void DrawCircle(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Edge colour.
width,
Edge thickness
circle
Circle.
)

DrawCircle

#Example
Draw a circle.
public static void DrawCircle(
this Graphics
graphics,
Graphics object to draw with.
Pen
pen,
Edge edge.
circle
Circle.
)

DrawColourPivot

#Example
Draw the standard pivot shape at the given location.
public static void DrawColourPivot(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Pivot colour.
PointF
point,
Pivot location.
radius
Pivot radius.
)

DrawCornerShadow

#Example
Draw a quarter-circle shadow radiating outward from a single point, darkest at the point and fading with radial distance. Use this to round off the corners where two DrawEdgeShadow strips meet. The pixel radius and peak opacity match the straight edges of the same ShadowSize.
public static void DrawCornerShadow(
this Graphics
graphics,
Graphics object to draw with.
PointF
point,
Point the shadow radiates from (the rectangle corner).
corner,
Which corner this is, i.e. the quadrant the shadow fans into.
size = ShadowSize.Medium
Preset shadow size.
)

DrawCornerShadow

#Example
Draw a quarter-circle shadow as DrawCornerShadow(Graphics, PointF, ShadowCorner, ShadowSize), but faded to the given opacity.
public static void DrawCornerShadow(
this Graphics
graphics,
Graphics object to draw with.
PointF
point,
Point the shadow radiates from (the rectangle corner).
corner,
Which corner this is, i.e. the quadrant the shadow fans into.
size,
Preset shadow size.
opacity
Opacity multiplier (0.0 ~ 1.0) applied to the whole shadow.
)

DrawCylinder

#Example
Draw the wireframe of a cylinder.
public static void DrawCylinder(
this Graphics
graphics,
Graphics object to draw with.
cylinder,
Cylinder to draw.
Pen
edges
Pen for the edges.
)

DrawCylinder

#Example
Draw the wireframe of a cylinder.
public static void DrawCylinder(
this Graphics
graphics,
Graphics object to draw with.
cylinder,
Cylinder to draw.
Pen
silhouette,
Optional edge for outline edges.
Pen
interior,
Optional edge for outline edges.
Pen
hidden,
Optional edge for hidden edges.
fromAbove
If true, the top face of the cylinder is assumed to face the viewer.
)

DrawCylinder

#Example
Draw the wireframe of a cylinder.
public static void DrawCylinder(
this Graphics
graphics,
Graphics object to draw with.
cylinder,
Cylinder to draw.
Pen
visible,
Pen for visible edges.
Pen
hidden,
Optional edge for hidden edges.
fromAbove
If true, the top face of the cylinder is assumed to face the viewer.
)

DrawDebugBox

#Example
Draw a dotted debug box handy while writing layout code.
public static void DrawDebugBox(
this Graphics
graphics,
RectangleF
box,
Color
colour
)

DrawDimples

#Example
Draw a set of dimples hinting at a draggable area.
public static void DrawDimples(
this Graphics
graphics,
Graphics object to draw with.
PointF
centre,
Centre coordinate of dimples.
params (int dx, int dy)[]
dimples
Array of dimple offsets with respect to the centre point.
)

DrawDisabledMotif

#Example
Draw a standard disabled control motif.
public static void DrawDisabledMotif(
this Graphics
graphics,
Control
control
)

DrawDisabledMotif

#Example
Draw a standard disabled control motif.
public static void DrawDisabledMotif(
this Graphics
graphics,
RectangleF
bounds
)

DrawEllipse

#Example
Draw an ellipse.
public static void DrawEllipse(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Edge colour.
width,
Edge thickness
ellipse
Ellipse.
)

DrawEllipse

#Example
Draw an ellipse.
public static void DrawEllipse(
this Graphics
graphics,
Graphics object to draw with.
Pen
pen,
Edge edge.
ellipse
Ellipse.
)

DrawFadingArc

#Example
Draw an arc which fades to transparency at both ends.
public static void DrawFadingArc(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour in middle of line.
arc,
Arc to draw.
width
Thickness of line.
)

DrawFadingArc

#Example
Draw an arc which fades to a different colour at both ends.
public static void DrawFadingArc(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour in middle of arc.
Color
colourTip,
Colour at extreme of arc.
arc,
Arc to draw.
width
Thickness of arc.
)

DrawFadingColour

#Example
Draw a vertical block with fade-in and fade-out regions.
public static void DrawFadingColour(
this Graphics
graphics,
Graphics object
Color
colour,
Colour for block.
RectangleF
box,
Rectangle with solid colour.
width0,
Width of left fading region.
width1
Wdth of right fading region.
)

DrawFadingLine

#Example
Draw a line which fades to another colour at both ends.
public static void DrawFadingLine(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour in middle of line.
Color
colourTip,
Colour at line extremes.
PointF
p0,
Start point of line.
PointF
p1,
End point of line.
width
Thickness of line.
)

DrawFadingLine

#Example
Draw a line which fades to transparency at both ends.
public static void DrawFadingLine(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour in middle of line.
PointF
p0,
Start point of line.
PointF
p1,
End point of line.
width
Thickness of line.
)

DrawFrame

#Example
Draw a frame with a title.
public static void DrawFrame(
this Graphics
graphics,
Graphics object to draw with.
Rectangle
rectangle,
Frame rectangle.
Color
colour,
Frame and text colour.
text,
Frame text.
Font
font,
Text font.
width,
Frame thickness.
radius
Radius of corners.
)

DrawFrame

#Example
Draw a frame with a title.
public static void DrawFrame(
this Graphics
graphics,
Graphics object to draw with.
Rectangle
rectangle,
Frame rectangle.
Color
colour,
Frame and text colour.
text,
Frame text.
width,
Frame thickness.
radius
Radius of corners.
)

DrawFrame

#Example
Draw a frame with a title.
public static void DrawFrame(
this Graphics
graphics,
Graphics object to draw with.
Rectangle
rectangle,
Frame rectangle.
Color
colour,
Frame and text colour.
text,
Frame text.
width
Frame thickness.
)

DrawFrame

#Example
Draw a frame with a title.
public static void DrawFrame(
this Graphics
graphics,
Graphics object to draw with.
Rectangle
rectangle,
Frame rectangle.
Color
colour,
Frame and text colour.
text
Frame text.
)

DrawFunction

#Example
Draw a function within a frame.
public static void DrawFunction(
this Graphics
graphics,
Graphics object to draw with.
Pen
edge,
Pen for function.
frame,
Projection frame.
function,
Function to draw.
samples
Sample count hint.
)

DrawImageWithPadding

#Example
Draw an image into a circle.
public static void DrawImageWithPadding(
this Graphics
graphics,
Graphics object to draw with.
Image
image,
Image to draw.
opacity,
Opacity of image fill.
circle,
Target circle for image.
padding
Number of image pixels to put outside the rectangle edges.
)

DrawImageWithPadding

#Example
Draw an image into a rectangle.
public static void DrawImageWithPadding(
this Graphics
graphics,
Graphics object to draw with.
Image
image,
Image to draw.
opacity,
Opacity of image fill.
RectangleF
rectangle,
Target rectangle for image.
padding
Number of image pixels to put outside the rectangle edges.
)

DrawInsideShadow

#Example
Draw an inset shadow inside a rectangle, darkest along the specified edge(s) and fading toward the rectangle's interior. The pixel width and peak opacity for each preset are defined in ShadowPixelSize(ShadowSize) and ShadowPixelAlpha(ShadowSize).
public static void DrawInsideShadow(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
area,
Rectangle to draw the shadow inside.
edges,
Which edge(s) of area are darkest. Combine with bitwise OR.
size = ShadowSize.Medium
Preset shadow size.
)

DrawInsideShadow

#Example
Draw an inset shadow as DrawInsideShadow(Graphics, RectangleF, ShadowEdge, ShadowSize), but faded to the given opacity.
public static void DrawInsideShadow(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
area,
Rectangle to draw the shadow inside.
edges,
Which edge(s) of area are darkest. Combine with bitwise OR.
size,
Preset shadow size.
opacity
Opacity multiplier (0.0 ~ 1.0) applied to the whole shadow.
)

DrawKeyValueList

#Example
Draw a list of key-value items.
public static void DrawKeyValueList(
this Graphics
graphics,
Graphics object.
RectangleF
frame,
Frame for items.
Font
fontKey,
Font to use for drawing keys.
Font
fontValue,
Font to use for drawing values.
Color
colourKey,
Colour of keys.
Color
colourValue,
Colour of values.
items
Collection of items.
)

DrawLine

#Example
Draw a line.
public static void DrawLine(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Edge colour.
width,
Edge thickness
line
Line.
)

DrawLine

#Example
Draw a line.
public static void DrawLine(
this Graphics
graphics,
Graphics object to draw with.
Pen
pen,
Edge edge.
line
Line.
)

DrawLineThroughBox

#Example
Draw a line through a box.
public static void DrawLineThroughBox(
this Graphics
graphics,
Graphics object to draw with.
Rectangle
box,
Box to include.
Color
colour,
Colour of line.
point0,
First point on line.
point1
Second point on line.
)

DrawLineThroughBox

#Example
Draw a line through a box.
public static void DrawLineThroughBox(
this Graphics
graphics,
Graphics object to draw with.
Rectangle
box,
Box to include.
Pen
pen,
Pen of line.
point0,
First point on line.
point1
Second point on line.
)

DrawLineThroughBox

#Example
Draw a line through a box.
public static void DrawLineThroughBox(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
box,
Box to include.
Color
colour,
Colour of line.
PointF
point0,
First point on line.
PointF
point1
Second point on line.
)

DrawLineThroughBox

#Example
Draw a line through a box.
public static void DrawLineThroughBox(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
box,
Box to include.
Pen
pen,
Pen of line.
PointF
point0,
First point on line.
PointF
point1
Second point on line.
)

DrawMarker

#Example
Draw a circle and arrow around a target box.
public static void DrawMarker(
this Graphics
graphics,
Graphics object. Ideally this is 1:1 screen scaling, i.e. control graphics.
colour,
Colour of marker shapes.
RectangleF
target,
Target of marker.
RectangleF
framing
Frame bounds. This controls where the pointing arrow is located. Provide the target rectangle again to prevent arrows from being drawn.
)

DrawMatrix

#Example
Draw a matrix within a rectangle.
public static void DrawMatrix(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to draw with.
Color
colour,
Colour of matrix text and brackets.
RectangleF
frame,
Rectangular frame.
double[][]
matrix,
Matrix to draw.
format
Formatting pattern for matrix values.
)

DrawMatrix

#Example
Draw a matrix within a rectangle.
public static void DrawMatrix(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to draw with.
Color
colour,
Colour of matrix text and brackets.
RectangleF
frame,
Rectangular frame.
double[][]
matrix
Matrix to draw,
)

DrawMatrix

#Example
Draw a matrix within a rectangle.
public static void DrawMatrix(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to draw with.
Color
colour,
Colour of matrix text and brackets.
RectangleF
frame,
Rectangular frame.
int[][]
matrix
Matrix to draw,
)

DrawMatrix

#Example
Draw a matrix within a rectangle.
public static void DrawMatrix(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to draw with.
Color
colour,
Colour of matrix text and brackets.
RectangleF
frame,
Rectangular frame.
string[][]
matrix
Matrix to draw.
)

DrawOutsideShadow

#Example
Draw a drop shadow outside a rectangle, darkest along the rectangle's perimeter and fading outward. The shadow always wraps the entire rectangle: all four edges plus rounded corners. The pixel width and peak opacity for each preset are defined in ShadowPixelSize(ShadowSize) and ShadowPixelAlpha(ShadowSize).
public static void DrawOutsideShadow(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
area,
Rectangle to draw the shadow around.
size = ShadowSize.Medium
Preset shadow size.
)

DrawOutsideShadow

#Example
Draw a drop shadow as DrawOutsideShadow(Graphics, RectangleF, ShadowSize), but faded to the given opacity.
public static void DrawOutsideShadow(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
area,
Rectangle to draw the shadow around.
size,
Preset shadow size.
opacity
Opacity multiplier (0.0 ~ 1.0) applied to the whole shadow.
)

DrawPointer

#Example
Draw an arrow pointing at a location.
public static void DrawPointer(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour of pointer.
PointF
target,
Location being pointed at.
size,
Size (length) of pointer in graphics units.
angle,
Angle of pointer in degrees. Angle=0 means the shape is pointing to the right.
offset
Offset distance between target and pointer tip.
)

DrawPointer

#Example
Draw an arrow pointing at a location.
public static void DrawPointer(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour of pointer.
PointF
target,
Location being pointed at.
size,
Size (length) of pointer in graphics units.
angle
Angle of pointer in degrees. Angle=0 means the shape is pointing to the right.
)

DrawRuledPaper

#Example
Draw ruled paper with custom colours.
public static IEnumerable<GraphicsExtensionMethods.RuledPaperLine> DrawRuledPaper(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
boundary,
Paper boundary.
marginX,
X coordinate of vertical margin.
lineY,
Y coordinate of one of the lines.
lineSpacing,
Vertical spacing between the lines.
Color
marginColour,
The colour of the double margin line.
Color
lineColour
The colour of the horizontal rules.
)

DrawRuledPaper

#Example
Draw ruled paper with default colours.
public static IEnumerable<GraphicsExtensionMethods.RuledPaperLine> DrawRuledPaper(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
boundary,
Paper boundary.
marginX,
X coordinate of vertical margin.
lineY,
Y coordinate of one of the lines.
lineSpacing
Vertical spacing between the lines.
)

DrawRuledPaper

#Example
Draw ruled paper with custom colours.
public static IEnumerable<GraphicsExtensionMethods.RuledPaperLine> DrawRuledPaper(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
boundary,
Paper boundary.
marginX,
X coordinate of vertical margin.
lineY,
Y coordinates of all lines.
Color
marginColour,
The colour of the double margin line.
Color
lineColour
The colour of the horizontal rules.
)

DrawRuledPaper

#Example
Draw ruled paper with default colours.
public static IEnumerable<GraphicsExtensionMethods.RuledPaperLine> DrawRuledPaper(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
boundary,
Paper boundary.
marginX,
X coordinate of vertical margin.
lineY
Y coordinates of all lines.
)

DrawShape

#Example
Draw a balloon using the specified colour.
public static void DrawShape(
this Graphics
graphics,
balloon,
Color
colour
)

DrawShape

#Example
Draw a balloon using the specified skin colours.
public static void DrawShape(
this Graphics
graphics,
balloon,
shade
)

DrawShape

#Example
Draw a disc using the specified colour.
public static void DrawShape(
this Graphics
graphics,
disc,
Color
colour
)

DrawShape

#Example
Draw a disc using the specified skin colours.
public static void DrawShape(
this Graphics
graphics,
disc,
colour
)

DrawShape

#Example
Draw a slab using the specified colour.
public static void DrawShape(
this Graphics
graphics,
slab,
Color
colour
)

DrawShape

#Example
Draw a slab using the specified skin colours.
public static void DrawShape(
this Graphics
graphics,
slab,
colour
)

DrawShape

#Example
Draw a triangle using the specified colour.
public static void DrawShape(
this Graphics
graphics,
triangle,
Color
colour
)

DrawShape

#Example
Draw a triangle using the specified skin colours.
public static void DrawShape(
this Graphics
graphics,
triangle,
colour
)

DrawShapeBackground

#Example
Draw the background layers of a slab.
public static void DrawShapeBackground(
this Graphics
graphics,
slab,
colour
)

DrawShapeForeground

#Example
Draw the background layers of a slab.
public static void DrawShapeForeground(
this Graphics
graphics,
slab,
colour
)

DrawSolidBalloon

#Example
Draw a default balloon label.
Draw a solid balloon around a text, with the tip at the local origin. The balloon is drawn in the current transform and is meant to be placed via a translation to the tip and a scale to control coordinates.
public static void DrawSolidBalloon(
this Graphics
graphics,
Graphics object to draw with.
text,
Text inside the balloon.
Color
fill,
Solid balloon colour.
Color
textColour
Colour of the text, ought to contrast with the fill.
)

DrawSunkenText

#Example
Draw sunken centered text.
public static void DrawSunkenText(
this Graphics
graphics,
Graphics to draw with.
PointF
centre,
Centre of text.
Font
font,
Font to use.
Color
colour,
Colour of text, should not contain an alpha component.
text
Text to draw.
)

DrawTextInFrame

#Example
Draw trimmed and unwrapped text into the vertical centre of a frame.
public static void DrawTextInFrame(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to use.
Brush
colour,
Foreground colour.
text,
Text to draw.
RectangleF
frame,
Bounding frame.
TextAlignment
horizontal
Horizontal alignment.
)

DrawTextInFrame

#Example
Draw trimmed and unwrapped text into the vertical centre of a frame.
public static void DrawTextInFrame(
this Graphics
graphics,
Graphics object to draw with.
Font
font,
Font to use.
Color
colour,
Foreground colour.
text,
Text to draw.
RectangleF
frame,
Bounding frame.
TextAlignment
horizontal
Horizontal alignment.
)

FillArc

#Example
Fill an arc.
public static void FillArc(
this Graphics
graphics,
Graphics object to draw with.
Brush
brush,
Fill brush.
arc
Circle.
)

FillArc

#Example
Fill an arc.
public static void FillArc(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
arc
Circle.
)

FillBox

#Example
Draw the shading on a box using custom settings.
public static void FillBox(
this Graphics
graphics,
Graphics object to draw with.
box,
Box to draw.
Color
colour,
Box colour.
shading
Shading strength.
)

FillBox

#Example
Draw the shading on a box using default settings.
public static void FillBox(
this Graphics
graphics,
Graphics object to draw with.
box,
Box to draw.
Color
colour
Box colour.
)

FillBox

#Example
Draw the shading on the visible faces of a box using custom colours.
public static void FillBox(
this Graphics
graphics,
Graphics object to draw with.
box,
Box to draw.
Color
front,
Colour of front face.
Color
right,
Colour of right face.
Color
top
Colour of top face.
)

FillBox

#Example
Draw the shading on the visible faces of a box using custom colours.
public static void FillBox(
this Graphics
graphics,
Graphics object to draw with.
box,
Box to draw.
params Color[]
faceColours
Array of six colours, one for each face. The order is {bottom, left, back, top, right, front}.
)

FillCircle

#Example
Fill a circle.
public static void FillCircle(
this Graphics
graphics,
Graphics object to draw with.
Brush
brush,
Fill brush.
circle
Circle.
)

FillCircle

#Example
Fill a circle.
public static void FillCircle(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
circle
Circle.
)

FillCylinder

#Example
Draw the shading of a cylinder.
public static void FillCylinder(
this Graphics
graphics,
cylinder,
Color
cap,
Color
sideLeft,
Color
sideRight,
fromAbove
If true, the top face of the cylinder is assumed to face the viewer.
)

FillCylinder

#Example
Draw the shading of a cylinder.
public static void FillCylinder(
this Graphics
graphics,
Graphics object to draw with.
cylinder,
Cylinder.
Color
colour,
Cylinder colour.
fromAbove
If true, the top face of the cylinder is assumed to face the viewer.
)

FillCylinder

#Example
Draw the shading of a cylinder.
public static void FillCylinder(
this Graphics
graphics,
cylinder,
Color
colour,
shading,
fromAbove
If true, the top face of the cylinder is assumed to face the viewer.
)

FillDiamond

#Example
Fill a diamond.
public static void FillDiamond(
this Graphics
graphics,
Graphics object to draw with.
Brush
brush,
Fill brush.
centre,
Centre of diamond.
radius
Radius of diamond (centre to corner).
)

FillDiamond

#Example
Fill a diamond.
public static void FillDiamond(
this Graphics
graphics,
Graphics object to draw with.
Brush
brush,
Fill brush.
PointF
centre,
Centre of diamond.
radius
Radius of diamond (centre to corner).
)

FillDiamond

#Example
Fill a diamond.
public static void FillDiamond(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
centre,
Centre of diamond.
radius
Radius of diamond (centre to corner).
)

FillDiamond

#Example
Fill a diamond.
public static void FillDiamond(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
PointF
centre,
Centre of diamond.
radius
Radius of diamond (centre to corner).
)

FillEllipse

#Example
Fill an ellipse.
public static void FillEllipse(
this Graphics
graphics,
Graphics object to draw with.
Brush
fill,
Fill brush.
ellipse
Ellipse.
)

FillEllipse

#Example
Fill an ellipse.
public static void FillEllipse(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
ellipse
Ellipse.
)

FillLeftSemiCircle

#Example
Fill the left half of a circle.
public static void FillLeftSemiCircle(
this Graphics
graphics,
Graphics object to draw with.
Brush
brush,
Fill brush.
circle
Circle.
)

FillLeftSemiCircle

#Example
Fill the left half of a circle.
public static void FillLeftSemiCircle(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
circle
Circle.
)

FillMotif

#Example
Fill a region with a motif pattern.
public static void FillMotif(
this Graphics
graphics,
Graphics object to draw with.
GraphicsPath
region,
Region to fill.
motif
Motif pattern.
)

FillMotif

#Example
Fill a region with a hatch pattern.
public static void FillMotif(
this Graphics
graphics,
Graphics object to draw with.
GraphicsPath
region,
Region to fill.
flavour,
Hatch flavour.
strength,
Hatch strength.
Color
colour
Hatch colour.
)

FillMotif

#Example
Fill a region with a motif pattern.
public static void FillMotif(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
region,
Region to fill.
motif
Motif pattern.
)

FillMotif

#Example
Fill a region with a hatch pattern.
public static void FillMotif(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
region,
Region to fill.
flavour,
Hatch flavour.
strength,
Hatch strength.
Color
colour
Hatch colour.
)

FillPartialDiamond

#Example
Fill a diamond.
public static void FillPartialDiamond(
this Graphics
graphics,
Graphics object to draw with.
Brush
brush,
Fill brush.
portion,
Diamond portion to fill.
centre,
Centre of diamond.
radius
Radius of diamond (centre to corner).
)

FillPartialDiamond

#Example
Fill a diamond.
public static void FillPartialDiamond(
this Graphics
graphics,
Graphics object to draw with.
Brush
brush,
Fill brush.
portion,
Diamond portion to fill.
PointF
centre,
Centre of diamond.
radius
Radius of diamond (centre to corner).
)

FillPartialDiamond

#Example
Fill a diamond.
public static void FillPartialDiamond(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
portion,
Diamond portion to fill.
centre,
Centre of diamond.
radius
Radius of diamond (centre to corner).
)

FillPartialDiamond

#Example
Fill a diamond.
public static void FillPartialDiamond(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
portion,
Diamond portion to fill.
PointF
centre,
Centre of diamond.
radius
Radius of diamond (centre to corner).
)

FillRightSemiCircle

#Example
Fill the right half of a circle.
public static void FillRightSemiCircle(
this Graphics
graphics,
Graphics object to draw with.
Brush
brush,
Fill brush.
circle
Circle.
)

FillRightSemiCircle

#Example
Fill the right half of a circle.
public static void FillRightSemiCircle(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Fill colour.
circle
Circle.
)

FocusEdge

#Example
Gets the colour to be used for drawing focus region outlines.
public static Color FocusEdge(
this Graphics
graphics
)

FocusFill

#Example
Gets the colour to be used for filling focus regions.
public static Color FocusFill(
this Graphics
graphics
)

HoverEdge

#Example
Gets the colour to be used for drawing hover region outlines.
public static Color HoverEdge(
this Graphics
graphics
)

HoverFill

#Example
Gets the colour to be used for filling hover regions.
public static Color HoverFill(
this Graphics
graphics
)

MeasureCharacterRanges

#Example
Determine the bounds of each character within a string.
public static RectangleF[] MeasureCharacterRanges(
this Font
font,
text,
PointF
anchor
)

MeasureCharacterRanges

#Example
Determine the bounds of each character within a string.
public static RectangleF[] MeasureCharacterRanges(
this Font
font,
text,
RectangleF
frame,
TextAlignment
horizontal
)

MeasureCharacterRanges

#Example
Measure the sizes of each character within a string.
public static SizeF[] MeasureCharacterRanges(
this Font
font,
text
)

MeasureGraphemeRanges

#Example
Determine the bounds of each grapheme cluster within a string, laid out left to right from an anchor. Unlike MeasureCharacterRanges(Font, string, PointF) this returns one box per user-perceived character (base + combining marks, whole surrogate pairs), so it aligns with a grapheme-indexed caret.
public static RectangleF[] MeasureGraphemeRanges(
this Font
font,
text,
PointF
anchor
)

MeasureGraphemeRanges

#Example
Determine the bounds of each grapheme cluster within a string, aligned inside a frame. The per-grapheme equivalent of MeasureCharacterRanges(Font, string, RectangleF, TextAlignment).
public static RectangleF[] MeasureGraphemeRanges(
this Font
font,
text,
RectangleF
frame,
TextAlignment
horizontal
)

PaddedTextureBrush

#
Create a texture brush with a scaled image.
public static Brush PaddedTextureBrush(
Image
image,
Image to draw.
alpha,
Alpha strength of brush.
RectangleF
frame,
Target rectangle for image.
padding
Number of image pixels to put outside the rectangle edges.
)