GlyphBoundsSink Class

Measures an outline: the smallest rectangle that contains its points and the control points of its curves.

public sealed class GlyphBoundsSink : OutlineSink

Remarks

A curve stays inside the polygon of its control points, so the rectangle contains the outline. It is the exact bounding box of an outline that has a point at each of its extrema, which is how fonts are drawn.

Inheritance
OutlineSink GlyphBoundsSink

Constructors

NameDescription
GlyphBoundsSink()

GlyphBoundsSink()

GlyphBoundsSink.cs
public GlyphBoundsSink()

No documentation is available.

Properties

NameDescription
IsEmptyGets a value indicating whether no point was received since GlyphBoundsSink.Reset.
MaxXGets the right of the rectangle.
MaxYGets the top of the rectangle.
MinXGets the left of the rectangle.
MinYGets the bottom of the rectangle.

Gets a value indicating whether no point was received since GlyphBoundsSink.Reset.

public bool IsEmpty { get; }

Property value

bool

Gets the right of the rectangle.

public double MaxX { get; }

Property value

double

Gets the top of the rectangle.

public double MaxY { get; }

Property value

double

Gets the left of the rectangle.

public double MinX { get; }

Property value

double

Gets the bottom of the rectangle.

public double MinY { get; }

Property value

double

Methods

NameDescription
Close()Ends the contour, whose current point is its first point.
CubicTo(double, double, double, double, double, double)Adds a cubic Bézier curve from the current point.
LineTo(double, double)Adds a line from the current point.
MoveTo(double, double)Starts a contour.
QuadraticTo(double, double, double, double)Adds a quadratic Bézier curve from the current point.
Reset()Forgets the points received, to measure another outline.

Ends the contour, whose current point is its first point.

public override void Close()

CubicTo(double, double, double, double, double, double)

GlyphBoundsSink.cs

Adds a cubic Bézier curve from the current point.

public override void CubicTo(double control1X, double control1Y, double control2X, double control2Y, double x, double y)

Parameters

control1X double
control1Y double
control2X double
control2Y double
x double
y double

LineTo(double, double)

GlyphBoundsSink.cs

Adds a line from the current point.

public override void LineTo(double x, double y)

Parameters

x double
y double

MoveTo(double, double)

GlyphBoundsSink.cs

Starts a contour.

public override void MoveTo(double x, double y)

Parameters

x double
y double

QuadraticTo(double, double, double, double)

GlyphBoundsSink.cs

Adds a quadratic Bézier curve from the current point.

public override void QuadraticTo(double controlX, double controlY, double x, double y)

Parameters

controlX double
controlY double
x double
y double

Forgets the points received, to measure another outline.

public void Reset()