/** * Returns the bounds of the area covered by this node, without * taking any of its rendering attribute into account. That is, * exclusive of any clipping, masking, filtering or stroking, for * example. */ public Rectangle2D getGeometryBounds() { if (source == null) return null; return source.getGeometryBounds(); }
/** * Returns the bounds of the area covered by this node, without * taking any of its rendering attribute into account. That is, * exclusive of any clipping, masking, filtering or stroking, for * example. */ public Rectangle2D getGeometryBounds() { if (source == null) return null; return source.getGeometryBounds(); }
/** * Returns the bounds of the area covered by this node, without * taking any of its rendering attribute into account. That is, * exclusive of any clipping, masking, filtering or stroking, for * example. */ public Rectangle2D getGeometryBounds() { if (source == null) return null; return source.getGeometryBounds(); }
/** * Returns an AffineTransform to move to the objectBoundingBox * coordinate system. * * @param Tx the original transformation * @param node the graphics node that defines the coordinate * system to move into */ public static AffineTransform toObjectBBox(AffineTransform Tx, GraphicsNode node) { AffineTransform Mx = new AffineTransform(); Rectangle2D bounds = node.getGeometryBounds(); if (bounds != null) { Mx.translate(bounds.getX(), bounds.getY()); Mx.scale(bounds.getWidth(), bounds.getHeight()); } Mx.concatenate(Tx); return Mx; }
/** * Returns an AffineTransform to move to the objectBoundingBox * coordinate system. * * @param Tx the original transformation * @param node the graphics node that defines the coordinate * system to move into */ public static AffineTransform toObjectBBox(AffineTransform Tx, GraphicsNode node) { AffineTransform Mx = new AffineTransform(); Rectangle2D bounds = node.getGeometryBounds(); if (bounds != null) { Mx.translate(bounds.getX(), bounds.getY()); Mx.scale(bounds.getWidth(), bounds.getHeight()); } Mx.concatenate(Tx); return Mx; }
/** * Returns an AffineTransform to move to the objectBoundingBox * coordinate system. * * @param Tx the original transformation * @param node the graphics node that defines the coordinate * system to move into */ public static AffineTransform toObjectBBox(AffineTransform Tx, GraphicsNode node) { AffineTransform Mx = new AffineTransform(); Rectangle2D bounds = node.getGeometryBounds(); if (bounds != null) { Mx.translate(bounds.getX(), bounds.getY()); Mx.scale(bounds.getWidth(), bounds.getHeight()); } Mx.concatenate(Tx); return Mx; }
/** * Returns the specified a Rectangle2D move to the objectBoundingBox * coordinate system of the specified graphics node. * * @param r the original Rectangle2D * @param node the graphics node that defines the coordinate * system to move into */ public static Rectangle2D toObjectBBox(Rectangle2D r, GraphicsNode node) { Rectangle2D bounds = node.getGeometryBounds(); if (bounds != null) { return new Rectangle2D.Double (bounds.getX() + r.getX()*bounds.getWidth(), bounds.getY() + r.getY()*bounds.getHeight(), r.getWidth() * bounds.getWidth(), r.getHeight() * bounds.getHeight()); } else { return new Rectangle2D.Double(); } }
/** * Returns the specified a Rectangle2D move to the objectBoundingBox * coordinate system of the specified graphics node. * * @param r the original Rectangle2D * @param node the graphics node that defines the coordinate * system to move into */ public static Rectangle2D toObjectBBox(Rectangle2D r, GraphicsNode node) { Rectangle2D bounds = node.getGeometryBounds(); if (bounds != null) { return new Rectangle2D.Double (bounds.getX() + r.getX()*bounds.getWidth(), bounds.getY() + r.getY()*bounds.getHeight(), r.getWidth() * bounds.getWidth(), r.getHeight() * bounds.getHeight()); } else { return new Rectangle2D.Double(); } }
/** * Returns the specified a Rectangle2D move to the objectBoundingBox * coordinate system of the specified graphics node. * * @param r the original Rectangle2D * @param node the graphics node that defines the coordinate * system to move into */ public static Rectangle2D toObjectBBox(Rectangle2D r, GraphicsNode node) { Rectangle2D bounds = node.getGeometryBounds(); if (bounds != null) { return new Rectangle2D.Double (bounds.getX() + r.getX()*bounds.getWidth(), bounds.getY() + r.getY()*bounds.getHeight(), r.getWidth() * bounds.getWidth(), r.getHeight() * bounds.getHeight()); } else { return new Rectangle2D.Double(); } }
Rectangle2D bounds = filteredNode.getGeometryBounds(); at.preConcatenate(AffineTransform.getTranslateInstance (primitiveRegion.getX() - bounds.getX(),
Rectangle2D bounds = filteredNode.getGeometryBounds(); at.preConcatenate(AffineTransform.getTranslateInstance (primitiveRegion.getX() - bounds.getX(),
Rectangle2D bounds = filteredNode.getGeometryBounds(); at.preConcatenate(AffineTransform.getTranslateInstance (primitiveRegion.getX() - bounds.getX(),
(hStr, SVG_HEIGHT_ATTRIBUTE, uctx); Rectangle2D bounds = targetNode.getGeometryBounds(); if (bounds != null ) { x = bounds.getX() + x*bounds.getWidth();
(hStr, SVG_HEIGHT_ATTRIBUTE, uctx); Rectangle2D bounds = targetNode.getGeometryBounds(); if (bounds != null ) { x = bounds.getX() + x*bounds.getWidth();
(hStr, SVG_HEIGHT_ATTRIBUTE, uctx); Rectangle2D bounds = targetNode.getGeometryBounds(); if (bounds != null ) { x = bounds.getX() + x*bounds.getWidth();
public Rectangle getBounds(GraphicsNode rootGN) { Rectangle2D r2d; switch (this) { case sensitive: r2d = rootGN.getSensitiveBounds(); break; case geometry: r2d = rootGN.getGeometryBounds(); break; case primitive: r2d = rootGN.getPrimitiveBounds(); break; case all: default: r2d = rootGN.getBounds(); break; } return r2d.getBounds(); }
break; case OBJECT_BOUNDING_BOX: Rectangle2D bounds = filteredNode.getGeometryBounds(); if (bounds == null) { dx = dy = dw = dh = 0;
public Rectangle getBounds(GraphicsNode rootGN) { Rectangle2D r2d; switch (this) { case sensitive: r2d = rootGN.getSensitiveBounds(); break; case geometry: r2d = rootGN.getGeometryBounds(); break; case primitive: r2d = rootGN.getPrimitiveBounds(); break; case all: default: r2d = rootGN.getBounds(); break; } return r2d.getBounds(); }
break; case OBJECT_BOUNDING_BOX: Rectangle2D bounds = filteredNode.getGeometryBounds(); if (bounds == null) { dx = dy = dw = dh = 0;
break; case OBJECT_BOUNDING_BOX: Rectangle2D bounds = filteredNode.getGeometryBounds(); if (bounds == null) { dx = dy = dw = dh = 0;