Skip to content

DrawRaster

final class DrawRaster
Package: dev.joid.lib.draw.raster · Module: core · Source: DrawRaster.java

Shows what another renderer draws inside a UI, through an offscreen framebuffer drawn as an image.

Reach it through DrawUtils.RASTER. The framebuffer has the size of the area in screen pixels, at most 4096 on each side, so the result stays sharp at every interface scale. JOID keeps one framebuffer per nesting depth, grows it when an area does not fit, shrinks it when the areas of the last 5 seconds fit a smaller one, and frees it after 5 seconds without use.

ReturnsSignatureSummary
DrawRasterinst() factoryReturns the shared instance, the one in DrawUtils.RASTER.

ReturnsSignatureSummary
voiddrawRaster(double x, double y, double width, double height, DrawableRaster drawable)Runs drawable into the offscreen framebuffer, then draws that framebuffer at x, y, width, height with premultiplied blending.

DrawRaster inst() factory

Returns the shared instance, the one in DrawUtils.RASTER.

void drawRaster(double x, double y, double width, double height, DrawableRaster drawable)

Runs drawable into the offscreen framebuffer, then draws that framebuffer at x, y, width, height with premultiplied blending. An area without width or height draws nothing; a raster drawn inside another one gets its own framebuffer.


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