Edge
final class Edge
Package: dev.joid.tool.msdf.geometry · Module: tool-msdf · Source: Edge.java
A segment of an outline, linear, quadratic or cubic, with the channels it contributes to.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| Edge(List | Creates the edge of those points, in all three channels. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
Vector2 | start() | Returns the first point. |
Vector2 | end() | Returns the last point. |
Vector2 | startDirection() | Returns the direction of the edge at its start. |
Vector2 | endDirection() | Returns the direction of the edge at its end. |
void | distance(double px, double py, SignedDistance result) | Writes into the result the signed distance from that point to the edge. |
void | pseudoDistance(double px, double py, SignedDistance result) | Writes into the result the pseudo-distance from that point to the edge, extended beyond its ends. |
double[] | getX() | Returns the abscissas of the points. |
double[] | getY() | Returns the ordinates of the points. |
int | getColor() | Returns the channels of the edge, a bit mask of the three channels, 7 for all of them. |
void | setColor(int color) | Sets the channels of the edge. |
Creation details
Section titled “Creation details”Edge(List<Vector2> points)
Creates the edge of those points, in all three channels.
Method details
Section titled “Method details”Vector2 start()
Returns the first point.
Vector2 end()
Returns the last point.
startDirection
Section titled “startDirection”Vector2 startDirection()
Returns the direction of the edge at its start.
endDirection
Section titled “endDirection”Vector2 endDirection()
Returns the direction of the edge at its end.
distance
Section titled “distance”void distance(double px, double py, SignedDistance result)
Writes into the result the signed distance from that point to the edge.
pseudoDistance
Section titled “pseudoDistance”void pseudoDistance(double px, double py, SignedDistance result)
Writes into the result the pseudo-distance from that point to the edge, extended beyond its ends.
double[] getX()
Returns the abscissas of the points.
double[] getY()
Returns the ordinates of the points.
getColor
Section titled “getColor”int getColor()
Returns the channels of the edge, a bit mask of the three channels, 7 for all of them.
setColor
Section titled “setColor”void setColor(int color)
Sets the channels of the edge.
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
