overlay renderer: fix drawing overlay drag bounds
The graphics transform needs to be reset prior to drawing the overlay bounds
This commit is contained in:
@@ -240,6 +240,14 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
|||||||
if (overlayPosition == OverlayPosition.DYNAMIC || overlayPosition == OverlayPosition.TOOLTIP)
|
if (overlayPosition == OverlayPosition.DYNAMIC || overlayPosition == OverlayPosition.TOOLTIP)
|
||||||
{
|
{
|
||||||
safeRender(client, overlay, layer, graphics, new Point());
|
safeRender(client, overlay, layer, graphics, new Point());
|
||||||
|
|
||||||
|
// Restore graphics2d properties
|
||||||
|
graphics.setTransform(transform);
|
||||||
|
graphics.setStroke(stroke);
|
||||||
|
graphics.setComposite(composite);
|
||||||
|
graphics.setPaint(paint);
|
||||||
|
graphics.setRenderingHints(renderingHints);
|
||||||
|
graphics.setBackground(background);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -276,6 +284,14 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
|||||||
|
|
||||||
safeRender(client, overlay, layer, graphics, location);
|
safeRender(client, overlay, layer, graphics, location);
|
||||||
|
|
||||||
|
// Restore graphics2d properties prior to drawing bounds
|
||||||
|
graphics.setTransform(transform);
|
||||||
|
graphics.setStroke(stroke);
|
||||||
|
graphics.setComposite(composite);
|
||||||
|
graphics.setPaint(paint);
|
||||||
|
graphics.setRenderingHints(renderingHints);
|
||||||
|
graphics.setBackground(background);
|
||||||
|
|
||||||
final Rectangle bounds = overlay.getBounds();
|
final Rectangle bounds = overlay.getBounds();
|
||||||
|
|
||||||
if (!bounds.isEmpty())
|
if (!bounds.isEmpty())
|
||||||
@@ -294,14 +310,6 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore graphics2d properties
|
|
||||||
graphics.setTransform(transform);
|
|
||||||
graphics.setStroke(stroke);
|
|
||||||
graphics.setComposite(composite);
|
|
||||||
graphics.setPaint(paint);
|
|
||||||
graphics.setRenderingHints(renderingHints);
|
|
||||||
graphics.setBackground(background);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user