Hi Jamie,

Changes look reasonable, now merged and checked into OSG svn/trunk.  I have
to fix a warning that g++ generated about different types on the ==
comparison but otherwise it looks fine.

Robert.

On 8 February 2015 at 18:07, jamie robertson <[email protected]>
wrote:

> Hi,
>
> I've been using osgSim::ScalarBar to display fixed range color values
> (e.g. red from 1-2, green from 3-4 etc), by setting the _numColors the same
> as the number of actual colors in the ColorRange.
>
> Currently if you do this you get strange looking results as the colors are
> calculated for values in the centre of each color step, so if your steps
> are large, the colors are interpolated sigificantly (see screen grab of
> red, green and blue colors for illustration).
>
> I've attached a fix which just uses the original color values whenever
> _numColors equals the number of actual defined colors in the ColorRange. I
> doubt anyone would want interpolated colors in these circumstances.
>
> Cheers,
> jamie
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=62645#62645
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/scalarbar_202.cpp
> http://forum.openscenegraph.org//files/scalarbar_exact_colors_191.png
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to