more conversion operator to avoid extracting data methods

This commit is contained in:
arthur.jamet
2021-05-22 00:59:54 +02:00
parent f0c10aade6
commit 023890fd05
24 changed files with 54 additions and 45 deletions
+7 -1
View File
@@ -11,6 +11,7 @@
#include <raylib.h>
#include <string>
#include "Canvas.hpp"
#include "Texture.hpp"
#include "IRessource.hpp"
namespace RAY
@@ -25,6 +26,10 @@ namespace RAY
//! @param filename: path to file to load
Image(const std::string &filename);
//! @brief Create an image, using data from a texure
//! @param texture: texture to extract data from
Image(Texture &texture);
//! @brief A default copy constructor
Image(const Image &image) = default;
@@ -49,7 +54,8 @@ namespace RAY
bool unload() override;
//! @brief get image
::Image &getImage(void);
operator ::Image() const;
operator ::Image *();
//! @brief draw drawable
void draw(Drawables::ADrawable2D &);