Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.PointList.translate()


    // calculate difference
    Dimension delta = bounds.getLocation()
        .getDifference(layout.getLocation()).negate();

    // perform translate
    points.translate(delta.width, delta.height);

    // calculate scale
    double sx = ((double) layout.width) / ((double) bounds.width);
    double sy = ((double) layout.height) / ((double) bounds.height);
View Full Code Here


    PointList points = getNormalizedPointList(request.getPoints());

    figure.translateToRelative(points);
    figure.translateFromParent(points);
    points.translate(getLayoutOrigin().getNegated());

    return points;
  }

}
View Full Code Here

        pointlist = bottomConnector;
      }
      for (int i = 0; i < capacity; i++) {
        y1 = rect.y + (2 * i + 1) * height / (capacity * 2);
        graphics.setForegroundColor(ColorConstants.gray);
        pointlist.translate(end, y1);
        graphics.fillPolygon(pointlist);
        graphics.drawPolygon(pointlist);
        pointlist.translate(-end, -y1);
      }
    }
View Full Code Here

        y1 = rect.y + (2 * i + 1) * height / (capacity * 2);
        graphics.setForegroundColor(ColorConstants.gray);
        pointlist.translate(end, y1);
        graphics.fillPolygon(pointlist);
        graphics.drawPolygon(pointlist);
        pointlist.translate(-end, -y1);
      }
    }
    else {
      int x1;
      int y1 = rect.y;
View Full Code Here

        pointlist = bottomConnector;
      }
      for (int i = 0; i < capacity; i++) {
        x1 = rect.x + (2 * i + 1) * width / (capacity * 2);
        graphics.setForegroundColor(ColorConstants.gray);
        pointlist.translate(x1, bottom);
        graphics.fillPolygon(pointlist);
        graphics.drawPolygon(pointlist);
        pointlist.translate(-x1, -bottom);
      }
    }
View Full Code Here

        x1 = rect.x + (2 * i + 1) * width / (capacity * 2);
        graphics.setForegroundColor(ColorConstants.gray);
        pointlist.translate(x1, bottom);
        graphics.fillPolygon(pointlist);
        graphics.drawPolygon(pointlist);
        pointlist.translate(-x1, -bottom);
      }
    }
    graphics.setForegroundColor(foreground);
    graphics.setBackgroundColor(background);
  }
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.