[cairo] line width question

Bill Spitzak spitzak at gmail.com
Wed Mar 21 08:28:58 PDT 2012


Do cairo_translate(cr, line_width/2, line_width/2)

On 03/21/2012 07:55 AM, Carlo wrote:
> Hi to all,
> I have a question about the line width in Cairo. As defined in the API
> manual, when I specify a line width : "The line width value specifies
> the diameter of a pen that is circular in user space". So when I draw a
> line with a width > 2, the start point P(x,y) is located in the middle
> of the line. For my application purpose, i want to set the start point
> of the line as the left edge corner, how can I do it? I can't figure a
> solution for my problem, the only way I thought is to draw the lines
> with cairo_rectangle, but I can't manage dashed line .
>
> thank you
> Carlo Ferraresi
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo



More information about the cairo mailing list