29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

2.4 Scaling and shifting<br />

When we draw a shape, METAPOST will adapt the bounding box accordingly. This means that a<br />

graphic has its natural dimensions, unless of course we adapt the bounding box manually. When<br />

you limit your graphic to a simple shape, say a rectangle, shifting it to some place can get obscured<br />

by this fact. Therefore, the following series of shapes appear to be the same.<br />

draw<br />

unitsquare xscaled 6cm yscaled 1.5cm<br />

withpen pencircle scaled 2mm withcolor .625red ;<br />

draw<br />

unitsquare shifted (.5,.5) xscaled 6cm yscaled 1.5cm<br />

withpen pencircle scaled 2mm withcolor .625red ;<br />

draw<br />

unitsquare shifted (-.5,-.5) xscaled 6cm yscaled 1.5cm<br />

withpen pencircle scaled 2mm withcolor .625red ;<br />

draw<br />

unitsquare xscaled 6cm yscaled 1.5cm shifted (1cm,1cm)<br />

withpen pencircle scaled 2mm withcolor .625red ;<br />

draw<br />

unitsquare xscaled 6cm yscaled 1.5cm shifted (1.5cm,1cm)<br />

withpen pencircle scaled 2mm withcolor .625red ;<br />

Scaling and shifting A few more details<br />

73

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

Saved successfully!

Ooh no, something went wrong!