00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef OSDL_UPRIGHT_RECTANGLE_GL_H_
00028 #define OSDL_UPRIGHT_RECTANGLE_GL_H_
00029
00030
00031
00032 #include "OSDLOpenGL.h"
00033 #include "OSDLPixel.h"
00034
00035 #include "Ceylan.h"
00036
00037
00038 #include <iostream>
00039 #include <string>
00040
00041
00042
00043 namespace Ceylan
00044 {
00045
00046
00047 namespace Maths
00048 {
00049
00050
00051 namespace Linear
00052 {
00053
00054
00055
00056 class Bipoint ;
00057
00058
00059 }
00060
00061 }
00062
00063
00064 }
00065
00066
00067
00068
00069 namespace OSDL
00070 {
00071
00072
00073 namespace Video
00074 {
00075
00076
00077
00078
00079 class Surface ;
00080
00081
00082
00083 namespace TwoDimensional
00084 {
00085
00086
00087
00088
00106 class OSDL_DLL UprightRectangleGL :
00107 public Ceylan::TextDisplayable
00108 {
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118 public:
00119
00120
00122 UprightRectangleGL(
00123 const Ceylan::Maths::Linear::Bipoint & upperLeftCorner,
00124 const Ceylan::Maths::Linear::Bipoint & lowerRightCorner
00125 ) ;
00126
00127
00128
00134 UprightRectangleGL(
00135 const Ceylan::Maths::Linear::Bipoint & upperLeftCorner,
00136 OpenGL::GLLength width, OpenGL::GLLength height ) ;
00137
00138
00139
00145 UprightRectangleGL(
00146 OpenGL::GLCoordinate x, OpenGL::GLCoordinate y,
00147 OpenGL::GLLength width, OpenGL::GLLength height ) ;
00148
00149
00150
00152 virtual ~UprightRectangleGL() throw() ;
00153
00154
00155
00157 virtual Ceylan::Maths::Linear::Bipoint
00158 getUpperLeftCorner() const ;
00159
00160
00161
00167 virtual void setUpperLeftCorner(
00168 Ceylan::Maths::Linear::Bipoint & newUpperLeftCorner ) ;
00169
00170
00171
00173 virtual OpenGL::GLCoordinate getUpperLeftAbscissa() const ;
00174
00175
00177 virtual OpenGL::GLCoordinate getUpperLeftOrdinate() const ;
00178
00179
00180
00181
00183 virtual OpenGL::GLLength getWidth() const ;
00184
00185
00187 virtual void setWidth( OpenGL::GLLength newWidth ) ;
00188
00189
00190
00191
00193 virtual OpenGL::GLLength getHeight() const ;
00194
00195
00197 virtual void setHeight( OpenGL::GLLength newHeight ) ;
00198
00199
00200
00205 virtual bool draw() const ;
00206
00207
00208
00221 virtual const std::string toString(
00222 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00223
00224
00225
00226
00227 protected:
00228
00229
00230
00232 OpenGL::GLCoordinate _x ;
00233
00234
00235
00237 OpenGL::GLCoordinate _y ;
00238
00239
00240
00241
00243 OpenGL::GLLength _width ;
00244
00245
00246
00248 OpenGL::GLLength _height ;
00249
00250
00251
00252
00253 private:
00254
00255
00256
00265 explicit UprightRectangleGL(
00266 const UprightRectangleGL & source ) ;
00267
00268
00277 UprightRectangleGL & operator = (
00278 const UprightRectangleGL & source ) ;
00279
00280
00281 } ;
00282
00283
00284 }
00285
00286 }
00287
00288 }
00289
00290
00291
00293 OSDL_DLL std::ostream & operator << ( std::ostream & os,
00294 OSDL::Video::TwoDimensional::UprightRectangleGL & rect ) ;
00295
00296
00297
00298 #endif // OSDL_UPRIGHT_RECTANGLE_GL_H_
00299