Package com.cburch.draw.shapes

Examples of com.cburch.draw.shapes.Rectangle


    Location e1 = Location.create(rx + (width + 8) / 2, ry + 1);
    Location ct = Location.create(rx + width / 2, ry + 11);
    Curve notch = new Curve(e0, e1, ct);
    notch.setValue(DrawAttr.STROKE_WIDTH, Integer.valueOf(2));
    notch.setValue(DrawAttr.STROKE_COLOR, Color.GRAY);
    Rectangle rect = new Rectangle(rx, ry, width, height);
    rect.setValue(DrawAttr.STROKE_WIDTH, Integer.valueOf(2));

    List<CanvasObject> ret = new ArrayList<CanvasObject>();
    ret.add(notch);
    ret.add(rect);
    placePins(ret, edge.get(Direction.WEST),
View Full Code Here


    return DrawAttr.getFillAttributes(attrs.getValue(DrawAttr.PAINT_TYPE));
  }
 
  @Override
  public CanvasObject createShape(int x, int y, int w, int h) {
    return attrs.applyTo(new Rectangle(x, y, w, h));
  }
View Full Code Here

public class Main {
  public static void main(String[] args) {
    DrawingAttributeSet attrs = new DrawingAttributeSet();
    Drawing model = new Drawing();
    CanvasObject rect = attrs.applyTo(new Rectangle(25, 25, 50, 50));
    model.addObjects(0, Collections.singleton(rect));

    showFrame(model, "Drawing 1");
    showFrame(model, "Drawing 2");
  }
View Full Code Here

        Location e1 = Location.create(rx + (width + 8) / 2, ry + 1);
        Location ct = Location.create(rx + width / 2, ry + 11);
        Curve notch = new Curve(e0, e1, ct);
        notch.setValue(DrawAttr.STROKE_WIDTH, Integer.valueOf(2));
        notch.setValue(DrawAttr.STROKE_COLOR, Color.GRAY);
        Rectangle rect = new Rectangle(rx, ry, width, height);
        rect.setValue(DrawAttr.STROKE_WIDTH, Integer.valueOf(2));

        List<CanvasObject> ret = new ArrayList<CanvasObject>();
        ret.add(notch);
        ret.add(rect);
        placePins(ret, edge.get(Direction.WEST),
View Full Code Here

public class Main {
    public static void main(String[] args) {
        DrawingAttributeSet attrs = new DrawingAttributeSet();
        Drawing model = new Drawing();
        CanvasObject rect = attrs.applyTo(new Rectangle(25, 25, 50, 50));
        model.addObjects(0, Collections.singleton(rect));

        showFrame(model, "Drawing 1");
        showFrame(model, "Drawing 2");
    }
View Full Code Here

        return DrawAttr.getFillAttributes(attrs.getValue(DrawAttr.PAINT_TYPE));
    }

    @Override
    public CanvasObject createShape(int x, int y, int w, int h) {
        return attrs.applyTo(new Rectangle(x, y, w, h));
    }
View Full Code Here

TOP

Related Classes of com.cburch.draw.shapes.Rectangle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.