VR-Vantage 1.4.1 API Class Documentation
DtGlyph.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2010 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvGraphics/vrvGraphics.h>
00013 #include <vrvGraphics/DtBoundingBox.h>
00014 
00015 namespace makVrv
00016 {
00017    
00021    class DT_DLL_VRVGRAPHICS DtGlyph
00022    {
00023    public:
00024 
00025       //Create a glyph with a user defined implementation.
00026       DtGlyph( const DtBoundingBox& bbox, DtPoint advance, int textureId, 
00027          DtPoint origin, DtPoint size, DtPoint uv[2]);
00028 
00029       // Destructor  
00030       ~DtGlyph();
00031 
00032       // Return the advance width for this glyph.
00033       float horizontalAdvance() const;
00034 
00035       // Return the bounding box for this glyph.
00036       const DtBoundingBox& boundingBox() const;
00037 
00039       inline bool renderable() const { return myTextureID != 0; }
00040 
00041       // The texture index that this glyph is contained in.
00042       int myTextureID;
00043 
00044       // Vector from the pen position to the topleft corner of the pixmap
00045       DtPoint myOrigin;
00046 
00047       // The size of the glyph 'image'
00048       DtPoint mySize;    
00049 
00050       // The texture co-ords of this glyph within the texture.
00051       DtPoint myUVs[2];
00052 
00053       // My advance
00054       DtPoint myAdvance;
00055 
00056       // My bounding box
00057       DtBoundingBox myBoundingBox;
00058    };
00059 }


Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)