Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Path.moveTo()


          final Angle lat = node.getNode().getLatitude();
          final Angle lon = node.getNode().getLongitude();
          final int x = (int) ((lon.getVal() - cm.getLon()) / cm.getLonInc());
          final int y = (int) ((cm.getLat() - lat.getVal()) / cm.getLatInc());
          if (first)
            path.moveTo(x, y);
          else
            path.lineTo(x, y);
          first = false;
        }
        gc.setForeground(black);
View Full Code Here


    int t = rectangle.y;
    int w = rectangle.width;
    int h = rectangle.height;
    int d = radius << 1;

    path.moveTo(l, t); // topleft
    path.lineTo(l + w - radius, t);
    path.addArc(l + w - d, t, d, d, -270, -90); // topright
    path.lineTo(l + w, t + radius);
    path.lineTo(l + w, t + h);
    path.lineTo(l, t + h);
View Full Code Here

    int t = rectangle.y;
    int w = rectangle.width;
    int h = rectangle.height;
    int d = radius << 1;

    path.moveTo(l + w, t);
    path.lineTo(l + radius, t);
    path.addArc(l, t, d, d, 90, 90);

    path.lineTo(l, t + radius);
    path.lineTo(l, t + h - radius);
View Full Code Here

    int t = rectangle.y;
    int w = rectangle.width;
    int h = rectangle.height;
    int d = radius << 1;

    path.moveTo(l, t);
    path.lineTo(l + w - radius, t);
    path.addArc(l + w - d, t, d, d, -270, -90);
    path.lineTo(l + w, t + radius);
    path.lineTo(l + w, t + h - radius);
    path.addArc(l + w - d, t + h - d, d, d, 0, -90);
View Full Code Here

  }

  public static Path createRoundPath(Rectangle rect, float cut) {
    Path path = new Path(null);

    path.moveTo(rect.x + cut, (float) rect.y);
    path.lineTo(rect.x + rect.width - cut, (float) rect.y);

    path.lineTo(rect.x + rect.width - cut, (float) rect.y);
    path.lineTo((float) rect.x + rect.width, rect.y + cut);
View Full Code Here

    int t = rectangle.y;
    int w = rectangle.width;
    int h = rectangle.height;
    int d = radius << 1;

    path.moveTo(l, t);
    path.lineTo(l + w, t);
    path.lineTo(l + w, t + h - radius);
    path.addArc(l + w - d, t + h - d, d, d, 0, -90);
    path.lineTo(l + w - radius, t + h);
    path.lineTo(l + radius, t + h);
View Full Code Here

    int t = rectangle.y;
    int w = rectangle.width;
    int h = rectangle.height;
    int d = radius << 1;

    path.moveTo(l + w, t);
    path.lineTo(l + radius, t);
    path.addArc(l, t, d, d, 90, 90);

    path.lineTo(l, t + radius);
    path.lineTo(l, t + h - radius);
View Full Code Here

    int t = rectangle.y;
    int w = rectangle.width;
    int h = rectangle.height;
    int d = radius << 1;

    path.moveTo(l, t);
    path.lineTo(l + w - radius, t);
    path.addArc(l + w - d, t, d, d, -270, -90);
    path.lineTo(l + w, t + radius);
    path.lineTo(l + w, t + h - radius);
    path.addArc(l + w - d, t + h - d, d, d, 0, -90);
View Full Code Here

    int t = rectangle.y;
    int w = rectangle.width;
    int h = rectangle.height;
    int d = radius << 1;

    path.moveTo(l, t); // topleft
    path.lineTo(l + w - radius, t);
    path.addArc(l + w - d, t, d, d, -270, -90); // topright
    path.lineTo(l + w, t + radius);
    path.lineTo(l + w, t + h);
    path.lineTo(l, t + h);
View Full Code Here

        PathIterator pit = shape.getPathIterator(null);
        while (!pit.isDone()) {
            type = pit.currentSegment(coords);
            switch (type) {
                case (PathIterator.SEG_MOVETO):
                    path.moveTo(coords[0], coords[1]);
                    break;
                case (PathIterator.SEG_LINETO):
                    path.lineTo(coords[0], coords[1]);
                    break;
                case (PathIterator.SEG_QUADTO):
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.