MCPcopy Create free account
hub / github.com/Card-Forge/forge / paint

Method paint

forge-gui-desktop/src/main/java/forge/view/FDialog.java:144–162  ·  view source on GitHub ↗
(final Graphics g)

Source from the content-addressed store, hash-verified

142 }
143
144 @Override
145 public void paint(final Graphics g) {
146 super.paint(g);
147 if (allowResize) { return; }
148
149 //draw rounded border
150 final Graphics2D g2d = (Graphics2D) g.create();
151 if (antiAliasBorder) {
152 g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
153 }
154 FSkin.setGraphicsColor(g2d, borderColor);
155 if (isSetShapeSupported) {
156 g2d.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, cornerDiameter, cornerDiameter);
157 }
158 else { //draw non-rounded border instead if setShape isn't supported
159 g2d.drawRect(0, 0, getWidth() - 1, getHeight() - 1);
160 }
161 g2d.dispose();
162 }
163
164 @Override
165 public void dispose() {

Callers

nothing calls this directly

Calls 7

setGraphicsColorMethod · 0.95
drawRoundRectMethod · 0.80
drawRectMethod · 0.80
createMethod · 0.65
getWidthMethod · 0.65
getHeightMethod · 0.65
disposeMethod · 0.65

Tested by

no test coverage detected