osgEarth 2.1.1
Functions | Variables

anonymous_namespace{DebugTileSource.cpp} Namespace Reference

Functions

void copySubImageAndColorize (const osg::Image *src, osg::Image *dst, unsigned dx, unsigned dy, osg::Vec4 &newColor)

Variables

static osg::Vec4 colors [4]

Function Documentation

void anonymous_namespace{DebugTileSource.cpp}::copySubImageAndColorize ( const osg::Image *  src,
osg::Image *  dst,
unsigned  dx,
unsigned  dy,
osg::Vec4 &  newColor 
)

Definition at line 50 of file DebugTileSource.cpp.

    {
        ImageUtils::PixelReader read(src);
        ImageUtils::PixelWriter write(dst);

        for( int src_t=0, dst_t=dy; src_t < src->t(); src_t++, dst_t++ )
        {
            for( int src_s=0, dst_s=dx; src_s < src->s(); src_s++, dst_s++ )
            {           
                osg::Vec4 color = read(src_s, src_t);
                if ( color.a() > 0.5f )
                    color = newColor;
                write( color, dst_s, dst_t );
            }
        }
    }

Here is the caller graph for this function:


Variable Documentation

osg::Vec4 anonymous_namespace{DebugTileSource.cpp}::colors[4] [static]
Initial value:
 {
        osg::Vec4(1,0,0,1),
        osg::Vec4(0,1,0,1),
        osg::Vec4(0,0,1,1),
        osg::Vec4(1,0,1,1)
    }

Definition at line 43 of file DebugTileSource.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines