osgEarth 2.1.1
Public Member Functions | Private Member Functions | Private Attributes

agg::rendering_buffer Class Reference

#include <AGG.h>

List of all members.

Public Member Functions

 ~rendering_buffer ()
 rendering_buffer (unsigned char *buf, unsigned width, unsigned height, int stride)
void attach (unsigned char *buf, unsigned width, unsigned height, int stride)
const unsigned char * buf () const
unsigned width () const
unsigned height () const
int stride () const
bool inbox (int x, int y) const
unsigned abs_stride () const
unsigned char * row (unsigned y)
const unsigned char * row (unsigned y) const

Private Member Functions

 rendering_buffer (const rendering_buffer &)
const rendering_bufferoperator= (const rendering_buffer &)

Private Attributes

unsigned char * m_buf
unsigned char ** m_rows
unsigned m_width
unsigned m_height
int m_stride
unsigned m_max_height

Detailed Description

Definition at line 143 of file AGG.h.


Constructor & Destructor Documentation

agg::rendering_buffer::~rendering_buffer ( )

Definition at line 1272 of file AGG.h.

    {
        delete [] m_rows;
    }
agg::rendering_buffer::rendering_buffer ( unsigned char *  buf,
unsigned  width,
unsigned  height,
int  stride 
)

Definition at line 1279 of file AGG.h.

Here is the call graph for this function:

agg::rendering_buffer::rendering_buffer ( const rendering_buffer ) [private]

Member Function Documentation

unsigned agg::rendering_buffer::abs_stride ( ) const [inline]

Definition at line 171 of file AGG.h.

        { 
            return (m_stride < 0) ? unsigned(-m_stride) : unsigned(m_stride); 
        }
void agg::rendering_buffer::attach ( unsigned char *  buf,
unsigned  width,
unsigned  height,
int  stride 
)

Definition at line 1295 of file AGG.h.

    {
        m_buf = buf;
        m_width = width;
        m_height = height;
        m_stride = stride;
        if(height > m_max_height)
        {
            delete [] m_rows;
            m_rows = new unsigned char* [m_max_height = height];
        }

        unsigned char* row_ptr = m_buf;

        if(stride < 0)
        {
            row_ptr = m_buf - int(height - 1) * stride;
        }

        unsigned char** rows = m_rows;

        while(height--)
        {
            *rows++ = row_ptr;
            row_ptr += stride;
        }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

const unsigned char* agg::rendering_buffer::buf ( ) const [inline]

Definition at line 161 of file AGG.h.

{ return m_buf;    }

Here is the caller graph for this function:

unsigned agg::rendering_buffer::height ( ) const [inline]

Definition at line 163 of file AGG.h.

{ return m_height; }

Here is the caller graph for this function:

bool agg::rendering_buffer::inbox ( int  x,
int  y 
) const [inline]

Definition at line 166 of file AGG.h.

        {
            return x >= 0 && y >= 0 && x < int(m_width) && y < int(m_height);
        }

Here is the caller graph for this function:

const rendering_buffer& agg::rendering_buffer::operator= ( const rendering_buffer ) [private]
unsigned char* agg::rendering_buffer::row ( unsigned  y) [inline]

Definition at line 176 of file AGG.h.

{ return m_rows[y];  }

Here is the caller graph for this function:

const unsigned char* agg::rendering_buffer::row ( unsigned  y) const [inline]

Definition at line 177 of file AGG.h.

{ return m_rows[y]; }
int agg::rendering_buffer::stride ( ) const [inline]

Definition at line 164 of file AGG.h.

{ return m_stride; }

Here is the caller graph for this function:

unsigned agg::rendering_buffer::width ( ) const [inline]

Definition at line 162 of file AGG.h.

{ return m_width;  }

Here is the caller graph for this function:


Member Data Documentation

unsigned char* agg::rendering_buffer::m_buf [private]

Definition at line 184 of file AGG.h.

unsigned agg::rendering_buffer::m_height [private]

Definition at line 187 of file AGG.h.

Definition at line 189 of file AGG.h.

unsigned char** agg::rendering_buffer::m_rows [private]

Definition at line 185 of file AGG.h.

Definition at line 188 of file AGG.h.

unsigned agg::rendering_buffer::m_width [private]

Definition at line 186 of file AGG.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines