IJ.run(image, "Radial Gradient", "") # rounded rectangle # correct for MacOSX bug: do the rounded rectangle in another image image2 = image image = IJ.createImage("MacOSX background picture", "rgb", w, h, 1) image.setRoi(Roi(xOffset, yOffset, w - 2 * xOffset, h - 2 * yOffset)) IJ.run(image, "Make rectangular selection rounded", "radius=" + str(radius)) Toolbar.setForegroundColor(Color(0x435a96)) Toolbar.setBackgroundColor(Color(0x294482)) IJ.run(image, "Radial Gradient", "") ip = image.getProcessor() ip.setColor(0x0071bc) ip.setLineWidth(2) image.getRoi().drawPixels(ip) Roi.setPasteMode(Blitter.COPY_TRANSPARENT) #grow = image.getRoi().getClass().getSuperclass().getDeclaredMethod('growConstrained', [Integer.TYPE, Integer.TYPE]) #grow.setAccessible(True) #grow.invoke(image.getRoi(), [1, 1]) image.copy(True) image = image2 image.paste() image.killRoi() ip = image.getProcessor() # arrow ip.setColor(0x123558) arrowLength = int(arrowThickness * 2.5) arrowWidth = arrowThickness * 2 x1 = (w - arrowLength) / 2 x2 = x1 + arrowLength