mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-15 11:46:56 +02:00
Fix rendering of minimap radar border
This commit is contained in:
parent
216ef2a943
commit
3bc31a2ea0
@ -155,14 +155,14 @@ void Canvas::drawLineDashed(const Point & from, const Point & dest, const ColorR
|
|||||||
|
|
||||||
void Canvas::drawBorder(const Rect & target, const ColorRGBA & color, int width)
|
void Canvas::drawBorder(const Rect & target, const ColorRGBA & color, int width)
|
||||||
{
|
{
|
||||||
Rect realTarget = (target + renderArea.topLeft()) * getScalingFactor();
|
Rect realTarget = target * getScalingFactor() + renderArea.topLeft();
|
||||||
|
|
||||||
CSDL_Ext::drawBorder(surface, realTarget.x, realTarget.y, realTarget.w, realTarget.h, CSDL_Ext::toSDL(color), width);
|
CSDL_Ext::drawBorder(surface, realTarget.x, realTarget.y, realTarget.w, realTarget.h, CSDL_Ext::toSDL(color), width);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Canvas::drawBorderDashed(const Rect & target, const ColorRGBA & color)
|
void Canvas::drawBorderDashed(const Rect & target, const ColorRGBA & color)
|
||||||
{
|
{
|
||||||
Rect realTarget = target + renderArea.topLeft();
|
Rect realTarget = target * getScalingFactor() + renderArea.topLeft();
|
||||||
|
|
||||||
CSDL_Ext::drawLineDashed(surface, realTarget.topLeft(), realTarget.topRight(), CSDL_Ext::toSDL(color));
|
CSDL_Ext::drawLineDashed(surface, realTarget.topLeft(), realTarget.topRight(), CSDL_Ext::toSDL(color));
|
||||||
CSDL_Ext::drawLineDashed(surface, realTarget.bottomLeft(), realTarget.bottomRight(), CSDL_Ext::toSDL(color));
|
CSDL_Ext::drawLineDashed(surface, realTarget.bottomLeft(), realTarget.bottomRight(), CSDL_Ext::toSDL(color));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user