From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: change colors in GtkAda (Linux/GNAT 3-13p-7)
Date: Fri, 23 Nov 2001 14:48:32 +0100
Date: 2001-11-23T14:48:32+01:00 [thread overview]
Message-ID: <3BFE53B0.2DBE4CA1@nbi.dk> (raw)
In-Reply-To: pP8L7.2696$Yn3.50706@news1.oke.nextra.no
Frank:
> I have a little problem in GtkAda. I am trying to set a color before drawing
> a polygon,
> by rewriting a snippet of code from a Gtk textbook based in C:-)
>
> However the polygons is drawed in black.
> Is anyone able to see from this snippet of code, if I have used some wrong
> approach somewhere?
[...]
> Gdk.Color.Set_Rgb(My_Color, Gushort(10000), Gushort(0), Gushort(0));
What range is allowed for the colour components. Have you
considered something like:
Gdk.Color.Set_Rgb(My_Color,
Gushort'Last, Gushort'First,
Gushort'First);
Assuming that "Gushort" is the type of the colour
components, this will most likely give you a pure bright
red.
Jacob
--
"Navier-Stokes-ligningen er som Biblen,
det er randbetingelserne der bestemmer det hele."
next prev parent reply other threads:[~2001-11-23 13:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-22 15:26 change colors in GtkAda (Linux/GNAT 3-13p-7) Frank
2001-11-22 15:57 ` Preben Randhol
2001-11-22 16:12 ` Frank
2001-11-23 13:48 ` Jacob Sparre Andersen [this message]
2001-11-23 14:31 ` Preben Randhol
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox