21.08.2013 Views

OpenOffice.org BASIC Guide - OpenOffice.org wiki

OpenOffice.org BASIC Guide - OpenOffice.org wiki

OpenOffice.org BASIC Guide - OpenOffice.org wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Structure of Drawings<br />

Page.add(PolyPolygonShape) ' Page.add must take place before the coordinates are set<br />

Square1(0).x = 5000<br />

Square1(1).x = 10000<br />

Square1(2).x = 10000<br />

Square1(3).x = 5000<br />

Square1(0).y = 5000<br />

Square1(1).y = 5000<br />

Square1(2).y = 10000<br />

Square1(3).y = 10000<br />

Square2(0).x = 6500<br />

Square2(1).x = 8500<br />

Square2(2).x = 8500<br />

Square2(3).x = 6500<br />

Square2(0).y = 6500<br />

Square2(1).y = 6500<br />

Square2(2).y = 8500<br />

Square2(3).y = 8500<br />

Square3(0).x = 6500<br />

Square3(1).x = 8500<br />

Square3(2).x = 8500<br />

Square3(3).x = 6500<br />

Square3(0).y = 9000<br />

Square3(1).y = 9000<br />

Square3(2).y = 9500<br />

Square3(3).y = 9500<br />

PolyPolygonShape.PolyPolygon = Array(Square1(), Square2(), Square3())<br />

With respect as to which areas are filled and which areas are holes, <strong>OpenOffice</strong>.<strong>org</strong> applies a simple rule: the edge<br />

of the outer shape is always the outer border of the polypolygon. The next line inwards is the inner border of the<br />

shape and marks the transition to the first hole. If there is another line inwards, it marks the transition to a filled<br />

area.<br />

Graphics<br />

The last of the drawing elements presented here are graphic objects that are based on the<br />

com.sun.star.drawing.GraphicObjectShape service. These can be used with any graphic within <strong>OpenOffice</strong>.<strong>org</strong><br />

whose appearance can be adapted using a whole range of properties.<br />

Graphic objects support two of the general formatting properties:<br />

Text properties<br />

com.sun.star.drawing.Text (with com.sun.star.style.CharacterProperties and<br />

com.sun.star.style.ParagraphProperties)<br />

Shadow properties<br />

com.sun.star.drawing.ShadowProperties<br />

Additional properties that are supported by graphic objects are:<br />

GraphicURL (String)<br />

URL of the graphic<br />

AdjustLuminance (Short)<br />

luminance of the colors, as a percentage (negative values are also permitted)<br />

AdjustContrast (Short)<br />

contrast as a percentage (negative values are also permitted)<br />

AdjustRed (Short)<br />

red value as a percentage (negative values are also permitted)<br />

AdjustGreen (Short)<br />

green value as a percentage (negative values are also permitted)<br />

124 <strong>OpenOffice</strong>.<strong>org</strong> 3.2 <strong>BASIC</strong> <strong>Guide</strong> · March 2010

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

Saved successfully!

Ooh no, something went wrong!