#969: move color structs to colors.h?
------------------------------------------+---------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: task | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: RGBA_Color, G_str_to_color() | Platform: All
Cpu: All |
------------------------------------------+---------------------------------
Hi,
in trunk the RGBA_Color struct has been moved into include/raster.h. As
its use is more general than just raster maps (e.g. d.graph and D_symbol()
use it) IMO there's no reason for it to be there and it should be moved
into include/colors.h or back into gis.h.
Also, any objections to changing G_str_to_color() in trunk to use
`unsigned char` instead of `int` for R,G,B? It would save some casting.
#969: move color structs to colors.h?
------------------------------------------+---------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: task | Status: new
Priority: blocker | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: RGBA_Color, G_str_to_color() | Platform: All
Cpu: All |
------------------------------------------+---------------------------------
Comment(by martinl):
Replying to [comment:3 wenzeslaus]:
> Replying to [comment:2 neteler]:
> > Would this count as an API change? Then make it a blocker or change to
GRASS GIS 8 target.
>
> It is an API change.
>
> Should we also change `G_str_to_color()`? This would be a blocker too.
#969: move color structs to colors.h?
------------------------------------------+---------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: task | Status: new
Priority: blocker | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: RGBA_Color, G_str_to_color() | Platform: All
Cpu: All |
------------------------------------------+---------------------------------
Comment(by mmetz):
Replying to [comment:3 wenzeslaus]:
> Replying to [comment:2 neteler]:
> > Would this count as an API change? Then make it a blocker or change to
GRASS GIS 8 target.
>
> It is an API change.
RGBA_Color moved to include/display.h in r62002,3 (it is only used in
display functions).
>
> Should we also change `G_str_to_color()`? This would be a blocker too.
IMHO no, because there is no bug reported for `G_str_to_color()`, using
`unsigned char` instead of `int` means that a range check can no longer be
done, and changing `G_str_to_color()` implies changing
#969: move color structs to colors.h?
----------------------------------------------------+-----------------------
Reporter: hamish | Owner: grass-dev@…
Type: task | Status: new
Priority: blocker | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: needinfo, RGBA_Color, G_str_to_color() | Platform: All
Cpu: All |
----------------------------------------------------+-----------------------
Comment(by martinl):
Replying to [comment:5 mmetz]:
> > Should we also change `G_str_to_color()`? This would be a blocker too.
>
> IMHO no, because there is no bug reported for `G_str_to_color()`, using
`unsigned char` instead of `int` means that a range check can no longer be
done, and changing `G_str_to_color()` implies changing
it sounds like something for G8 and not G7 (we are in beta stage)...
#969: move color structs to colors.h?
----------------------------------------------------+-----------------------
Reporter: hamish | Owner: grass-dev@…
Type: task | Status: new
Priority: blocker | Milestone: 8.0.0
Component: Display | Version: svn-trunk
Keywords: needinfo, RGBA_Color, G_str_to_color() | Platform: All
Cpu: All |
----------------------------------------------------+-----------------------
Changes (by martinl):
* milestone: 7.0.0 => 8.0.0
Comment:
Replying to [comment:9 martinl]:
> Replying to [comment:5 mmetz]:
> > > Should we also change `G_str_to_color()`? This would be a blocker
too.
> >
> > IMHO no, because there is no bug reported for `G_str_to_color()`,
using `unsigned char` instead of `int` means that a range check can no
longer be done, and changing `G_str_to_color()` implies changing
>
> it sounds like something for G8 and not G7 (we are in beta stage)...
I took liberty to change milestone of this ticket...