/** * Generates a polygon with an inside radius of 0. * @param sides number of sides * @param outsideRadius the outside radius * @param normalize normalize * @return the generated shape */ public static Shape generatePolygon(int sides, int outsideRadius, boolean normalize) { return generatePolygon(sides, outsideRadius, 0, normalize); }
public static Shape generatePolygon(int sides, int outsideRadius, boolean normalize) { return generatePolygon(sides, outsideRadius, 0, normalize); }
public static Shape generatePolygon(int sides, int outsideRadius, boolean normalize) { return generatePolygon(sides, outsideRadius, 0, normalize); }
public static Shape generatePolygon(int sides, int outsideRadius, boolean normalize) { return generatePolygon(sides, outsideRadius, 0, normalize); }
public static Shape generatePolygon(int sides, int outsideRadius, boolean normalize) { return generatePolygon(sides, outsideRadius, 0, normalize); }
public static Shape generatePolygon(int sides, int outsideRadius, int insideRadius, boolean normalize) { Shape shape = generatePolygon(sides,outsideRadius,insideRadius); if(normalize) { Rectangle2D bounds = shape.getBounds2D(); GeneralPath path = new GeneralPath(shape); shape = path.createTransformedShape( AffineTransform.getTranslateInstance(-bounds.getX(), -bounds.getY())); } return shape; }
public static Shape generatePolygon(int sides, int outsideRadius, int insideRadius, boolean normalize) { Shape shape = generatePolygon(sides, outsideRadius, insideRadius); if (normalize) { Rectangle2D bounds = shape.getBounds2D(); GeneralPath path = new GeneralPath(shape); shape = path.createTransformedShape(AffineTransform.getTranslateInstance( -bounds.getX(), -bounds.getY())); } return shape; }
public static Shape generatePolygon(int sides, int outsideRadius, int insideRadius, boolean normalize) { Shape shape = generatePolygon(sides, outsideRadius, insideRadius); if (normalize) { Rectangle2D bounds = shape.getBounds2D(); GeneralPath path = new GeneralPath(shape); shape = path.createTransformedShape(AffineTransform.getTranslateInstance( -bounds.getX(), -bounds.getY())); } return shape; }
public static Shape generatePolygon(int sides, int outsideRadius, int insideRadius, boolean normalize) { Shape shape = generatePolygon(sides, outsideRadius, insideRadius); if (normalize) { Rectangle2D bounds = shape.getBounds2D(); GeneralPath path = new GeneralPath(shape); shape = path.createTransformedShape(AffineTransform.getTranslateInstance( -bounds.getX(), -bounds.getY())); } return shape; }
/** * Generates a polygon * @param sides number of sides * @param outsideRadius the outside radius * @param insideRadius the inside radius * @param normalize normalize * @return the generated shape */ public static Shape generatePolygon(int sides, int outsideRadius, int insideRadius, boolean normalize) { Shape shape = generatePolygon(sides, outsideRadius, insideRadius); if (normalize) { Rectangle2D bounds = shape.getBounds2D(); GeneralPath path = new GeneralPath(shape); shape = path.createTransformedShape(AffineTransform.getTranslateInstance( -bounds.getX(), -bounds.getY())); } return shape; }