1 8 package com.nightlabs.editor2d.util; 9 10 import java.awt.geom.Arc2D ; 11 12 import com.nightlabs.editor2d.j2d.GeneralShape; 13 import com.nightlabs.editor2d.j2d.GeneralShapeFactory; 14 15 public class EditorGeneralShapeFactory 16 extends GeneralShapeFactory 17 { 18 19 public EditorGeneralShapeFactory() { 20 super(); 21 } 23 24 public static GeneralShape createEllipse(org.eclipse.draw2d.geometry.Rectangle rect) 25 { 26 Arc2D arc = new Arc2D.Double (rect.x, rect.y, rect.width, rect.height, 0, 360, Arc2D.OPEN); 27 return new GeneralShape(arc); 28 } 29 30 public static GeneralShape createRectangle(org.eclipse.draw2d.geometry.Rectangle rect) 31 { 32 return createRectangle(rect.x, rect.y, rect.width, rect.height); 33 } 34 35 } 36 | Popular Tags |