MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / fillShape

Method fillShape

CodenameOne/src/com/codename1/ui/Graphics.java:1083–1111  ·  view source on GitHub ↗
(Shape shape)

Source from the content-addressed store, hash-verified

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 ///

Callers 12

paintMethod · 0.95
createTargetImageMethod · 0.95
testFillShapeReadbackMethod · 0.95
drawPolygonMethod · 0.45
renderFillsMethod · 0.45
drawPathMethod · 0.45
paintMethod · 0.45
drawContentMethod · 0.45
paintCellMethod · 0.45
paintMethod · 0.45
paintMethod · 0.45
paintMethod · 0.45

Calls 15

isShapeSupportedMethod · 0.95
getClipXMethod · 0.95
getClipYMethod · 0.95
getClipWidthMethod · 0.95
getClipHeightMethod · 0.95
setClipMethod · 0.95
clipRectMethod · 0.95
tmpClipShapeMethod · 0.95
setShapeMethod · 0.95
translationMethod · 0.95
getXMethod · 0.95
getYMethod · 0.95

Tested by 4

testFillShapeReadbackMethod · 0.76
drawContentMethod · 0.36
paintCellMethod · 0.36
paintMethod · 0.36