93 Image(
int width,
int height,
bool smooth_it = false);
138 explicit
Image(const std::filesystem::path& file_path,
bool smooth_it = false);
181 int GetHeight() const noexcept;
186 int GetNumberOfColors() const noexcept;
191 bool IsSmooth() const noexcept;
386 Color operator()(
int column,
int row) const;
456 Color& operator()(
int column,
int row);
678 std::shared_ptr<ImageImpl> impl{};
681 explicit Image(
const std::shared_ptr<ImageImpl>& impl);
685 friend void draw_image(
const Image& image,
double x,
double y,
double width,
double height) noexcept;
686 friend void draw_image(
const Image& image,
double x,
double y,
double width,
double height) noexcept;
687 friend void draw_image(
const Image& image,
double x,
double y,
double width,
double height,
int texel_x,
688 int texel_y) noexcept;
689 friend void draw_image(
const Image& image,
double x,
double y,
double width,
double height,
int texel_x,
690 int texel_y,
int texel_width,
int texel_height) noexcept;
Image class to store a 2D array of RGBA colors. Also manages an image on the Graphics Card.
friend void draw_image(const Image &image, double x, double y, double width, double height, int texel_x, int texel_y) noexcept
Draw a subsection of the image to the screen.
void SaveToFile(const std::filesystem::path &file_path, FileType file_type=FileType::PNG) const
Save the Image as an image file on disk.
FileType
Lists all of the supported image file formats.
int GetWidth() const noexcept
Return the width of the image.
friend void draw_image(const Image &image, double x, double y, double width, double height, int texel_x, int texel_y, int texel_width, int texel_height) noexcept
Draw a subsection of the image to the screen.
friend void draw_image(const Image &image, double x, double y, double width, double height) noexcept
Draw an entire image to the screen and resize it to a custom size.
friend void draw_image(const Image &image, double x, double y) noexcept
Draw an entire image to the screen.
static int MaxImageSize() noexcept
Get the maximum image size allowed.
friend Image end_drawing_to_image(bool smooth_texture)
End a session of drawing to an image.
Color is a color represented with four unsigned bytes.