MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / paint

Method paint

ij/src/main/java/ij/gui/PlotCanvas.java:41–61  ·  view source on GitHub ↗
(Graphics g)

Source from the content-addressed store, hash-verified

39 }
40
41 @Override
42 @AstroImageJ(reason = """
43 Support custom zoom indicator for MP
44 Support vectorized plot and plot scaling
45 """)
46 public void paint(Graphics g) {
47 if (plot == null) {
48 imp.setProperty(VectorPlotDrawing.PROPERTY_KEY, null);
49 super.paint(g);
50 if (zoomed.getAsBoolean()) {
51 g.drawImage(ZOOM_INDICATOR, 0, 0, null);
52 }
53 return;
54 }
55
56 imp.setProperty(VectorPlotDrawing.PROPERTY_KEY, plot);
57 ScopedValue.where(VectorPlotDrawing.SCALED_PLOT, plot.isAijPlot()).run(() -> super.paint(g));
58 if (zoomed.getAsBoolean()) {
59 g.drawImage(ZOOM_INDICATOR, 0, 0, null);
60 }
61 }
62
63 @AstroImageJ(reason = "Support custom zoom indicator for MP")
64 public void setZoomed(BooleanSupplier zoomed) {

Callers

nothing calls this directly

Calls 4

isAijPlotMethod · 0.80
paintMethod · 0.65
runMethod · 0.65
setPropertyMethod · 0.45

Tested by

no test coverage detected