Re: Gnome Canvas
- From: "John R. Sheets" <dusk ravendusk org>
- To: gnome-devel-list gnome org
- Subject: Re: Gnome Canvas
- Date: Wed, 3 Nov 1999 08:36:25 -0600
On Nov 02, 1999, Matt Herbert <mherbert@bit-net.com> wrote:
>
> Also, does anybody know why whenever I draw an item
> on a canvas it always comes up black, when I tell
> it draw in different colors with "fill_color_rgba"?
> #include <gnome.h>
> int main(int argc, char *argv[])
> {
[...]
> canvas = gnome_canvas_new();
[...]
> gnome_canvas_item_new(
> gnome_canvas_root(GNOME_CANVAS(canvas)),
> gnome_canvas_rect_get_type(),
> "x1", 5.0,
> "y1", 5.0,
> "x2", 100.0,
> "y2", 50.0,
> "fill_color_rgba", 0xFF0000FF,
^^^^
> "outline_color", "blue",
> "width_units", 2.0,
> NULL);
The "regular" canvas you are creating with gnome_canvas_new() does not
support alpha channel/transparency. I'd have to check, but I'd imagine
that it's probably ignoring the "fill_color_rgba" attribute altogether.
Try creating the canvas with gnome_canvas_new_aa(). You could also drop
the "_rgba" from the attribute and use "fill_color" instead. The rect
wouldn't be transparent, of course, but it would at least notice the
color.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]