[cairo-bugs] [Bug 25791] New: creation of a whole path with different parts

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 24 12:20:05 PST 2009


           Summary: creation of a whole path with different parts
           Product: cairo
           Version: 1.9.5
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: medium
         Component: general
        AssignedTo: cworth at cworth.org
        ReportedBy: volkerobhof at web.de
         QAContact: cairo-bugs at cairographics.org

Created an attachment (id=32287)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=32287)
my improvement how it could look like


I think it would be great to be possible to draw a whole path with different
style options.

Here is a sample how it is created normally (like in the "dash" sample of the
homepage http://www.cairographics.org/samples/dash/).

Well like you can see this code every line part has the same format.

Here is my improvement:
It should look like the sample image on the homepage but the first line from
position (128.0, 25.6) to (230.4, 230.4) should be drawn solid and from the
related line the dash should used but with the correct corners like in the

double dashes[] = {50.0,  /* ink */
                   10.0,  /* skip */
                   10.0,  /* ink */
                   10.0   /* skip*/
int    ndash  = sizeof (dashes)/sizeof(dashes[0]);
double offset = -50.0;

cairo_move_to (cr, 128.0, 25.6);
cairo_line_to (cr, 230.4, 230.4);

cairo_set_dash (cr, dashes, ndash, offset);
cairo_set_line_width (cr, 10.0);
cairo_rel_line_to (cr, -102.4, 0.0);
cairo_curve_to (cr, 51.2, 230.4, 51.2, 128.0, 128.0, 128.0);

cairo_stroke (cr);

Well you normally could draw a new path for the related line but then the
corners won't be correct like in the sample image.

Or would be also good to extend the line functions that in these a format like
a dash, line width, line color or something else can be set. 

So it could look like the picture I attached.

Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the cairo-bugs mailing list