[gtkada] Suggestion for revising example in gdk-color.ads

Bobby D. Bryant bdbryant at mail.utexas.edu
Fri Jan 19 03:23:07 CET 2001


FYI, gdk-color.ads has this:

   type Gdk_Color is
      record
         Pixel : Gulong;
         Red   : Gushort;
         Green : Gushort;
         Blue  : Gushort;
      end record;
   --  The fields are to be chosen between 0 and 65535, not 0 and 255!!!



...but it also has this at the bottom:

--  <example>
...
--     Set_Rbg (Color, 255, 255, 255);
...
--  </example>

When I first looked at the example I found it rather misleading, since
it is so common to see RGB colors spec'd out in the range 0..255.  I
think most people will look at this example and, like me, ass-u-me that
it is a way of generating white.

It might make a better example to use numbers that don't trigger a
reflexive interpretation among people who know just enough to be
dangerous.  It might also be worth repeating the earlier comment about
the ranges down in the example too.

Just a suggestion.

Bobby Bryant
Austin, Texas






More information about the gtkada mailing list