Package org.apache.fontbox.util

Examples of org.apache.fontbox.util.BoundingBox


    @Override
    public BoundingBox getBoundingBox()
    {
        PDRectangle rect = getFontBBox();
        return new BoundingBox(rect.getLowerLeftX(), rect.getLowerLeftY(),
                               rect.getWidth(), rect.getHeight());
    }
View Full Code Here


            COSNumber urx = (COSNumber) arguments.get(4);
            COSNumber ury = (COSNumber) arguments.get(5);

            // width = horizontalWidth.intValue();
            // height = verticalWidth.intValue();
            box = new BoundingBox();
            box.setLowerLeftX(llx.floatValue());
            box.setLowerLeftY(lly.floatValue());
            box.setUpperRightX(urx.floatValue());
            box.setUpperRightY(ury.floatValue());
View Full Code Here

        if (!at.isIdentity())
        {
            form.setMatrix(at);
        }

        BoundingBox bbox = new BoundingBox();
        bbox.setLowerLeftX(viewBox.getLowerLeftX());
        bbox.setLowerLeftY(viewBox.getLowerLeftY());
        bbox.setUpperRightX(viewBox.getUpperRightX());
        bbox.setUpperRightY(viewBox.getUpperRightY());
        form.setBBox(new PDRectangle(bbox));

        return form;
    }
View Full Code Here

            {
                fontMetrics.setWeight( readLine() );
            }
            else if( FONT_BBOX.equals( nextCommand ) )
            {
                BoundingBox bBox = new BoundingBox();
                bBox.setLowerLeftX( readFloat() );
                bBox.setLowerLeftY( readFloat() );
                bBox.setUpperRightX( readFloat() );
                bBox.setUpperRightY( readFloat() );
                fontMetrics.setFontBBox( bBox );
            }
            else if( VERSION.equals( nextCommand ) )
            {
                fontMetrics.setFontVersion( readLine() );
View Full Code Here

                {
                    String llx = metricsTokenizer.nextToken();
                    String lly = metricsTokenizer.nextToken();
                    String urx = metricsTokenizer.nextToken();
                    String ury = metricsTokenizer.nextToken();
                    BoundingBox box = new BoundingBox();
                    box.setLowerLeftX( Float.parseFloat( llx ) );
                    box.setLowerLeftY( Float.parseFloat( lly ) );
                    box.setUpperRightX( Float.parseFloat( urx ) );
                    box.setUpperRightY( Float.parseFloat( ury ) );
                    charMetric.setBoundingBox( box );
                    verifySemicolon( metricsTokenizer );
                }
                else if( nextCommand.equals( CHARMETRICS_L ) )
                {
View Full Code Here

     *
     * @return the font bounding box
     */
    public BoundingBox getFontBBox()
    {
        return new BoundingBox(fontBBox);
    }
View Full Code Here

        numberOfContours = data.readSignedShort();
        xMin = data.readSignedShort();
        yMin = data.readSignedShort();
        xMax = data.readSignedShort();
        yMax = data.readSignedShort();
        boundingBox = new BoundingBox(xMin, yMin, xMax, yMax);

        if (numberOfContours >= 0)
        {
            // create a simple glyph
            glyphDescription = new GlyfSimpleDescript(numberOfContours, data);
View Full Code Here

        short xMin = getHeader().getXMin();
        short xMax = getHeader().getXMax();
        short yMin = getHeader().getYMin();
        short yMax = getHeader().getYMax();
        float scale = 1000f / getUnitsPerEm();
        return new BoundingBox(xMin * scale, yMin * scale, xMax * scale, yMax * scale);
    }
View Full Code Here

     * Returns the FontBBox.
     */
    public BoundingBox getFontBBox()
    {
        List<Number> numbers = (List<Number>)topDict.get("FontBBox");
        return new BoundingBox(numbers);
    }
View Full Code Here

        if (!at.isIdentity())
        {
            form.setMatrix(at);
        }

        BoundingBox bbox = new BoundingBox();
        bbox.setLowerLeftX(viewBox.getLowerLeftX());
        bbox.setLowerLeftY(viewBox.getLowerLeftY());
        bbox.setUpperRightX(viewBox.getUpperRightX());
        bbox.setUpperRightY(viewBox.getUpperRightY());
        form.setBBox(new PDRectangle(bbox));

        return form;
    }
View Full Code Here

TOP

Related Classes of org.apache.fontbox.util.BoundingBox

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.