| 304 | } |
| 305 | |
| 306 | void BitmapCanvas::drawImage(const std::shared_ptr<Image>& image, const Point& pos) |
| 307 | { |
| 308 | auto& texture = imageTextures[image]; |
| 309 | if (!texture) |
| 310 | { |
| 311 | texture = createTexture(image->GetWidth(), image->GetHeight(), image->GetData(), image->GetFormat()); |
| 312 | } |
| 313 | Colorf color(1.0f, 1.0f, 1.0f); |
| 314 | drawTile(texture.get(), (float)((origin.x + pos.x) * uiscale), (float)((origin.y + pos.y) * uiscale), (float)(texture->Width * uiscale), (float)(texture->Height * uiscale), 0.0, 0.0, (float)texture->Width, (float)texture->Height, color); |
| 315 | } |
| 316 | |
| 317 | void BitmapCanvas::line(const Point& p0, const Point& p1, const Colorf& color) |
| 318 | { |