Re: how to deal wid colors.?
- From: Jacob Kroon <jacob kroon gmail com>
- To: Michael L Torrie <torriem chem byu edu>
- Cc: gtk-list gnome org
- Subject: Re: how to deal wid colors.?
- Date: Mon, 10 Apr 2006 17:32:56 +0200
And an even better way would be to use cairo instead of gdk for the
drawing operations, that is if you have gtk+ version >= 2.8. Use a
GdkPixmap, use cairo to draw onto it, and then follow the rest of
Michaels idea.
--Jacob
On Mon, 2006-04-10 at 09:06 -0600, Michael L Torrie wrote:
> On Mon, 2006-04-10 at 20:13 +0530, sahlot arvind wrote:
> > hello all
> > i want to draw four rectangles, i want to draw them in black color but
> > want to fill them wid different colors...so problem which i m facing
> > is that when i set foreground color to fill the rect then background
> > color is also getting set and i am unable to see boundaryy of rect in
> > black color rather that is in same color as of filled rect's forground
> > color...
> >
> > i have attached a file which contains drawing i want....
> > some body plz help me out in this regard..
>
> Seems to me you want to create a GdkPixmap backing store, draw to that
> with Gdk drawing primitives (arc, line, point, rectangle) with the
> proper colors and fill, then create a GtkDrawingArea widget. Set up the
> expose event to draw the GdkPixmap to the GtkDrawingArea's window.
>
> See http://www.gtk.org/tutorial/x2491.html and also see the source code
> to the Gtk example program, scribble.
>
> Michael
>
>
>
> > Thanks and Regards
> > _______________________________________________
> > gtk-list mailing list
> > gtk-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtk-list
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]