Package com.jgraph.gaeawt.java.awt.geom

Examples of com.jgraph.gaeawt.java.awt.geom.Rectangle2D$Float


        AffineTransform at = AffineTransform.getTranslateInstance(xOffs, yOffs);
        AffineTransform glyphTransform = getGlyphTransform(glyphIndex);

        if (transform.isIdentity() && ((glyphTransform == null) || glyphTransform.isIdentity())){
            Rectangle2D blackBox = vector[glyphIndex].getGlyphMetrics().getBounds2D();
            at.translate(visualPositions[idx], visualPositions[idx+1]);
            return(at.createTransformedShape(blackBox));
        }

        GeneralPath shape = (GeneralPath)this.getGlyphOutline(glyphIndex);
View Full Code Here


        float x = visualPositions[0];
        float width = visualPositions[visualPositions.length-2];

        double scaleY =  transform.getScaleY();

        Rectangle2D bounds = new Rectangle2D.Float(x, (float)((-this.ascent-this.leading)*scaleY), width, (float)(this.height*scaleY));
        return bounds;
    }
View Full Code Here

        FontPeerImpl peer = (FontPeerImpl) this.getPeer();

        final int TRANSFORM_MASK = AffineTransform.TYPE_GENERAL_ROTATION
                | AffineTransform.TYPE_GENERAL_TRANSFORM;
        Rectangle2D bounds;

        AffineTransform transform = getTransform();
        AffineTransform frcTransform = frc.getTransform();

        // XXX: for transforms where an angle between basis vectors is not 90
View Full Code Here

            throw new NullPointerException(Messages.getString("awt.00")); //$NON-NLS-1$
        }

        FontPeerImpl peer = (FontPeerImpl)this.getPeer();

        Rectangle2D bounds = peer.getMaxCharBounds(frc);
        AffineTransform transform = getTransform();
        // !! Documentation doesn't describe meaning of max char bounds
        // for the fonts that have rotate transforms. For all transforms
        // returned bounds are the bounds of transformed maxCharBounds
        // Rectangle2D that corresponds to the font with identity transform.
View Full Code Here

    @Override
    public Rectangle2D createIntersection(Rectangle2D r) {
        if (r instanceof Rectangle) {
            return intersection((Rectangle) r);
        }
        Rectangle2D dst = new Rectangle2D.Double();
        Rectangle2D.intersect(this, r, dst);
        return dst;
    }
View Full Code Here

    @Override
    public Rectangle2D createUnion(Rectangle2D r) {
        if (r instanceof Rectangle) {
            return union((Rectangle)r);
        }
        Rectangle2D dst = new Rectangle2D.Double();
        Rectangle2D.union(this, r, dst);
        return dst;
    }
View Full Code Here

    float minX, minY, width, height;

    public RenderableImageOp(ContextualRenderedImageFactory CRIF, ParameterBlock paramBlock) {
        this.CRIF = CRIF;
        this.paramBlock = (ParameterBlock) paramBlock.clone();
        Rectangle2D r = CRIF.getBounds2D(paramBlock);
        minX = (float) r.getMinX();
        minY = (float) r.getMinY();
        width = (float) r.getWidth();
        height = (float) r.getHeight();
    }
View Full Code Here

        // Returns visual bounds of this segment
        @Override
        Rectangle2D getVisualBounds() {
            if (visualBounds == null) {
                Rectangle2D bounds = ga.getBounds();

                // First and last chars can be out of logical bounds, so we calculate
                // (bounds.getWidth() - ga.getAdvance()) which is exactly the difference
                bounds.setRect(
                        bounds.getMinX() + x,
                        bounds.getMinY() + y,
                        bounds.getWidth() - ga.getAdvance() + getAdvance(),
                        bounds.getHeight()
                );
                visualBounds = TextDecorator.extendVisualBounds(this, bounds, decoration);
            }

            return (Rectangle2D) visualBounds.clone();
View Full Code Here

            if (limit > length) {
                limit = length;
            }

            Rectangle2D charBounds = ga.getBounds();
            charBounds.setRect(
                    charBounds.getX() + ga.getAdvance() * start + x,
                    charBounds.getY() + y,
                    charBounds.getWidth() + ga.getAdvance() * (limit - start),
                    charBounds.getHeight()
            );

            return charBounds;
        }
View Full Code Here

        }

        if (d.swapBfFg) {
            // Fill background area
            g2d.setPaint(d.fg);
            Rectangle2D bgArea = trs.getLogicalBounds();
            Rectangle2D toFill =
                    new Rectangle2D.Double(
                            bgArea.getX() + xOffset,
                            bgArea.getY() + yOffset,
                            bgArea.getWidth(),
                            bgArea.getHeight()
                    );
            g2d.fill(toFill);

            // Set foreground color
            g2d.setPaint(d.bg == null ? Color.WHITE : d.bg);
        } else {
            if (d.bg != null) { // Fill background area
                g2d.setPaint(d.bg);
                Rectangle2D bgArea = trs.getLogicalBounds();
                Rectangle2D toFill =
                        new Rectangle2D.Double(
                                bgArea.getX() + xOffset,
                                bgArea.getY() + yOffset,
                                bgArea.getWidth(),
                                bgArea.getHeight()
View Full Code Here

TOP

Related Classes of com.jgraph.gaeawt.java.awt.geom.Rectangle2D$Float

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.