Examples of mpt2units()


Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        AFPPageOverlay pageOverlay = getPageSetupAttachment();
        if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(elementName)) {
            // convert user specific units to mpts and set the coordinates for the page overlay
            AFPPaintingState paintingState = new AFPPaintingState();
            AFPUnitConverter unitConverter = new AFPUnitConverter(paintingState);
            int x = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_X)));
            int y = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_Y)));
            pageOverlay.setX(x);
            pageOverlay.setY(y);
        }
    }
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(elementName)) {
            // convert user specific units to mpts and set the coordinates for the page overlay
            AFPPaintingState paintingState = new AFPPaintingState();
            AFPUnitConverter unitConverter = new AFPUnitConverter(paintingState);
            int x = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_X)));
            int y = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_Y)));
            pageOverlay.setX(x);
            pageOverlay.setY(y);
        }
    }
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        int[] coords = unitConv.mpts2units(new float[] {targetRect.x, targetRect.y});
        objectAreaInfo.setX(coords[X]);
        objectAreaInfo.setY(coords[Y]);

        int width = Math.round(unitConv.mpt2units(targetRect.width));
        objectAreaInfo.setWidth(width);

        int height = Math.round(unitConv.mpt2units(targetRect.height));
        objectAreaInfo.setHeight(height);
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        objectAreaInfo.setY(coords[Y]);

        int width = Math.round(unitConv.mpt2units(targetRect.width));
        objectAreaInfo.setWidth(width);

        int height = Math.round(unitConv.mpt2units(targetRect.height));
        objectAreaInfo.setHeight(height);

        int resolution = paintingState.getResolution();
        objectAreaInfo.setHeightRes(resolution);
        objectAreaInfo.setWidthRes(resolution);
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

            Rectangle targetRect) {
        AFPUnitConverter unitConv = paintingState.getUnitConverter();

        int[] coords = unitConv.mpts2units(new float[] {targetRect.x, targetRect.y});

        int width = Math.round(unitConv.mpt2units(targetRect.width));

        int height = Math.round(unitConv.mpt2units(targetRect.height));

        int resolution = paintingState.getResolution();
        AFPObjectAreaInfo objectAreaInfo = new AFPObjectAreaInfo(coords[X], coords[Y], width,
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        int[] coords = unitConv.mpts2units(new float[] {targetRect.x, targetRect.y});

        int width = Math.round(unitConv.mpt2units(targetRect.width));

        int height = Math.round(unitConv.mpt2units(targetRect.height));

        int resolution = paintingState.getResolution();
        AFPObjectAreaInfo objectAreaInfo = new AFPObjectAreaInfo(coords[X], coords[Y], width,
                height, resolution, paintingState.getRotation());
        return objectAreaInfo;
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        AFPUnitConverter unitConv = paintingState.getUnitConverter();

        int rotation = paintingState.getRotation();
        int objX = (int) Math.round(at.getTranslateX());
        int objY = (int) Math.round(at.getTranslateY());
        int objWidth = Math.round(unitConv.mpt2units(width));
        int objHeight = Math.round(unitConv.mpt2units(height));
        AFPObjectAreaInfo objectAreaInfo = new AFPObjectAreaInfo(objX, objY, objWidth, objHeight,
                resolution, rotation);
        return objectAreaInfo;
    }
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        int rotation = paintingState.getRotation();
        int objX = (int) Math.round(at.getTranslateX());
        int objY = (int) Math.round(at.getTranslateY());
        int objWidth = Math.round(unitConv.mpt2units(width));
        int objHeight = Math.round(unitConv.mpt2units(height));
        AFPObjectAreaInfo objectAreaInfo = new AFPObjectAreaInfo(objX, objY, objWidth, objHeight,
                resolution, rotation);
        return objectAreaInfo;
    }
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        AFPPageOverlay pageOverlay = getPageSetupAttachment();
        if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(elementName)) {
            // convert user specific units to mpts and set the coordinates for the page overlay
            AFPPaintingState paintingState = new AFPPaintingState();
            AFPUnitConverter unitConverter = new AFPUnitConverter(paintingState);
            int x = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_X)));
            int y = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_Y)));
            pageOverlay.setX(x);
            pageOverlay.setY(y);
        }
    }
View Full Code Here

Examples of org.apache.fop.afp.AFPUnitConverter.mpt2units()

        if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(elementName)) {
            // convert user specific units to mpts and set the coordinates for the page overlay
            AFPPaintingState paintingState = new AFPPaintingState();
            AFPUnitConverter unitConverter = new AFPUnitConverter(paintingState);
            int x = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_X)));
            int y = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_Y)));
            pageOverlay.setX(x);
            pageOverlay.setY(y);
        }
    }
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.