Skip to content

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.

spanX and spanY of PixelGrid return it. Draw between getStart() and getEnd(), and multiply the alpha of the color by getCoverage().

ReturnsSignatureSummary
doublegetStart()Returns the design coordinate of the near edge, on a pixel boundary when the grid is aligned.
doublegetEnd()Returns the design coordinate of the far edge, on a pixel boundary when the grid is aligned.
floatgetCoverage()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.

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.


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