Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSNumber.doubleValue()


        if (result instanceof COSNumber)
        {
            COSNumber number = (COSNumber) result;
            if (number instanceof COSFloat)
            {
                Double real = number.doubleValue();
                if (real > MAX_POSITIVE_FLOAT || real < MAX_NEGATIVE_FLOAT)
                {
                    addValidationError(new ValidationError(ERROR_SYNTAX_NUMERIC_RANGE,
                            "Float is too long or too small: " + real+"  at offset "+pdfSource.getOffset()));
                }
View Full Code Here


    {
        // append straight line segment from the current point to the point
        COSNumber x = (COSNumber)operands.get(0);
        COSNumber y = (COSNumber)operands.get(1);

        Point2D pos = context.transformedPoint(x.doubleValue(), y.doubleValue());
        context.lineTo((float) pos.getX(), (float) pos.getY());
    }

    @Override
    public String getName()
View Full Code Here

        double x1 = x.doubleValue();
        double y1 = y.doubleValue();

        // create a pair of coordinates for the transformation
        double x2 = w.doubleValue() + x1;
        double y2 = h.doubleValue() + y1;

        Point2D p0 = context.transformedPoint(x1, y1);
        Point2D p1 = context.transformedPoint(x2, y1);
        Point2D p2 = context.transformedPoint(x2, y2);
        Point2D p3 = context.transformedPoint(x1, y2);
View Full Code Here

        COSNumber y1 = (COSNumber)operands.get(1);
        COSNumber x3 = (COSNumber)operands.get(2);
        COSNumber y3 = (COSNumber)operands.get(3);

        Point2D point1 = context.transformedPoint(x1.doubleValue(), y1.doubleValue());
        Point2D point3 = context.transformedPoint(x3.doubleValue(), y3.doubleValue());

        context.curveTo((float) point1.getX(), (float) point1.getY(),
                        (float) point3.getX(), (float) point3.getY(),
                        (float) point3.getX(), (float) point3.getY());
    }
View Full Code Here

        COSNumber x3 = (COSNumber)operands.get(4);
        COSNumber y3 = (COSNumber)operands.get(5);

        Point2D point1 = context.transformedPoint(x1.doubleValue(), y1.doubleValue());
        Point2D point2 = context.transformedPoint(x2.doubleValue(), y2.doubleValue());
        Point2D point3 = context.transformedPoint(x3.doubleValue(), y3.doubleValue());

        context.curveTo((float) point1.getX(), (float) point1.getY(),
                        (float) point2.getX(), (float) point2.getY(),
                        (float) point3.getX(), (float) point3.getY());
    }
View Full Code Here

    @Override
    public void process(Operator operator, List<COSBase> operands) throws IOException
    {
        COSNumber x = (COSNumber)operands.get(0);
        COSNumber y = (COSNumber)operands.get(1);
        Point2D pos = context.transformedPoint(x.doubleValue(), y.doubleValue());
        context.moveTo((float) pos.getX(), (float) pos.getY());
    }

    @Override
    public String getName()
View Full Code Here

        COSNumber y3 = (COSNumber)operands.get(3);

        Point2D currentPoint = context.getCurrentPoint();

        Point2D point2 = context.transformedPoint(x2.doubleValue(), y2.doubleValue());
        Point2D point3 = context.transformedPoint(x3.doubleValue(), y3.doubleValue());

        context.curveTo((float) currentPoint.getX(), (float) currentPoint.getY(),
                        (float) point2.getX(), (float) point2.getY(),
                        (float) point3.getX(), (float) point3.getY());
    }
View Full Code Here

        if (result instanceof COSNumber)
        {
            COSNumber number = (COSNumber) result;
            if (number instanceof COSFloat)
            {
                Double real = number.doubleValue();
                if (real > MAX_POSITIVE_FLOAT || real < MAX_NEGATIVE_FLOAT)
                {
                    addValidationError(new ValidationError(ERROR_SYNTAX_NUMERIC_RANGE,
                            "Float is too long or too small: " + real));
                }
View Full Code Here

        double x1 = x.doubleValue();
        double y1 = y.doubleValue();

        // create a pair of coordinates for the transformation
        double x2 = w.doubleValue() + x1;
        double y2 = h.doubleValue() + y1;

        Point2D p0 = drawer.transformedPoint(x1, y1);
        Point2D p1 = drawer.transformedPoint(x2, y1);
        Point2D p2 = drawer.transformedPoint(x2, y2);
        Point2D p3 = drawer.transformedPoint(x1, y2);
View Full Code Here

        if (result instanceof COSNumber)
        {
            COSNumber number = (COSNumber) result;
            if (number instanceof COSFloat)
            {
                Double real = number.doubleValue();
                if (real > MAX_POSITIVE_FLOAT || real < MAX_NEGATIVE_FLOAT)
                {
                    addValidationError(new ValidationError(ERROR_SYNTAX_NUMERIC_RANGE,
                            "Float is too long or too small: " + real));
                }
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.