Bug 48818 - Dashes lengths are not in user-space units anymore
Summary: Dashes lengths are not in user-space units anymore
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.0
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cairo-1.12
  Show dependency treegraph
 
Reported: 2012-04-17 04:57 UTC by Guillaume Ayoub
Modified: 2012-04-18 07:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Python script (288 bytes, text/plain)
2012-04-17 04:57 UTC, Guillaume Ayoub
Details
Output with cairo 1.10.0 (167 bytes, image/png)
2012-04-17 04:58 UTC, Guillaume Ayoub
Details
Output with cairo 1.10.0 (175 bytes, image/png)
2012-04-17 04:59 UTC, Guillaume Ayoub
Details
Output with cairo 1.12.0 (167 bytes, image/png)
2012-04-17 05:01 UTC, Guillaume Ayoub
Details

Description Guillaume Ayoub 2012-04-17 04:57:50 UTC
Created attachment 60164 [details]
Python script

According to the documentation, dashes lengths must be given in user-space units. This behavior was respected in the 1.10.x versions, but it's not in 1.12.0.

For example, scales are not applied anymore to these lengths (but, of course, they are applied on line widths, for example).

Here is a little example (in Python, but this bug is not related to pycairo at all). This example is run with cairo 1.10.0 (works) and 1.12.0 (doesn't work).

I think that this bug is introduced by the commit ba40686. I've tried to find a fix, but that's a little bit difficult for me :).
Comment 1 Guillaume Ayoub 2012-04-17 04:58:33 UTC
Created attachment 60165 [details]
Output with cairo 1.10.0
Comment 2 Guillaume Ayoub 2012-04-17 04:59:40 UTC
Created attachment 60166 [details]
Output with cairo 1.10.0
Comment 3 Guillaume Ayoub 2012-04-17 05:01:07 UTC
Created attachment 60167 [details]
Output with cairo 1.12.0
Comment 4 Chris Wilson 2012-04-17 05:12:44 UTC
Ok, I see what I overlooked when implementing the dashed rectilinear stroker. The general stroker computes the scaling of the pen and applies it to the dash pattern as it generates its segments.
Comment 5 Chris Wilson 2012-04-18 07:30:17 UTC
commit 70fc52cb80f21fff0ba960236f24b997692cce64
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Apr 18 15:24:41 2012 +0100

    stroke(boxes): Apply user scale factors to dash segments
    
    Fixes tests/rectilinear-dash-scale*
    
    Reported-by: Guillaume Ayoub <xovni@wanadoo.fr>
    Reported-by: Carlos Garcia Campos <carlosgc@gnome.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48818
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.