Package org.apache.fop.afp

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


    public static AFPObjectAreaInfo createObjectAreaInfo(AFPPaintingState paintingState,
            Rectangle targetRect) {
        AFPObjectAreaInfo objectAreaInfo = new AFPObjectAreaInfo();
        AFPUnitConverter unitConv = paintingState.getUnitConverter();

        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);
View Full Code Here


     */
    public static AFPObjectAreaInfo createObjectAreaInfo(AFPPaintingState paintingState,
            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));

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.