[GRASS-dev] [GRASS GIS] #969: move color structs to colors.h?

GRASS GIS trac at osgeo.org
Tue Sep 16 13:13:24 PDT 2014


#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

 {{{
 display/d.barscale/draw_scale.c
 display/d.extract/main.c
 display/d.graph/do_graph.c
 display/d.graph/main.c
 display/d.grid/fiducial.c
 display/d.labels/color.c
 display/d.northarrow/draw_n_arrow.c
 display/d.path/main.c
 display/d.rast/display.c
 display/d.thematic.area/main.c
 display/d.thematic.area/plot1.c
 display/d.vect.chart/main.c
 display/d.vect/opt.c
 display/d.vect/shape.c
 general/g.cairocomp/main.c
 general/g.pnmcomp/main.c
 lib/cairodriver/Graph.c
 lib/display/tran_colr.c
 lib/imagery/iclass_signatures.c
 lib/imagery/iclass_statistics.c
 lib/nviz/nviz.c
 lib/ogsf/Gp3.c
 lib/ogsf/Gv3.c
 lib/pngdriver/Graph_set.c
 lib/raster/color_hist.c
 misc/m.nviz.image/main.c
 ps/ps.map/do_labels.c
 ps/ps.map/getgrid.c
 ps/ps.map/ps_outline.c
 ps/ps.map/ps_vareas.c
 ps/ps.map/ps_vlines.c
 ps/ps.map/ps_vpoints.c
 ps/ps.map/r_border.c
 ps/ps.map/r_colortable.c
 ps/ps.map/r_header.c
 ps/ps.map/r_info.c
 ps/ps.map/r_instructions.c
 ps/ps.map/r_plt.c
 ps/ps.map/r_text.c
 ps/ps.map/r_vareas.c
 ps/ps.map/r_vlegend.c
 ps/ps.map/r_vlines.c
 ps/ps.map/r_vpoints.c
 ps/ps.map/r_wind.c
 raster/r.out.png/main.c
 raster/r.out.tiff/main.c
 vector/v.colors/read_rgb.c
 vector/v.to.rast/support.c
 }}}

 Thus the benefit of changing a harmless type cast comes at a cost.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/969#comment:5>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list