Skip to content

BitmapFontContractSuite

abstract class BitmapFontContractSuite
Package: dev.joid.test.contract · Module: tool-testkit · Source: BitmapFontContractSuite.java

The contract tests of the drawing of bitmap fonts by a render bridge: whole texels and the same ink at every scale.

ReturnsSignatureSummary
BitmapFontContractSuite()Creates the suite, for a subclass.

ReturnsSignatureSummary
voidstartBackend()Creates the snapshot backend at the first test of the class, at 128×64 pixels, and resets the matrices and the state before each test.
voidstopBackend() staticDestroys the snapshot backend after the last test of the class.
voiddrawsWholeTexelsAtAWholeNumberOfPixels()Checks that a glyph scaled by 1, 2 or 0.5 covers whole texels, without blur.
voidgivesEveryTexelColumnTheSameInkAtAFractionalScale()Checks that at a fractional scale every column of texels of a glyph gets the same amount of ink.
voiddrawsTheSameGlyphFromEveryAtlas()Checks that a glyph gives the same pixels from any atlas that holds it.
ReturnsSignatureSummary
ISnapshotBackendcreateBackend() hook abstract protectedJOID calls it once, at the first test of the class.

BitmapFontContractSuite()

Creates the suite, for a subclass.

void startBackend()

Creates the snapshot backend at the first test of the class, at 128×64 pixels, and resets the matrices and the state before each test.

void stopBackend() static

Destroys the snapshot backend after the last test of the class.

void drawsWholeTexelsAtAWholeNumberOfPixels()

Checks that a glyph scaled by 1, 2 or 0.5 covers whole texels, without blur.

givesEveryTexelColumnTheSameInkAtAFractionalScale

Section titled “givesEveryTexelColumnTheSameInkAtAFractionalScale”

void givesEveryTexelColumnTheSameInkAtAFractionalScale()

Checks that at a fractional scale every column of texels of a glyph gets the same amount of ink.

void drawsTheSameGlyphFromEveryAtlas()

Checks that a glyph gives the same pixels from any atlas that holds it.

ISnapshotBackend createBackend() hook abstract protected

JOID calls it once, at the first test of the class. Return a new snapshot backend of your backend, not created yet.


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