PixelGrid.Span
final class PixelGrid.Span
Package: dev.joid.lib.bridge.render.matrix · Module: core · Source: PixelGrid.java
The snapped edges of a shape along one axis, with the coverage that fades a span thinner than a pixel.
Description
Section titled “Description”spanX and spanY of PixelGrid return it.
Draw between getStart() and getEnd(), and multiply the alpha of the color by getCoverage().
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
double | getStart() | Returns the design coordinate of the near edge, on a pixel boundary when the grid is aligned. |
double | getEnd() | Returns the design coordinate of the far edge, on a pixel boundary when the grid is aligned. |
float | getCoverage() | Returns the share of the drawn pixels that the shape covers, from 0F to 1F: below 1F only for a span thinner than one screen pixel. |
Method details
Section titled “Method details”getStart
Section titled “getStart”double getStart()
Returns the design coordinate of the near edge, on a pixel boundary when the grid is aligned.
getEnd
Section titled “getEnd”double getEnd()
Returns the design coordinate of the far edge, on a pixel boundary when the grid is aligned.
getCoverage
Section titled “getCoverage”float getCoverage()
Returns the share of the drawn pixels that the shape covers, from 0F to 1F: below 1F only for a span thinner than one screen pixel.
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
