ResourceNode.StretchType
enum ResourceNode.StretchType
Package: dev.joid.lib.ui.node.impl.resource · Module: core · Source: ResourceNode.java
How an image or a video fills bounds whose ratio differs from its own.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | draw(double x, double y, double width, double height, Resource resource) | Draws the resource in these bounds with this fit. |
Values
Section titled “Values”| Value | Summary |
|---|---|
STRETCH | Fills the bounds, deforming the image. |
CONTAIN | Shows the whole image, centered, as large as the bounds allow; the rest of the bounds stays empty. |
COVER | Fills the bounds with the image, centered, and crops what goes past them. |
Method details
Section titled “Method details”void draw(double x, double y, double width, double height, Resource resource)
Draws the resource in these bounds with this fit.
Value details
Section titled “Value details”STRETCH
Section titled “STRETCH”STRETCH
Fills the bounds, deforming the image.
CONTAIN
Section titled “CONTAIN”CONTAIN
Shows the whole image, centered, as large as the bounds allow; the rest of the bounds stays empty.
COVER
Fills the bounds with the image, centered, and crops what goes past them.
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
