Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122#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)), UI::Color(static_cast<float>(br), static_cast<float>(bg), static_cast<float>(bb), static_cast<float>(ba)), static_cast<float>(bw), static_cast<float>(roundness) );}