Package ghidra.framework.main
Class ZoomedImagePainter
- java.lang.Object
-
- ghidra.framework.main.ZoomedImagePainter
-
- All Implemented Interfaces:
GGlassPanePainter
public class ZoomedImagePainter extends java.lang.Object implements GGlassPanePainter
A class that paints a given image with varying zoom levels. The zoom is set by clients according to changes made by anAnimator
. In essence, this class paints the given image centered over the given target bounds at some level of zoom. If the zoom or bounds of the parent container are never changed, then the image painted by this class will not change.NOTE: This class and it's getters/setters need to be public for reflective callbacks
-
-
Constructor Summary
Constructors Constructor Description ZoomedImagePainter(java.awt.Rectangle targetBounds, java.awt.Image image)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.awt.Image
createIconImage(javax.swing.Icon icon)
java.awt.Rectangle
getTargetBounds()
float
getZoom()
void
paint(GGlassPane glassPane, java.awt.Graphics g)
void
setMagnifyFactor(float factor)
void
setTargetBounds(java.awt.Rectangle containerBounds)
void
setZoom(float zoom)
-
-
-
Method Detail
-
paint
public void paint(GGlassPane glassPane, java.awt.Graphics g)
- Specified by:
paint
in interfaceGGlassPanePainter
-
getZoom
public float getZoom()
-
setZoom
public void setZoom(float zoom)
-
getTargetBounds
public java.awt.Rectangle getTargetBounds()
-
setTargetBounds
public void setTargetBounds(java.awt.Rectangle containerBounds)
-
setMagnifyFactor
public void setMagnifyFactor(float factor)
-
createIconImage
public static java.awt.Image createIconImage(javax.swing.Icon icon)
-
-