Skip to content

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.

ReturnsSignatureSummary
Edge(List points)Creates the edge of those points, in all three channels.

ReturnsSignatureSummary
Vector2start()Returns the first point.
Vector2end()Returns the last point.
Vector2startDirection()Returns the direction of the edge at its start.
Vector2endDirection()Returns the direction of the edge at its end.
voiddistance(double px, double py, SignedDistance result)Writes into the result the signed distance from that point to the edge.
voidpseudoDistance(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.
intgetColor()Returns the channels of the edge, a bit mask of the three channels, 7 for all of them.
voidsetColor(int color)Sets the channels of the edge.

Edge(List<Vector2> points)

Creates the edge of those points, in all three channels.

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.


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