mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-04 03:15:59 -04:00
Add Surface::GetFormat(), analogus to Texture::GetFormat()
This commit is contained in:
parent
7b44685492
commit
c54a021d8e
@ -213,4 +213,8 @@ Point Surface::GetSize() const {
|
|||||||
return Point(surface_->w, surface_->h);
|
return Point(surface_->w, surface_->h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Uint32 Surface::GetFormat() const {
|
||||||
|
return surface_->format->format;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -540,6 +540,17 @@ public:
|
|||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Point GetSize() const;
|
Point GetSize() const;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
/// \brief Get texture format
|
||||||
|
///
|
||||||
|
/// \return Surface raw format
|
||||||
|
///
|
||||||
|
/// \see http://wiki.libsdl.org/SDL_Surface
|
||||||
|
/// \see http://wiki.libsdl.org/SDL_PixelFormatEnum
|
||||||
|
///
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
Uint32 GetFormat() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user