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.
Description
Section titled “Description”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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
DrawRaster | inst() factory | Returns the shared instance, the one in DrawUtils.RASTER. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Creation details
Section titled “Creation details”DrawRaster inst() factory
Returns the shared instance, the one in DrawUtils.RASTER.
Method details
Section titled “Method details”drawRaster
Section titled “drawRaster”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
