- [NEW] getLocalX() i getLocalY(), per a obtindre les coordenades del ratolí en l'espai del viewport
This commit is contained in:
@@ -187,6 +187,16 @@ namespace draw
|
||||
viewport.h = destination->h;
|
||||
}
|
||||
|
||||
const int getLocalX(const int x)
|
||||
{
|
||||
return x - viewport.x;
|
||||
}
|
||||
|
||||
const int getLocalY(const int y)
|
||||
{
|
||||
return y - viewport.y;
|
||||
}
|
||||
|
||||
// Estableix la paleta del sistema carregant-la d'un GIF
|
||||
void loadPalette(const std::string &filename)
|
||||
{
|
||||
|
||||
@@ -61,6 +61,9 @@ namespace draw
|
||||
void setViewport(const int x, const int y, const int w, const int h);
|
||||
void resetViewport();
|
||||
|
||||
const int getLocalX(const int x);
|
||||
const int getLocalY(const int y);
|
||||
|
||||
/// @brief Estableix la paleta del sistema carregant-la d'un GIF
|
||||
/// @param filename nom de l'arxiu GIF d'on carregar la paleta
|
||||
void loadPalette(const std::string &filename);
|
||||
|
||||
Reference in New Issue
Block a user