10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

20Kraxitext on top right of the boxbox 50 wide, 22 hightext at bottom center of the box20 Kraxi box 50 wide, 0 high3020Fig. 7.3 Positioning text in a boxPlacing text with orientation. Our next goal is to rotate text while placing its lowerleft corner (after the rotation) at the reference point. The following code fragment orientatesthe text to the west (90˚ counterclockwise) and then translates the lower leftcorner of the rotated text to the reference point (0, 0).p.fit_textline(text, 0, 0, "orientate=west");Figure 7.2 illustrates simple text placement with orientation.7.1.2 Positioning Text in a BoxIn order to position the text, an additional box with predefined width and height can beused, and the text can be positioned relative to this box. Figure 7.3 illustrates the generalbehaviour.Positioning text in the box. We define a rectangular box and place the text within thisbox on the top right. The following code fragment defines a box with a width of 50 unitsand a height of 22 units at reference point (30, 20). In Figure 7.4a, the text is placed on thetop right of the box.Similarly, we can place the text at the center of the bottom. This case is illustrated inFigure 7.4b.To achieve some distance between the text and the box we can add the margin option(see Figure 7.4c).Note that the blue box or line depicted for visualizing the box size in the figures isnot part of the actual output.Fig. 7.4 Placing text in a box subject to various positioning optionsGenerated output Option list for PDF_fit_textline( )Kraxia) boxsize={50 22} position={right top}b) boxsize={50 22} position={center bottom}Kraxic) boxsize={50 22} position={center bottom} margin={0 3}Kraxid) boxsize={50 0} position={center bottom}Kraxi134 Chapter 7: Formatting Features

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!