Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.PrecisionDimension


  public void setSizeInLayout(double width, double height) {
    double oldWidth = this.width;
    this.width = width;
    double oldHeight = this.height;
    this.height = height;
    firePropertyChange(Properties.SIZE.toString(), new PrecisionDimension(oldWidth, oldHeight), new PrecisionDimension(width, height));
  }
View Full Code Here


   * This method transforms the input dimension from the world coordinate
   * system to the device coordinate system.
   */
  public PrecisionDimension transformDimension(PrecisionDimension inDimension)
  {
    PrecisionDimension outDimension =
      new PrecisionDimension(
        this.transformX(inDimension.preciseWidth) -
          this.transformX(0.0),
        this.transformY(inDimension.preciseHeight) -
          this.transformY(0.0));
   
View Full Code Here

   */
  public PrecisionRectangle transformRect(PrecisionRectangle inRect)
  {
    PrecisionRectangle outRect = new PrecisionRectangle();
   
    PrecisionDimension inRectDim =
      new PrecisionDimension(inRect.preciseWidth, inRect.preciseHeight);
    PrecisionDimension outRectDim = this.transformDimension(inRectDim);
    outRect.setWidth(outRectDim.preciseWidth);
    outRect.setHeight(outRectDim.preciseHeight);
   
    outRect.setX(this.transformX(inRect.preciseX));
    outRect.setY(this.transformY(inRect.preciseY));
View Full Code Here

   * This method transforms the input dimension from the device coordinate
   * system to the world coordinate system.
   */
  public PrecisionDimension inverseTransformDimension(PrecisionDimension inDimension)
  {
    PrecisionDimension outDimension =
      new PrecisionDimension(
        this.inverseTransformX(inDimension.preciseWidth -
          this.inverseTransformX(0.0)),
        this.inverseTransformY(inDimension.preciseHeight -
          this.inverseTransformY(0.0)));
   
View Full Code Here

   */
  public PrecisionRectangle inverseTransformRect(PrecisionRectangle inRect)
  {
    PrecisionRectangle outRect = new PrecisionRectangle();
   
    PrecisionDimension inRectDim =
      new PrecisionDimension(inRect.preciseWidth, inRect.preciseHeight);
    PrecisionDimension outRectDim =
      this.inverseTransformDimension(inRectDim);
    outRect.setWidth(outRectDim.preciseWidth);
    outRect.setHeight(outRectDim.preciseHeight);
   
    outRect.setX(this.inverseTransformX(inRect.preciseX));
View Full Code Here

    rectWorld.preciseWidth = 150.0;
    rectWorld.preciseHeight = 150.0;

    PrecisionPoint pointWorld =
      new PrecisionPoint(rectWorld.preciseX, rectWorld.preciseY);
    PrecisionDimension dimWorld =
      new PrecisionDimension(rectWorld.preciseWidth, rectWorld.preciseHeight);
   
    PrecisionPoint pointDevice = trans.transformPoint(pointWorld);
    PrecisionDimension dimDevice = trans.transformDimension(dimWorld);
    PrecisionRectangle rectDevice = trans.transformRect(rectWorld);
   
    // The transformed location & dimension should be (16,70) & (75,-300)
  }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.geometry.PrecisionDimension

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.