OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: How to draw a primitive ellipse of kind 'arc'?

Hi all,

the element draw:ellipse (10.3.9) has the attribute draw:kind with values: full, section, cut and arc. In case of section, cut and arc the start angle and the end angle of the arc are given by the attributes draw:start-angle and draw:end-angle. It is allowed to determine the ellipse by position svg:x and svg:y, and size svg:width and svg:height. There are no special attributes for radii and center of the ellipse in this case. The attached file has such an ellipse on the first slide.

Problem: How is the curve scaled in respect to the size of the given svg:width and svg:height? I see different methods in Apache OpenOffice and Calligra Stage. It looks like both start with an unit circle and calculate a circle arc with Startpoint(cos(startangle)|-sin(startangle)) and Endpoint(cos(endangle)|-sin(endangle)). But then AOO uses a transformation that scales the unit circle to the given svg:width and svg:height including the arc as part of the ellipse. And Calligra seems to transform the resulted circle arc itself. The attached document has screenshots of the resulting rendering.
LibreOffice and PowerPoint render the arc the same way as AOO.

I was not able to say which method is correct using ODF1.2 specification. It comes down to the definition of svg:width and svg:height in (19.571.10 and 19.538.8) with the sentence "For drawing shapes that have a non rectangular shape, the length refers to the drawing shape's bounding box.". That is not really clear to me. What is 'shape' in case of the ellipse? Is it the ellipse itself or the arc? And what is the meaning of 'the length refers to'?

Kind regards

Attachment: primitive_ellipse_x_y_width_height.odp
Description: application/vnd.oasis.opendocument.presentation

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]