Changeset 5380 in orxonox.OLD for branches/2d-recalc/src/lib/graphics/render2D
- Timestamp:
- Oct 15, 2005, 1:49:17 AM (19 years ago)
- Location:
- branches/2d-recalc/src/lib/graphics/render2D
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2d-recalc/src/lib/graphics/render2D/element_2d.cc
r5378 r5380 221 221 else if (!strcmp(layer, "below-all")) 222 222 this->setLayer(E2D_BELOW_ALL); 223 } 224 225 226 void Element2D::setSize2Dpx(int x, int y) 227 { 228 this->setSize2D((float)(x)/(float)GraphicsEngine::getInstance()->getResolutionX(), (float)(y)/(float)GraphicsEngine::getInstance()->getResolutionY()); 229 } 230 231 232 void Element2D::setSizeX2Dpx(int x) 233 { 234 this->setSizeX2D((float)x/(float)GraphicsEngine::getInstance()->getResolutionX()); 235 } 236 237 238 void Element2D::setSizeY2Dpx(int y) 239 { 240 this->setSizeY2D((float)y/(float)GraphicsEngine::getInstance()->getResolutionY()); 241 } 242 243 int Element2D::getSizeX2Dpx() const 244 { 245 return (int)((float)this->getSizeX2D()*GraphicsEngine::getInstance()->getResolutionX()); 246 } 247 248 int Element2D::getSizeY2Dpx() const 249 { 250 return (int)((float)this->getSizeY2D()*GraphicsEngine::getInstance()->getResolutionY()); 223 251 } 224 252 -
branches/2d-recalc/src/lib/graphics/render2D/element_2d.h
r5378 r5380 100 100 101 101 inline void setSize2D(float x, float y) { this->sizeX = x, this->sizeY = y; }; 102 void setSize2Dpx(int x, int y); 102 103 inline void setSizeX2D(float x) { this->sizeX = x; }; 104 void setSizeX2Dpx(int x); 103 105 inline void setSizeY2D(float y) { this->sizeY = y; }; 106 void setSizeY2Dpx(int y); 104 107 inline float getSizeX2D() const { return this->sizeX; }; 108 int getSizeX2Dpx() const; 105 109 inline float getSizeY2D() const { return this->sizeY; }; 110 int getSizeY2Dpx() const; 106 111 107 112 // LIKE PNODE
Note: See TracChangeset
for help on using the changeset viewer.