diff options
author | Sven Göthel <[email protected]> | 2024-01-31 11:56:36 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-31 11:56:36 +0100 |
commit | 5cf0d370dbc2b1f59102522d40f4875f7d77b1f7 (patch) | |
tree | 369a7cff074f9d654e046722d912e5226c7311aa /src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java | |
parent | f7458c47338c90db19ef3f0143a268b60b1267a3 (diff) |
GraphUI: Only issue Shape.mark*Dirty() if values were updated or data available; JOGL ImageSequence: Add addFrame(GL, TextureFrame), remove*Frame() and isSequenceAnimating()
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java index ae2af3960..b90c7670a 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java @@ -122,10 +122,12 @@ public class Rectangle extends GraphShape { markShapeDirty(); } public void setDimension(final float width, final float height, final float lineWidth) { - this.width = width; - this.height = height; - this.lineWidth = lineWidth; - markShapeDirty(); + if( this.width != width || this.height != height || this.lineWidth != lineWidth ) { + this.width = width; + this.height = height; + this.lineWidth = lineWidth; + markShapeDirty(); + } } public void setBounds(final AABBox abox, final float lineWidth) { setPosition(abox.getMinX(), abox.getMinY(), abox.getCenter().z()); |