Scale
final class Scale
Package: dev.joid.lib.render.transform · Module: core · Source: Scale.java
The factors of a scale in a Transformation, one per axis, fixed or read from a supplier.
Description
Section titled “Description”1D keeps the size, 2D doubles it, a negative factor mirrors the drawing.
Each factor is read each time the scale is applied.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
Scale | create() factory | Creates a scale that keeps the size on every axis. |
Scale | create(double width, double height, double depth) factory | Creates a scale by width, height and depth along X, Y and Z. |
Scale | create(Supplier | Creates a scale whose factors are read from the suppliers each time it is applied. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| width signal | double | 1D | The factor along X: getWidth() reads it, width(double) fixes it, width(Supplier) reads it from a supplier. |
| height signal | double | 1D | The factor along Y: getHeight() reads it, height(double) fixes it, height(Supplier) reads it from a supplier. |
| depth signal | double | 1D | The factor along Z: getDepth() reads it, depth(double) fixes it, depth(Supplier) reads it from a supplier. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
Supplier<Double> | getWidthSupplier() | Returns the supplier of the X factor. |
Supplier<Double> | getHeightSupplier() | Returns the supplier of the Y factor. |
Supplier<Double> | getDepthSupplier() | Returns the supplier of the Z factor. |
Creation details
Section titled “Creation details”create
Section titled “create”Scale create() factory
Creates a scale that keeps the size on every axis.
Scale create(double width, double height, double depth) factory
Creates a scale by width, height and depth along X, Y and Z.
Scale create(Supplier<Double> widthSupplier, Supplier<Double> heightSupplier, Supplier<Double> depthSupplier) factory
Creates a scale whose factors are read from the suppliers each time it is applied.
Property details
Section titled “Property details”this width(double width)fluentthis width(Supplier<Double> widthSupplier)fluent signaldouble getWidth()
Default: 1D
The factor along X: getWidth() reads it, width(double) fixes it, width(Supplier) reads it from a supplier.
height
Section titled “height”this height(double height)fluentthis height(Supplier<Double> heightSupplier)fluent signaldouble getHeight()
Default: 1D
The factor along Y: getHeight() reads it, height(double) fixes it, height(Supplier) reads it from a supplier.
this depth(double depth)fluentthis depth(Supplier<Double> depthSupplier)fluent signaldouble getDepth()
Default: 1D
The factor along Z: getDepth() reads it, depth(double) fixes it, depth(Supplier) reads it from a supplier.
Method details
Section titled “Method details”getWidthSupplier
Section titled “getWidthSupplier”Supplier<Double> getWidthSupplier()
Returns the supplier of the X factor.
getHeightSupplier
Section titled “getHeightSupplier”Supplier<Double> getHeightSupplier()
Returns the supplier of the Y factor.
getDepthSupplier
Section titled “getDepthSupplier”Supplier<Double> getDepthSupplier()
Returns the supplier of the Z factor.
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
