Class SoftwareContext
public class SoftwareContext : IPathBuilder, IGlyphPathBuilder, IPathDrawing
- Inheritance
-
SoftwareContext
- Implements
- Inherited Members
Constructors
SoftwareContext(uint, uint)
public SoftwareContext(uint width, uint height)
Parameters
Properties
bitmap
public RGBABitmap bitmap { get; }
Property Value
path
protected Path2D path { get; }
Property Value
stencil
public G16Stencil stencil { get; }
Property Value
Methods
Arc(Point, NFloat, NFloat, NFloat, Winding)
Adds an arc to the path centered at the specified point.
public void Arc(Point center, NFloat radius, NFloat startAngle, NFloat endAngle, Winding winding = Winding.ClockWise)
Parameters
centerPointCenter of the arc.
radiusNFloatRadius of the arc.
startAngleNFloatStart angle in radians.
endAngleNFloatEnd angle in radians.
windingWindingDirection in which the arc is drawn.
ArcTo(Point, Point, NFloat)
Adds an arc to the path, connecting two tangents defined by control points.
public void ArcTo(Point cp1, Point cp2, NFloat radius)
Parameters
BeginPath()
Begins a new path by resetting the current path list.
public void BeginPath()
ClosePath()
Closes the current path contour.
public void ClosePath()
CurveTo(Point, Point)
Draws a quadratic Bézier curve using a control point and end point.
public void CurveTo(Point cp1, Point to)
Parameters
CurveTo(Point, Point, Point)
Draws a cubic Bézier curve from the current point to the specified point, using two control points.
public void CurveTo(Point cp1, Point cp2, Point to)
Parameters
Ellipse(Point, NFloat, NFloat, NFloat, NFloat, NFloat, Winding)
Adds an elliptical arc to the path.
public void Ellipse(Point center, NFloat radiusX, NFloat radiusY, NFloat rotation, NFloat startAngle, NFloat endAngle, Winding winding = Winding.ClockWise)
Parameters
centerPointCenter of the ellipse.
radiusXNFloatHorizontal radius.
radiusYNFloatVertical radius.
rotationNFloatRotation of the ellipse, in radians.
startAngleNFloatStart angle in radians.
endAngleNFloatEnd angle in radians.
windingWindingDirection in which the arc is drawn.
Fill(FillRule)
Fills the current path using the specified fill rule.
public void Fill(FillRule rule = FillRule.NonZero)
Parameters
ruleFillRuleThe fill rule to use (NonZero or EvenOdd).
LineTo(Point)
Draws a straight line to the specified point.
public void LineTo(Point to)
Parameters
toPoint
MoveTo(Point)
Begins a new sub-path at the specified point.
public void MoveTo(Point to)
Parameters
toPoint
Rect(Rect)
Adds a rectangle path to the current path.
public void Rect(Rect rect)
Parameters
rectRectThe rectangle to add.
RoundRect(Rect, NFloat)
Adds a rounded rectangle path with a uniform radius.
public void RoundRect(Rect rect, NFloat radius)
Parameters
RoundRect(Rect, CornerRadius)
Adds a rounded rectangle path with per-corner radii.
public void RoundRect(Rect rect, CornerRadius radius)
Parameters
rectRectThe rectangle to round.
radiusCornerRadiusCorner radius object defining each corner.
Stroke()
Strokes the current path using the current stroke style.
public void Stroke()