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

Method duplicate

ij/src/main/java/ij/gui/Plot.java:1900–1921  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1898 }
1899
1900 @AstroImageJ(reason = "Support scalable plots")
1901 public Plot duplicate() {
1902 try {
1903 var p = (Plot)clone(); //shallow clone, thus arrays&objects are not cloned, but they will be used only now
1904 p.ip = null;
1905 p.imp = null;
1906 p.pp = pp.clone();
1907 if (p.isAijPlot() && !VectorPlotDrawing.SCALED_PLOT.orElse(true)) {
1908 p.pp.width = (int)(pp.width / Prefs.getGuiScale());
1909 p.pp.height = (int)(pp.height / Prefs.getGuiScale());
1910 }
1911 if (!plotDrawn) p.getInitialMinAndMax();
1912 //scaledPlot.setScale(scale);
1913 //scaledPlot.setAntialiasedText(antialiasedText);
1914 p.defaultMinMax = currentMinMax.clone();
1915 p.plotDrawn = false;
1916
1917 return p;
1918 } catch (Exception e) {
1919 return null;
1920 }
1921 }
1922
1923 /** Releases the ImageProcessor and ImagePlus associated with the plot.
1924 * May help garbage collection because some garbage collectors

Callers 15

getBufferedImageMethod · 0.95
setupMethod · 0.45
getTransferDataMethod · 0.45
actionPerformedMethod · 0.45
actionPerformedMethod · 0.45
addPointsMethod · 0.45
processMethod · 0.45
estimateAffineMethod · 0.45
estimateTranslationMethod · 0.45
calculateMethod · 0.45
createMasterBiasMethod · 0.45

Calls 4

getGuiScaleMethod · 0.95
isAijPlotMethod · 0.80
getInitialMinAndMaxMethod · 0.80
cloneMethod · 0.65

Tested by

no test coverage detected