mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Experimental clipping on FPanel.
This commit is contained in:
@@ -190,17 +190,24 @@ public class FPanel extends JPanel {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void paintComponent(final Graphics graphics0) {
|
public void paintComponent(final Graphics graphics0) {
|
||||||
super.paintComponent(graphics0);
|
//super.paintComponent(graphics0);
|
||||||
|
|
||||||
pnlW = this.getWidth();
|
pnlW = this.getWidth();
|
||||||
pnlH = this.getHeight();
|
pnlH = this.getHeight();
|
||||||
final Graphics2D g2d = (Graphics2D) graphics0.create();
|
final Graphics2D g2d = (Graphics2D) graphics0.create();
|
||||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||||
|
|
||||||
|
if (this.backgroundTexture == null) {
|
||||||
drawBackgroundColor(g2d);
|
drawBackgroundColor(g2d);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
drawBackgroundTexture(g2d);
|
||||||
|
}
|
||||||
|
|
||||||
/*// Draw background as required
|
super.paintComponent(g2d);
|
||||||
if (foregroundStretch && foregroundImage != null) {
|
|
||||||
|
// Draw background as required
|
||||||
|
/* if (foregroundStretch && foregroundImage != null) {
|
||||||
drawForegroundStretched(g2d);
|
drawForegroundStretched(g2d);
|
||||||
}
|
}
|
||||||
else if (this.backgroundTexture == null) {
|
else if (this.backgroundTexture == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user