/** * Returns the outline of this node. */ public Shape getOutline() { if (source == null) return null; return source.getOutline(); } }
/** * Returns the outline of this node. */ public Shape getOutline() { if (source == null) return null; return source.getOutline(); } }
/** * Returns the outline of this node. */ public Shape getOutline() { if (source == null) return null; return source.getOutline(); } }
public Shape getOutline() { if (oShape != null) return oShape; oShape = pcn.getOutline(); AffineTransform tr = pcn.getTransform(); if (tr != null) oShape = tr.createTransformedShape(oShape); return oShape; } protected void invalidateGeometryCache() {
public Shape getOutline() { if (oShape != null) return oShape; oShape = pcn.getOutline(); AffineTransform tr = pcn.getTransform(); if (tr != null) oShape = tr.createTransformedShape(oShape); return oShape; } protected void invalidateGeometryCache() {
public Shape getOutline() { if (oShape != null) return oShape; oShape = pcn.getOutline(); AffineTransform tr = pcn.getTransform(); if (tr != null) oShape = tr.createTransformedShape(oShape); return oShape; } protected void invalidateGeometryCache() {
/** * The bounds of a given graphics node. * * @param node * The given graphics node * @return the bounds */ protected Rectangle getElementBounds(GraphicsNode node) { if (node == null) { return null; } AffineTransform at = canvas.getRenderingTransform(); Shape s = at.createTransformedShape(node.getOutline()); return outset(s.getBounds(), 1); }
/** * The bounds of a given graphics node. * * @param node * The given graphics node * @return the bounds */ protected Rectangle getElementBounds(GraphicsNode node) { if (node == null) { return null; } AffineTransform at = canvas.getRenderingTransform(); Shape s = at.createTransformedShape(node.getOutline()); return outset(s.getBounds(), 1); }
/** * Returns the tight bounding box in current user space (i.e., * after application of the transform attribute, if any) on the * geometry of all contained graphics elements, exclusive of * stroke-width and filter effects). */ public Rectangle2D getBBox() { if (node == null) { return null; } Shape s = node.getOutline(); if ((bboxShape != null) && (s == bboxShape.get())) return bbox; bboxShape = new SoftReference(s); // don't keep this live. bbox = null; if (s == null) return bbox; // SegmentList.getBounds2D gives tight BBox. SegmentList sl = new SegmentList(s); bbox = sl.getBounds2D(); return bbox; }
/** * Returns the tight bounding box in current user space (i.e., * after application of the transform attribute, if any) on the * geometry of all contained graphics elements, exclusive of * stroke-width and filter effects). */ public Rectangle2D getBBox() { if (node == null) { return null; } Shape s = node.getOutline(); if ((bboxShape != null) && (s == bboxShape.get())) return bbox; bboxShape = new SoftReference(s); // don't keep this live. bbox = null; if (s == null) return bbox; // SegmentList.getBounds2D gives tight BBox. SegmentList sl = new SegmentList(s); bbox = sl.getBounds2D(); return bbox; }
/** * Returns the tight bounding box in current user space (i.e., * after application of the transform attribute, if any) on the * geometry of all contained graphics elements, exclusive of * stroke-width and filter effects). */ public Rectangle2D getBBox() { if (node == null) { return null; } Shape s = node.getOutline(); if ((bboxShape != null) && (s == bboxShape.get())) return bbox; bboxShape = new SoftReference(s); // don't keep this live. bbox = null; if (s == null) return bbox; // SegmentList.getBounds2D gives tight BBox. SegmentList sl = new SegmentList(s); bbox = sl.getBounds2D(); return bbox; }
glyphChildrenOutline = glyphChildrenNode.getOutline();
/** * Returns the outline of this node. */ public Shape getOutline() { if (outline != null) return outline; outline = new GeneralPath(); for (int i = 0; i < count; i++) { Shape childOutline = children[i].getOutline(); if (childOutline != null) { AffineTransform tr = children[i].getTransform(); if (tr != null) { ((GeneralPath)outline).append(tr.createTransformedShape(childOutline), false); } else { ((GeneralPath)outline).append(childOutline, false); } } } return outline; }
glyphChildrenOutline = glyphChildrenNode.getOutline();
/** * Returns the outline of this node. */ public Shape getOutline() { if (outline != null) return outline; outline = new GeneralPath(); for (int i = 0; i < count; i++) { Shape childOutline = children[i].getOutline(); if (childOutline != null) { AffineTransform tr = children[i].getTransform(); if (tr != null) { ((GeneralPath)outline).append(tr.createTransformedShape(childOutline), false); } else { ((GeneralPath)outline).append(childOutline, false); } } } return outline; }
/** * Returns the outline of this node. */ public Shape getOutline() { if (outline != null) return outline; outline = new GeneralPath(); for (int i = 0; i < count; i++) { Shape childOutline = children[i].getOutline(); if (childOutline != null) { AffineTransform tr = children[i].getTransform(); if (tr != null) { ((GeneralPath)outline).append(tr.createTransformedShape(childOutline), false); } else { ((GeneralPath)outline).append(childOutline, false); } } } return outline; }
protected void gatherRegionInfo(BridgeContext ctx, Element rgn, float verticalAlign, List regions) { boolean isStatic = !ctx.isDynamic(); for (Node n = getFirstChild(rgn); n != null; n = getNextSibling(n)) { if (n.getNodeType() != Node.ELEMENT_NODE) { continue; } GraphicsNode gn = isStatic ? (GraphicsNode) flowRegionNodes.get(n) : ctx.getGraphicsNode(n); Shape s = gn.getOutline(); if (s == null) { continue; } AffineTransform at = gn.getTransform(); if (at != null) { s = at.createTransformedShape(s); } regions.add(new RegionInfo(s, verticalAlign)); } }
protected void gatherRegionInfo(BridgeContext ctx, Element rgn, float verticalAlign, List regions) { boolean isStatic = !ctx.isDynamic(); for (Node n = getFirstChild(rgn); n != null; n = getNextSibling(n)) { if (n.getNodeType() != Node.ELEMENT_NODE) { continue; } GraphicsNode gn = isStatic ? (GraphicsNode) flowRegionNodes.get(n) : ctx.getGraphicsNode(n); Shape s = gn.getOutline(); if (s == null) { continue; } AffineTransform at = gn.getTransform(); if (at != null) { s = at.createTransformedShape(s); } regions.add(new RegionInfo(s, verticalAlign)); } }
AffineTransform elementsAt = nodeToPaint.getGlobalTransform(); Shape selectionHighlight = nodeToPaint.getOutline(); AffineTransform at = canvas.getRenderingTransform(); at.concatenate(elementsAt);
protected void gatherRegionInfo(BridgeContext ctx, Element rgn, float verticalAlign, List regions) { boolean isStatic = !ctx.isDynamic(); for (Node n = getFirstChild(rgn); n != null; n = getNextSibling(n)) { if (n.getNodeType() != Node.ELEMENT_NODE) { continue; } GraphicsNode gn = isStatic ? (GraphicsNode) flowRegionNodes.get(n) : ctx.getGraphicsNode(n); Shape s = gn.getOutline(); if (s == null) { continue; } AffineTransform at = gn.getTransform(); if (at != null) { s = at.createTransformedShape(s); } regions.add(new RegionInfo(s, verticalAlign)); } }