1 27 28 package org.nightlabs.editor2d.util; 29 30 import java.awt.geom.Arc2D ; 31 32 import org.nightlabs.editor2d.j2d.GeneralShape; 33 import org.nightlabs.editor2d.j2d.GeneralShapeFactory; 34 35 public class EditorGeneralShapeFactory 36 extends GeneralShapeFactory 37 { 38 39 public EditorGeneralShapeFactory() { 40 super(); 41 } 42 43 public static GeneralShape createEllipse(org.eclipse.draw2d.geometry.Rectangle rect) 44 { 45 Arc2D arc = new Arc2D.Double (rect.x, rect.y, rect.width, rect.height, 0, 360, Arc2D.OPEN); 46 return new GeneralShape(arc); 47 } 48 49 public static GeneralShape createRectangle(org.eclipse.draw2d.geometry.Rectangle rect) 50 { 51 return createRectangle(rect.x, rect.y, rect.width, rect.height); 52 } 53 54 } 55 | Popular Tags |