mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed a rounding issue for the ImageComponent debug overlay.
This commit is contained in:
parent
2a4d9d334d
commit
807cf7b057
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue