| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package example.shapes; |
||
| 5 | public class PathTest extends ShapeTest { |
||
| 6 | |||
| 7 | protected double dTheta; |
||
| 8 | |||
| 9 | @Override |
||
| 10 | protected void setup() { |
||
| 11 | super.setup(); |
||
| 12 | Path path = new Path(getDrawingPanel()); |
||
| 13 | path.moveTo(width, height); |
||
| 14 | path.lineTo(width, height * 2); |
||
| 15 | path.curveTo(width * 2, height * 2, width, height, width * 2, height); |
||
| 16 | path.quadTo(width, height * 2, width * 2, height * 2); |
||
| 17 | path.closePath(); |
||
| 18 | shape = path; |
||
| 19 | dTheta = Math.PI / 180.0; |
||
| 20 | } |
||
| 21 | |||
| 22 | @Override |
||
| 23 | protected void loop() { |
||
| 24 | ((Path) shape).rotate(dTheta, shape.getX() + shape.getWidth() / 2.0, shape.getY() + shape.getHeight() / 2.0); |
||
| 25 | super.loop(); |
||
| 26 | } |
||
| 27 | |||
| 28 | public static void main(String[] args) { |
||
| 29 | new PathTest(); |
||
| 30 | } |
||
| 32 |