Weird rendering of "ellipse"

Bug #413687 reported by Dustin P. Woodroy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Krzysztof Kosinski

Bug Description

Open the attachment with Inkscape (made with 0.47-pre1 on Windows). You'll notice a diamond shape, which in fact is an ellips. When you zoom in closely, it becomes a more complex shape.

This is the SVG-source for the "ellipse":

<path
       sodipodi:type="arc"
       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:113850.515625px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
       id="path2815"
       sodipodi:cx="390"
       sodipodi:cy="496.64789"
       sodipodi:rx="187.14285"
       sodipodi:ry="187.14285"
       d="m 577.14285,496.64789 a 187.14285,187.14285 0 1 1 -374.2857,0 187.14285,187.14285 0 1 1 374.2857,0 z"
       transform="matrix(-0.00283254,0,0,0.00283254,401.1047,545.19396)" />

Tags: renderer
Revision history for this message
Dustin P. Woodroy (dustin.w) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

The path itself (d) is correct. The diamond is due to a huge stroke-width value (113850px!!!). If you set a "normal" value (let's say 1px), you get a real (very small) ellipse. Then if you remove the transform attribute, you get a normal size ellipse.
I think the SVG is somewhat weird, but rendered correctly by Inkscape (although I'm not sure for the shape of the stroke). What do you expected exactly?

Changed in inkscape:
status: New → Incomplete
tags: added: svg
Revision history for this message
Dustin P. Woodroy (dustin.w) wrote :

Point with this whole thing is: It WAS a 1px border. I made it smaller and smaller with "When scaling objects, scale the stroke width by the same proportion" turned OFF. At some point, the shape gets smaller than it's stroke. That's when Inkscape (just tested on 0.47-pre3) starts messing it up.

Changed in inkscape:
status: Incomplete → New
Revision history for this message
Alvin Penner (apenner) wrote :

I cannot produce this shape, could you provide steps to reproduce this behaviour?

I also cannot find the option "When scaling objects, scale the stroke width by the same proportion". Could you indicate where in the menu system this option is?

Revision history for this message
su_v (suv-lp) wrote :

> option "When scaling objects, scale the stroke width by the same proportion"
a) Select Tool Controls bar -> 4th icon from the right
b) Preferences > Transforms: [x] Scale stroke width

Revision history for this message
Alvin Penner (apenner) wrote :

yes, thanks, I finally found it. That particular option is not visible on my Tool Control Bar (because I use a 800*600 screen), but I found it in preferences. When I uncheck the Scale Stroke Width option, the behaviour is as expected. I start with an ellipse, of stroke width = 1. I scale it down significantly to about one twentieth of its original size to get the attached figure. The Fill and Stroke dialog reports that the stroke width is still 1, as expected.
- The XML editor reports a style that has : stroke-width:22.14285278
- It also reports a transform matrix which represents the compression and has a compression ratio of 0.0451613
- the product of these two numbers is 1.000000017253414 as it should be, meaning that the stroke width is still 1 as expected.

If I follow the same calculation on the file weird-ellipse then I get the prediction that the original stroke width on this ellipse must have been 113850.515625 * 0.00283254 = 322 pixels wide, which does not agree with the original report.

Anyways, I cannot reproduce this non-elliptical behaviour.

Revision history for this message
Alvin Penner (apenner) wrote :

could you provide steps to reproduce?

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Dustin P. Woodroy (dustin.w) wrote :

You have to scale it down, zoom in, scale it down some more, zoom in, ... (2 times more for me with your scaled ellipse)
At some point, while scaling, you'll notice the shape seems to get bigger instead of smaller. When you release the mouse, the result is a weird "ellipse" as in my first post.

Revision history for this message
jazzynico (jazzynico) wrote :

Here's how to reproduce the strange shape bug:

1. Draw a circle(r=20px).
2. Set the stroke width to 1000px and unzoom to 20%: the shape is now an octogon.
3. Unzoom to 5%: the shape is a square.

It also affects other shapes and paths, when the stroke width value is huge compared to the object size.
Reproduced on Windows XP, Inkscape 0.46, 0.47 and rev 9530.

Changed in inkscape:
importance: Undecided → Low
status: Incomplete → Confirmed
tags: added: renderer
removed: svg
Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced with the trunk, revision 10342. Apparently fixed thanks to the new cairo renderer.

There's still a strange issue with transformed ellipses, but it's already reported in Bug #805392 “Circle resizing do not preserve stroke width”.

Changed in inkscape:
milestone: none → 0.49
status: Confirmed → Fix Committed
Changed in inkscape:
assignee: nobody → Krzysztof Kosinski (tweenk)
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.