Changeset 5380 in orxonox.OLD for branches/2d-recalc/src/lib/graphics/render2D/element_2d.cc
- Timestamp:
- Oct 15, 2005, 1:49:17 AM (20 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.