| 1081 | /// |
| 1082 | /// - #isShapeSupported |
| 1083 | public void fillShape(Shape shape) { |
| 1084 | if (isShapeSupported()) { |
| 1085 | if (paint != null) { |
| 1086 | int clipX = getClipX(); |
| 1087 | int clipY = getClipY(); |
| 1088 | int clipW = getClipWidth(); |
| 1089 | int clipH = getClipHeight(); |
| 1090 | setClip(shape); |
| 1091 | clipRect(clipX, clipY, clipW, clipH); |
| 1092 | if (xTranslate != 0 || yTranslate != 0) { |
| 1093 | GeneralPath p = tmpClipShape(); |
| 1094 | p.setShape(shape, translation()); |
| 1095 | shape = p; |
| 1096 | } |
| 1097 | Rectangle bounds = shape.getBounds(); |
| 1098 | paint.paint(this, bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()); |
| 1099 | setClip(clipX, clipY, clipW, clipH); |
| 1100 | return; |
| 1101 | |
| 1102 | } |
| 1103 | if (xTranslate != 0 || yTranslate != 0) { |
| 1104 | GeneralPath p = tmpClipShape(); |
| 1105 | p.setShape(shape, translation()); |
| 1106 | shape = p; |
| 1107 | } |
| 1108 | |
| 1109 | impl.fillShape(nativeGraphics, shape); |
| 1110 | } |
| 1111 | } |
| 1112 | |
| 1113 | /// Checks to see if `com.codename1.ui.geom.Matrix` transforms are supported by this graphics context. |
| 1114 | /// |