diff --git a/es-core/src/components/ImageComponent.cpp b/es-core/src/components/ImageComponent.cpp index 01a178136..0cbd27d98 100644 --- a/es-core/src/components/ImageComponent.cpp +++ b/es-core/src/components/ImageComponent.cpp @@ -334,11 +334,13 @@ void ImageComponent::render(const glm::mat4& parentTrans) if (mTexture && mOpacity > 0.0f) { if (Settings::getInstance()->getBool("DebugImage")) { - glm::vec2 targetSizePos {(mTargetSize - mSize) * mOrigin * glm::vec2 {-1.0f}}; + glm::vec2 targetSizePos { + glm::round((mTargetSize - mSize) * mOrigin * glm::vec2 {-1.0f})}; mRenderer->drawRect(targetSizePos.x, targetSizePos.y, mTargetSize.x, mTargetSize.y, 0xFF000033, 0xFF000033); if (mClipRegion == glm::vec4 {0.0f, 0.0f, 0.0f, 0.0f}) - mRenderer->drawRect(0.0f, 0.0f, mSize.x, mSize.y, 0xFF000033, 0xFF000033); + mRenderer->drawRect(0.0f, 0.0f, std::round(mSize.x), std::round(mSize.y), + 0xFF000033, 0xFF000033); else mRenderer->drawRect(mClipRegion.x, mClipRegion.y, mClipRegion.z - mClipRegion.x, mClipRegion.w - mClipRegion.y, 0xFF000033, 0xFF000033);