Something went wrong. Try again.
art software for the rest of us
drawing paint image sdl art
Something went wrong. Try again.
C++
12345678910111213141516171819#include "Image.h"#include "../UserInterface/Primitives.h"
Image::Image(Texture* texture, double x, double y, double width, double height) :Rectangle(x, y, width, height), source(texture) {}
void Image::Render() { if (!source) { return; }
UI::Primitives::SubmitImage( source, UI::Rect(static_cast<float>(x), static_cast<float>(y), static_cast<float>(width), static_cast<float>(height)), UI::Color(static_cast<float>(r), static_cast<float>(g), static_cast<float>(b), static_cast<float>(a)) );}