setMouseZoomable(true, true) rectangle color
setMouseZoomable(true, true) rectangle color
if call setMouseZoomable(true, true) is there some way to set the color and alpha value used to draw the zoom rectangle?
Ted Hill
Re: setMouseZoomable(true, true) rectangle color
If you look at the source
It appears not
Code: Select all
2112 /**
2113 * Draws zoom rectangle (if present).
2114 * The drawing is performed in XOR mode, therefore
2115 * when this method is called twice in a row,
2116 * the second call will completely restore the state
2117 * of the canvas.
2118 *
2119 * @param g2 the graphics device.
2120 */
2121 private void drawZoomRectangle(Graphics2D g2) {
2122 // Set XOR mode to draw the zoom rectangle
2123 g2.setXORMode(Color.gray);
2124 if (this.zoomRectangle != null) {
2125 if (this.fillZoomRectangle) {
2126 g2.fill(this.zoomRectangle);
2127 }
2128 else {
2129 g2.draw(this.zoomRectangle);
2130 }
2131 }
2132 // Reset to the default 'overwrite' mode
2133 g2.setPaintMode();
2134 }