[cairo] How to draw a Rect with red border
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:
void cairo_set_line_width(cairo_t *cr, double width);
On 1/23/06, yinglcs2 at yahoo.com <yinglcs2 at yahoo.com> wrote:
> But how can I control the "thickness" of the stroke?
> I can't find an example of that in the cairo snippet
> --- 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
> cairo mailing list
> cairo at cairographics.org
More information about the cairo