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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| Shape() | Creates a shape with no contour. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | add(List | 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. |
Creation details
Section titled “Creation details”Shape()
Creates a shape with no contour.
Method details
Section titled “Method details”void add(List<Edge> contour)
Adds a contour.
getContours
Section titled “getContours”List<List<Edge>> getContours()
Returns the contours, read-only.
isEmpty
Section titled “isEmpty”boolean isEmpty()
If true, the outline has no contour.
bounds
Section titled “bounds”double[] bounds()
Returns {left, bottom, right, top} of every point of the outline.
orient
Section titled “orient”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
