diff --git a/src/pixmap.cxx b/src/pixmap.cxx index a143abc..409d29f 100644 --- a/src/pixmap.cxx +++ b/src/pixmap.cxx @@ -455,6 +455,16 @@ CPixmap::Cache (size_t channel, SDL_Surface * surface, Point totalDim) return true; } +SDL_Texture * +CPixmap::getTexture (size_t channel) +{ + auto it = this->m_SDLTextureInfo.find (channel); + if (it == this->m_SDLTextureInfo.end ()) + return nullptr; + + return it->second.texture; +} + // Modifie la r�gion de clipping. void diff --git a/src/pixmap.h b/src/pixmap.h index edf17d8..a20408b 100644 --- a/src/pixmap.h +++ b/src/pixmap.h @@ -69,8 +69,9 @@ public: Point iconDim, Mode mode = FIX, size_t chBackWide = CHNONE); bool Cache (size_t channel, const std::string & pFilename, Point totalDim); bool Cache (size_t channel, SDL_Surface * surface, Point totalDim); - void SetClipping (Rect clip); - Rect GetClipping (); + SDL_Texture * getTexture (size_t channel); + void SetClipping (Rect clip); + Rect GetClipping (); bool IsIconPixel (size_t channel, Sint32 rank, Point pos);