Skip to content

Shape

final class Shape
Package: dev.joid.tool.msdf.geometry · Module: tool-msdf · Source: Shape.java

The outline of a glyph, as closed contours of edges.

ReturnsSignatureSummary
Shape()Creates a shape with no contour.

ReturnsSignatureSummary
voidadd(List contour)Adds a contour.
List<List<Edge>>getContours()Returns the contours, read-only.
booleanisEmpty()If true, the outline has no contour.
double[]bounds()Returns {left, bottom, right, top} of every point of the outline.
voidorient()Reverses the contours whose winding does not match their depth, so that outer contours and holes wind in opposite directions.

Shape()

Creates a shape with no contour.

void add(List<Edge> contour)

Adds a contour.

List<List<Edge>> getContours()

Returns the contours, read-only.

boolean isEmpty()

If true, the outline has no contour.

double[] bounds()

Returns {left, bottom, right, top} of every point of the outline.

void orient()

Reverses the contours whose winding does not match their depth, so that outer contours and holes wind in opposite directions.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page