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.

Fig. 7.48 Using the image matchbox to draw a frame around the imageGenerated output Option list for PDF_fit_image( )boxsize={60 60} position={center} fitmethod=meetmatchbox={name=kraxi borderwidth=4 offsetleft=-2 offsetright=2offsetbottom=-2 offsettop=2 linecap=round linejoin=roundstrokecolor {rgb 0.0 0.3 0.3}}Align text at an image. The following code fragment shows how to align vertical textat the right margin of an image. The image is proportionally fit into the supplied boxwith a fit method of meet. The actual coordinates of the fitbox are retrieved with PDF_info_matchbox( ) and a vertical text line is placed relative to the lower right (x2, y2) cornerof the fitbox. The border of the matchbox is stroked (see Figure 7.49).Cookbook A full code sample can be found in the Cookbook topic images/align_text_at_image./* use this option list to load and fit the image */String optlist = "boxsize={300 200} position={center} fitmethod=meet " +"matchbox={name=giantwing borderwidth=3 strokecolor={rgb 0.85 0.83 0.85}}";/* load and fit the image */.../* retrieve the coordinates of the lower right (second) matchbox corner */if ((int) p.info_matchbox("giantwing", 1, "exists") == 1){x1 = p.info_matchbox("giantwing", 1, "x2");y1 = p.info_matchbox("giantwing", 1, "y2");}/* start the text line at that corner with a small distance of 2 */p.fit_textline("Foto: Kraxi", x2+2, y2+2, "font=" + font + " fontsize=8 orientate=west");Fig. 7.49 Use the coordinates of the image matchbox to fit a text lineGenerated outputGeneration stepsFoto: Kraxi(x2, y2)Step 1: Fit image with matchboxStep 2: Retrieve matchbox info for coordinates (x2, y2)Step 3: Fit text line starting at retrieved coordinates (x2, y2) with optionorientate=west180 Chapter 7: Formatting Features

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

Saved successfully!

Ooh no, something went wrong!