Examples of toGeneralPath()


Examples of com.projity.graphic.configuration.TexturedShape.toGeneralPath()

 
 
  private void setShape(GraphicNode node,Rectangle2D ref,double centerX,double centerY){
      TexturedShape texturedShape=findShape(node);
      if (texturedShape==null) return;
      GeneralPath shape=texturedShape.toGeneralPath(ref.getWidth(),ref.getHeight(),centerX-ref.getWidth()/2,centerY,null);
      node.setXbsShape(shape,centerX,centerY);
      Rectangle.union(bounds,network.scale(shape.getBounds()),bounds);
  }
 
  protected int updateBounds(Point2D origin,Rectangle2D ref){//cache in current version isn't a tree
View Full Code Here

Examples of com.projity.graphic.configuration.TexturedShape.toGeneralPath()

        TexturedShape texturedShape=findShape(current);
        if (texturedShape==null) continue;
        double centerX=origin.getX()+ref.getMaxX()*col+ref.getWidth()/2;
        double centerY=origin.getY()+ref.getMaxY()*row+ref.getHeight()/2;
        //System.out.println(centerX+"/"+centerY);
        GeneralPath shape=texturedShape.toGeneralPath(ref.getWidth(),ref.getHeight(),centerX-ref.getWidth()/2,centerY,null);
        current.setPertShape(shape,centerX,centerY);
        Rectangle cellBounds=network.scale(shape.getBounds());
        if (isEmpty())
        bounds.setBounds(cellBounds);
      else Rectangle.union(bounds,cellBounds,bounds);
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.common.PDRectangle.toGeneralPath()

    private void clipToRect(PDRectangle rectangle)
    {
        if (rectangle != null)
        {
            PDRectangle clip = rectangle.transform(getGraphicsState().getCurrentTransformationMatrix());
            getGraphicsState().intersectClippingPath(new Area(clip.toGeneralPath()));
        }
    }

    /**
     * Called when the BT operator is encountered. This method is for overriding in subclasses, the
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.common.PDRectangle.toGeneralPath()

            // transform the bbox
            PDRectangle bbox = form.getBBox().transform(transform);

            // clip the bbox to prevent giant bboxes from consuming all memory
            Area clip = (Area)getGraphicsState().getCurrentClippingPath().clone();
            clip.intersect(new Area(bbox.toGeneralPath()));
            Rectangle2D clipRect = clip.getBounds2D();
            this.bbox = new PDRectangle((float)clipRect.getX(), (float)clipRect.getY(),
                                        (float)clipRect.getWidth(), (float)clipRect.getHeight());

            // apply the underlying Graphics2D device's DPI transform
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.