| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /********************************************************************** 00002 VRS - The Virtual Rendering System 00003 Copyright (C) 2001 Computer Graphics Systems Group at the 00004 Hasso-Plattner-Institute, Potsdam, Germany. 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 This library is distributed in the hope that it will be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 See the GNU Lesser General Public License for more details. 00013 You should have received a copy of the GNU Lesser+ General Public 00014 License along with this library; if not, write to the FreeSoftware 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA. 00016 **********************************************************************/ 00017 00018 00019 #ifndef __TEXTBOUNDEDSCALE_H__ 00020 #define __TEXTBOUNDEDSCALE_H__ 00021 00022 #include <vrs/transform.h> 00023 #include <vrs/camerainfo.h> 00024 #include <vrs/sg/canvas.h> 00025 00026 #include <vrs/text/vrs_textprerequisites.h> 00027 #include <vrs/text/texturetext.h> 00028 00030 namespace VRS 00031 { 00032 namespace TEXT 00033 { 00036 class VRS_CORE_API TextBoundedScale : public Transform 00037 { 00038 public: 00039 enum InterpolationMode { IM_NONE, IM_LINEAR, IM_CUBIC }; 00040 VRS_SERIALIZABLE_CLASS_ENUM(InterpolationMode); 00041 00047 TextBoundedScale( 00048 SO<TextureText> tt = NULL, 00049 float minimumScale = 0.125, 00050 float maximumScale = 2.0, 00051 InterpolationMode im = IM_CUBIC, 00052 float startDistance = 0.0, 00053 float endDistance = 500.0 00054 ); 00056 virtual ~TextBoundedScale(); 00057 00059 virtual const Matrix& matrix(Engine* engine = 0) const; 00060 00061 VRS_TYPEINFO( TextBoundedScale, Transform ); 00062 VRS_SERIALIZABLE( TextBoundedScale ); 00063 private: 00065 SO<TextureText> m_Text; 00066 00068 float m_MinimumScale; 00070 float m_MaximumScale; 00072 InterpolationMode m_InterpolationMode; 00073 00074 float m_StartDistance; 00075 00076 float m_EndDistance; 00077 00078 mutable Matrix m_Matrix; 00079 }; 00080 } 00081 } 00082 00083 #endif