Back to index

kdeartwork  4.3.2
Public Member Functions | Public Attributes | Private Attributes
Symbol Class Reference

#include <firesaverwriter.h>

List of all members.

Public Member Functions

 Symbol (unsigned int textureNumber, float l, float t, float r, float b)
void renderSymbol ()

Public Attributes

float scale

Private Attributes

float v1 [2]
float v2 [2]
float v3 [2]
float v4 [2]
unsigned int texNum
float L
float T
float R
float B

Detailed Description

Definition at line 20 of file firesaverwriter.h.


Constructor & Destructor Documentation

Symbol::Symbol ( unsigned int  textureNumber,
float  l,
float  t,
float  r,
float  b 
) [inline]

Definition at line 23 of file firesaverwriter.h.

           : scale((r - l) / (b - t)), texNum(textureNumber), L(l), T(1-t), R(r), B(1-b)
       {
           v1[0] = -scale;  v1[1] =  1;
           v2[0] = -scale;  v2[1] = -1;
           v3[0] = scale;   v3[1] =  1;
           v4[0] = scale;   v4[1] = -1;
       }

Member Function Documentation

void Symbol::renderSymbol ( ) [inline]

Definition at line 34 of file firesaverwriter.h.

       {
           //draw the symbol and update "cursor"'s position
           glBindTexture( GL_TEXTURE_2D, texNum );
           glTranslatef( scale, 0, 0 );
           glBegin( GL_TRIANGLE_STRIP );
            glTexCoord2f( L, T );
            glVertex2fv( v1 );
            glTexCoord2f( L, B );
            glVertex2fv( v2 );
            glTexCoord2f( R, T );
            glVertex2fv( v3 );
            glTexCoord2f( R, B );
            glVertex2fv( v4 );
           glEnd();
           glTranslatef( scale, 0, 0 );
       }

Here is the caller graph for this function:


Member Data Documentation

float Symbol::B [private]

Definition at line 55 of file firesaverwriter.h.

float Symbol::L [private]

Definition at line 55 of file firesaverwriter.h.

float Symbol::R [private]

Definition at line 55 of file firesaverwriter.h.

Definition at line 32 of file firesaverwriter.h.

float Symbol::T [private]

Definition at line 55 of file firesaverwriter.h.

unsigned int Symbol::texNum [private]

Definition at line 54 of file firesaverwriter.h.

float Symbol::v1[2] [private]

Definition at line 53 of file firesaverwriter.h.

float Symbol::v2[2] [private]

Definition at line 53 of file firesaverwriter.h.

float Symbol::v3[2] [private]

Definition at line 53 of file firesaverwriter.h.

float Symbol::v4[2] [private]

Definition at line 53 of file firesaverwriter.h.


The documentation for this class was generated from the following file: