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 169<br />

The following example creates a circular slice with a 70 degree angle (produced from<br />

difference between start angle of 20 degrees and end angle of 90 degrees)<br />

Lines<br />

Dim Doc As Object<br />

Dim Page As Object<br />

Dim EllipseShape As Object<br />

Dim Point As New com.sun.star.awt.Point<br />

Dim Size As New com.sun.star.awt.Size<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 />

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

EllipseShape.Size = Size<br />

EllipseShape.Position = Point<br />

EllipseShape.CircleStartAngle = 2000<br />

EllipseShape.CircleEndAngle = 9000<br />

EllipseShape.CircleKind = com.sun.star.drawing.CircleKind.SECTION<br />

Page.add(EllipseShape)<br />

<strong>OpenOffice</strong>.<strong>org</strong> provides the<br />

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

service for line objects. Line objects support all of the general formatting services with the<br />

exception of areas. The following are all of the properties that are associated with the<br />

LineShape service:<br />

Line properties<br />

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

Text properties<br />

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

(with<br />

com.sun.star.style.CharacterProperties<br />

and

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

Saved successfully!

Ooh no, something went wrong!