[cairo] How to draw a Rect with red border

Jonathon Jongsma jonathon.jongsma at gmail.com
Mon Jan 23 12:55:13 PST 2006


While the API documentation is a bit lacking on some of the more
advanced features, the basic features that you're asking about are
covered pretty well:
http://www.cairographics.org/manual/

void cairo_set_line_width(cairo_t *cr, double width);

On 1/23/06, yinglcs2 at yahoo.com <yinglcs2 at yahoo.com> wrote:
> Thanks.
>
> But how can I control the "thickness" of the stroke?
> I can't find an example of that in the cairo snippet
> page.
>
> Sam
>
>
> --- Boris Popov <boris at deepcovelabs.com> wrote:
>
> > yinglcs2 at yahoo.com wrote:
> > > How can I draw a Rect with red border?
> > >
> > > I know the function cairo_rectangle() to draw a
> > Rect,
> > > but how can I set the color to "red"?
> > >
> > >  cairo_rectangle(aSurf, 20, 20, 40, 40);
> > >
> >
> > That would be,
> >
> > cairo_rectangle(cr, 20, 20, 40, 40);
> > cairo_set_source_rgb (cr, 1, 0, 0);
> > cairo_stroke (cr);
> >
> > I would also suggest you take a look at the snippets
> > page, which I found
> > to be very useful when learning the basics of Cairo
> > a little while ago,
> >
> > http://cairographics.org/samples/snippets.html
> >
> > Cheers!
> >
> > -Boris
> >
> > --
> > +1.604.689.0322
> > DeepCove Labs Ltd.
> > 4th floor 595 Howe Street
> > Vancouver, Canada V6C 2T5
> >
> > boris at deepcovelabs.com
> >
> > CONFIDENTIALITY NOTICE
> >
> > This email is intended only for the persons named in
> > the message
> > header. Unless otherwise indicated, it contains
> > information that is
> > private and confidential. If you have received it in
> > error, please
> > notify the sender and delete the entire message
> > including any
> > attachments.
> >
> > Thank you.
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
>


More information about the cairo mailing list