[cairo] How to draw a Rect with red border

yinglcs2 at yahoo.com yinglcs2 at yahoo.com
Mon Jan 23 12:44:01 PST 2006


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 


More information about the cairo mailing list