Package org.mt4j.components.bounds

Examples of org.mt4j.components.bounds.BoundsZPlaneRectangle


  /* (non-Javadoc)
   * @see org.mt4j.components.visibleComponents.shapes.MTPolygon#computeDefaultBounds()
   */
  @Override
  protected IBoundingShape computeDefaultBounds(){
    return new BoundsZPlaneRectangle(this);
  }
View Full Code Here


      super(vertices, applet);
    }
   
    protected IBoundingShape computeDefaultBounds() {
      //Use z plane bounding rect instead default boundingsphere for svg!
      return new BoundsZPlaneRectangle(this);
    }
View Full Code Here

    }
   
    @Override
    protected IBoundingShape computeDefaultBounds() {
      //Use z plane bounding rect instead default boundingsphere for svg!
      return new BoundsZPlaneRectangle(this);
    }
View Full Code Here

        if (pa instanceof MTApplication) {
          MTApplication app = (MTApplication) pa;

          //Calculate a bounding rectangle from the rotated shape
          BoundsZPlaneRectangle boundsZ = new BoundsZPlaneRectangle(shape, shape.getVerticesLocal());
          Vector3D[] boundsVecs = boundsZ.getVectorsLocal();
          float bBoxWidth  = boundsZ.getWidthXY(TransformSpace.LOCAL);//boundsVecs[1].x - boundsVecs[0].x;
          float bBoxHeight = boundsZ.getHeightXY(TransformSpace.LOCAL);//boundsVecs[2].y - boundsVecs[1].y;

          SwingTextureRenderer swingTex;
          final MTRectangle rectangle;

          //Trial to make the texture as big as the bigger side of the bounding rectangle of the shape
View Full Code Here

    System.arraycopy(gradientRectVerts, 0, shapeAndGradVerts, shapeVertsCopy.length, gradientRectVerts.length);
   
    //Create a temporary polygon with the roated vertices to calc BBox
    MTPolygon inverseRotatedShape = new MTPolygon(shapeAndGradVerts, pa);
    //Calculate a bounding rectangle from the rotated shape
    BoundsZPlaneRectangle inverseRotatedBounds = new BoundsZPlaneRectangle(inverseRotatedShape);
    Vector3D[] invBoundsVecs = inverseRotatedBounds.getVectorsLocal();
   
    //logger.debug("Gradient Rectangle width: " + gradientRectWidth);
   
    //Get the positions where the offsets are on the gradient vector
//    float bBoxWidth  = invBoundsVecs[1].x - invBoundsVecs[0].x;
View Full Code Here

      shapeVertsCopy = (Vertex[]) Vertex.rotateZVectorArray(shapeVertsCopy, testShape.getCenterPointLocal(), -gradAngle);
     
      //Create a temporary polygon with the roated vertices to calc BBox
      MTPolygon inverseRotatedShape = new MTPolygon(shapeVertsCopy, pa);
      //Calculate a bounding rectangle from the rotated shape
      BoundsZPlaneRectangle inverseRotatedBounds = new BoundsZPlaneRectangle(inverseRotatedShape);
      Vector3D[] invBoundsVecs = inverseRotatedBounds.getVectorsLocal();
     
      //Get the positions where the offsets are on the gradient vector
      float bBoxWidth  = invBoundsVecs[1].x - invBoundsVecs[0].x;
      logger.debug("BBox width: " + bBoxWidth);
      float w = bBoxWidth/*/100*/;
 
View Full Code Here

  }
 
 
  @Override
  protected IBoundingShape computeDefaultBounds(){
    return new BoundsZPlaneRectangle(this);
  }
View Full Code Here

  }
 
 
  @Override
  protected IBoundingShape computeDefaultBounds(){
    return new BoundsZPlaneRectangle(this);
  }
View Full Code Here

//    comp.unregisterAllInputProcessors();
//    /*
    if (comp instanceof AbstractShape){
      AbstractShape shape = (AbstractShape)comp;
      if (!shape.hasBounds() && !(shape.getBounds() instanceof BoundsZPlaneRectangle)){
        shape.setBounds(new BoundsZPlaneRectangle(shape));
      }
      shape.setBoundsBehaviour(boundsBehaviour);
    }
//    */
    for(MTComponent child : comp.getChildren()){
View Full Code Here

  }
 
 
  @Override
  protected IBoundingShape computeDefaultBounds() {
    return new BoundsZPlaneRectangle(this);
  }
View Full Code Here

TOP

Related Classes of org.mt4j.components.bounds.BoundsZPlaneRectangle

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.