Eclipse SUMO - Simulation of Urban MObility
|
Global storage for textures; manages and draws them. More...
#include <GUITexturesHelper.h>
Static Public Member Functions | |
static GUIGlID | add (FXImage *i) |
Adds a texture to use. | |
static void | allowTextures (const bool val) |
switch texture drawing on and off | |
static void | clearTextures () |
clears loaded textures | |
static void | drawTexturedBox (int which, double size) |
Draws a named texture as a box with the given size. | |
static void | drawTexturedBox (int which, double sizeX1, double sizeY1, double sizeX2, double sizeY2) |
Draws a named texture as a rectangle with the given sizes. | |
static int | getMaxTextureSize () |
return maximum number of pixels in x and y direction | |
static int | getTextureID (const std::string &filename, const bool mirrorX=false) |
return texture id for the given filename (initialize on first use) | |
static bool | texturesAllowed () |
ask whether texture drawing is enabled | |
Static Private Attributes | |
static bool | myAllowTextures = true |
whether textures are drawn | |
static std::map< std::string, int > | myTextures |
mapping from image paths to decals (initialization on first use) | |
Global storage for textures; manages and draws them.
Definition at line 36 of file GUITexturesHelper.h.
|
static |
Adds a texture to use.
Definition at line 54 of file GUITexturesHelper.cpp.
Referenced by GUISUMOAbstractView::drawDecals(), GUITextureSubSys::getPOITexture(), GUITextureSubSys::getTexture(), and getTextureID().
|
inlinestatic |
switch texture drawing on and off
Definition at line 59 of file GUITexturesHelper.h.
References myAllowTextures.
Referenced by GUIDialog_AppSettings::onCmdOk(), and GUILoadThread::run().
|
static |
clears loaded textures
Definition at line 135 of file GUITexturesHelper.cpp.
References myTextures.
Referenced by GUIApplicationWindow::closeAllWindows(), GUITextureSubSys::resetTextures(), GNEPOI::setAttribute(), and GNEPoly::setAttribute().
|
static |
Draws a named texture as a box with the given size.
Definition at line 71 of file GUITexturesHelper.cpp.
References drawTexturedBox().
Referenced by GUIBasePersonHelper::drawAction_drawAsImage(), GUIContainer::drawAction_drawAsImage(), GNEContainer::drawAction_drawAsImage(), GUIBaseVehicleHelper::drawAction_drawVehicleAsImage(), GUISUMOAbstractView::drawDecals(), GNERouteProbe::drawGL(), GNEVaporizer::drawGL(), GNEStopPlan::drawGL(), GUIPointOfInterest::drawInnerPOI(), GNEAdditional::drawListedAdditional(), GNEViewNetHelper::LockIcon::drawLockIcon(), GNEAdditional::drawSquaredAdditional(), drawTexturedBox(), GNELane::drawTextures(), and GNEJunction::drawTLSIcon().
|
static |
Draws a named texture as a rectangle with the given sizes.
Definition at line 77 of file GUITexturesHelper.cpp.
References myAllowTextures.
|
static |
return maximum number of pixels in x and y direction
Definition at line 46 of file GUITexturesHelper.cpp.
Referenced by GUISUMOAbstractView::drawDecals(), and getTextureID().
|
static |
return texture id for the given filename (initialize on first use)
Definition at line 111 of file GUITexturesHelper.cpp.
References add(), GUIMainWindow::getInstance(), getMaxTextureSize(), MFXImageHelper::loadImage(), myTextures, MFXImageHelper::scalePower2(), and WRITE_ERROR.
Referenced by GUIBasePersonHelper::drawAction_drawAsImage(), GUIContainer::drawAction_drawAsImage(), GNEContainer::drawAction_drawAsImage(), GUIBaseVehicleHelper::drawAction_drawVehicleAsImage(), GUIPointOfInterest::drawInnerPOI(), GUIPolygon::drawInnerPolygon(), GNEPOI::isValid(), and GNEPoly::isValid().
|
inlinestatic |
ask whether texture drawing is enabled
Definition at line 64 of file GUITexturesHelper.h.
References myAllowTextures.
|
staticprivate |
whether textures are drawn
Definition at line 73 of file GUITexturesHelper.h.
Referenced by allowTextures(), drawTexturedBox(), and texturesAllowed().
|
staticprivate |
mapping from image paths to decals (initialization on first use)
Definition at line 70 of file GUITexturesHelper.h.
Referenced by clearTextures(), and getTextureID().