MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / setScale

Method setScale

src/main/java/fieldbox/boxes/Drawing.java:791–797  ·  view source on GitHub ↗

sets the translation of the canvas. Note, we defer actually handing this off to the graphics system (or getTranslation) until the next draw cycle. This way we do not get repaints during which the transformation changes half way through.

(Box root, Vec2 t)

Source from the content-addressed store, hash-verified

789 * which the transformation changes half way through.
790 */
791 public void setScale(Box root, Vec2 t) {
792 if (this.scale.distance(t) > 1e-10) {
793 dirty(root);
794 dirty(root, "glass");
795 }
796 this.scaleNext = new Vec2(t);
797 }
798
799 /**
800 * returns the current draw coordinates that are visible inside the window

Callers 1

scrollForMouseEventMethod · 0.45

Calls 2

dirtyMethod · 0.95
distanceMethod · 0.45

Tested by

no test coverage detected