Examples of crIpd()


Examples of org.foray.area.ExternalGraphicArea.crIpd()

        node = node.getChildAt(0);
        assertTrue(node instanceof ExternalGraphicArea);

        /* First test the size of the viewport. */
        final ExternalGraphicArea ega = (ExternalGraphicArea) node;
        final int width = ega.crIpd();
        /* 200 pixels @ 96 pixels per inch = (200 / 96) * 72,000 millipoints
         * = 150,000 millipoints. */
        assertEquals(150000, width);

        /* Now test the size of the content. */
 
View Full Code Here

Examples of org.foray.area.LineArea.crIpd()

         * Default leading is 20% of the font-size, which is 12 points.
         * 50% * 20% * 12,000 = 1,200.
         * 720,000 - 1,200 = 718,800. */
        assertEquals(718800, lineArea.crOriginY());
        /* Same as parent. */
        assertEquals(432000, lineArea.crIpd());
        /* Default font-size is 12 points. */
        assertEquals(12000, lineArea.crBpd());

        /* The second child of the outer block area is a block-area. */
        node = outerBlockArea.getChildAt(1);
View Full Code Here

Examples of org.foray.area.LineArea.crIpd()

        assertEquals(72000, lineArea.crOriginX());
        /* Same as the previous block, adjusted for an additional half-leading.
         * 705,600 - 1,200 = 704,400. */
        assertEquals(704400, lineArea.crOriginY());
        /* Same as parent. */
        assertEquals(432000, lineArea.crIpd());
        /* Same as the first line. */
        assertEquals(12000, lineArea.crBpd());

        /* The fourth child of the outer block area is another line-area. */
        node = outerBlockArea.getChildAt(3);
View Full Code Here

Examples of org.foray.area.LineArea.crIpd()

        /* Same as the previous line, adjusted for one line and two
         * half-leadings.
         * 704,400 - 12,000 - 1,200 - 1,200 = 690,000. */
        assertEquals(690000, lineArea.crOriginY());
        /* Same as parent. */
        assertEquals(432000, lineArea.crIpd());
        /* Same as the other lines. */
        assertEquals(12000, lineArea.crBpd());
    }

    /**
 
View Full Code Here

Examples of org.foray.area.LineArea.crIpd()

        /* x same as the parent block. */
        assertEquals(72000, lineArea.crOriginX());
        /* y adjusted for half-leading = 12,000 * .2 * .5 = 1200. */
        assertEquals(718800, lineArea.crOriginY());
        /* ipd same as parent block. */
        assertEquals(468000, lineArea.crIpd());

        /* Test location and dimensions of the text area. The key thing we are
         * testing here is that IT IS CENTERED. */
        node = lineArea.getChildAt(0);
        assertTrue(node instanceof TextArea);
View Full Code Here

Examples of org.foray.area.LineArea.crIpd()

        /* x same as the parent block. */
        assertEquals(72000, lineArea.crOriginX());
        /* y adjusted for half-leading = 12,000 * .2 * .5 = 1200. */
        assertEquals(718800, lineArea.crOriginY());
        /* ipd same as parent block. */
        assertEquals(468000, lineArea.crIpd());

        /* Test location and dimensions of the text area. The key thing we are
         * testing here is that IT IS CENTERED. */
        node = lineArea.getChildAt(0);
        assertTrue(node instanceof TextArea);
View Full Code Here

Examples of org.foray.area.NormalBlockArea.crIpd()

        assertEquals(719500, blockArea.prOriginY());
        assertEquals(431000, blockArea.prIpd());

        assertEquals(72500, blockArea.crOriginX());
        assertEquals(719500, blockArea.crOriginY());
        assertEquals(431000, blockArea.crIpd());
    }

}
View Full Code Here

Examples of org.foray.area.NormalBlockArea.crIpd()

        assertEquals(72000, outerBlockArea.crOriginX());
        /* 10 inches from bottom (11 inches high, 1 inch top margin). */
        assertEquals(720000, outerBlockArea.crOriginY());
        /* Page is 8 inches wide, with 2 inches total margin.
         * 6 * 72,000 = 432,000. */
        assertEquals(432000, outerBlockArea.crIpd());

        /* The first child of the outer block area is a line-area. */
        node = outerBlockArea.getChildAt(0);
        assertTrue(node instanceof LineArea);
        LineArea lineArea = (LineArea) node;
View Full Code Here

Examples of org.foray.area.NormalBlockArea.crIpd()

        /* Computed as that for the previous line, adjusted for one line,
         * including another half-leading, the space-after for that line.
         * 718,800 - 12,000 - 1,200 = 705,600. */
        assertEquals(705600, insideBlockArea.crOriginY());
        /* Same as parent. */
        assertEquals(432000, insideBlockArea.crIpd());
        /* Height of 0, as it has no content. */
        assertEquals(0, insideBlockArea.crBpd());

        /* The third child of the outer block area is another line-area. */
        node = outerBlockArea.getChildAt(2);
View Full Code Here

Examples of org.foray.area.NormalBlockArea.crIpd()

        assertEquals(72000, blockArea.crOriginX());
        /* 10 inches from bottom (11 inches high, 1 inch top margin). */
        assertEquals(720000, blockArea.crOriginY());
        /* Page is 8.5 inches wide, with 2 inches total margin.
         * 6.5 * 72,000 = 468,000. */
        assertEquals(468000, blockArea.crIpd());

        /* Test location and dimensions of the line area. */
        node = blockArea.getChildAt(0);
        assertTrue(node instanceof LineArea);
        final LineArea lineArea = (LineArea) node;
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.