21.08.2013 Views

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

The Structure of Drawings 157<br />

Point.x = 1000<br />

Point.y = 1000<br />

Size.Width = 10000<br />

Size.Height = 10000<br />

Doc = StarDesktop.CurrentComponent<br />

Page = Doc.drawPages(0)<br />

RectangleShape =<br />

Doc.createInstance("com.sun.star.drawing.RectangleShape")<br />

RectangleShape.Size = Size<br />

RectangleShape.Position = Point<br />

RectangleShape.FillStyle = com.sun.star.drawing.FillStyle.SOLID<br />

RectangleShape.FillColor = RGB(255,0,0)<br />

Page.add(RectangleShape)<br />

Color Gradient<br />

If you set the FillStyle property to GRADIENT, you can apply a color gradient to any fill<br />

area of a <strong>OpenOffice</strong>.<strong>org</strong> document.<br />

If you want to apply a predefined color gradient, you can assign the associated name of the<br />

FillTransparenceGradientName property. To define your own color gradient, you need to<br />

complete a<br />

com.sun.star.awt.Gradient<br />

structure to assign the FillGradient property. This property provides the following options:<br />

Style (Enum)<br />

type of gradient, for example, linear or radial (default values in accordance with<br />

com.sun.star.awt.GradientStyle<br />

)<br />

StartColor (Long)<br />

start color of color gradient<br />

EndColor (Long)<br />

end color of color gradient<br />

Angle (Short)<br />

angle of color gradient in tenths of a degree<br />

XOffset (Short)<br />

X-coordinate at which the color gradient starts, specified in hundredths of a millimeter<br />

YOffset (Short)

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

Saved successfully!

Ooh no, something went wrong!