Răsfoiți Sursa

fix draw color

Laserlicht 1 an în urmă
părinte
comite
fd1f1001c5
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      client/render/Canvas.cpp

+ 2 - 2
client/render/Canvas.cpp

@@ -191,14 +191,14 @@ void Canvas::drawText(const Point & position, const EFonts & font, const ColorRG
 
 void Canvas::drawColor(const Rect & target, const ColorRGBA & color)
 {
-	Rect realTarget = (target + renderArea.topLeft()) * getScalingFactor();
+	Rect realTarget = target * getScalingFactor() + renderArea.topLeft();
 
 	CSDL_Ext::fillRect(surface, realTarget, CSDL_Ext::toSDL(color));
 }
 
 void Canvas::drawColorBlended(const Rect & target, const ColorRGBA & color)
 {
-	Rect realTarget = (target + renderArea.topLeft()) * getScalingFactor();
+	Rect realTarget = target * getScalingFactor() + renderArea.topLeft();
 
 	CSDL_Ext::fillRectBlended(surface, realTarget, CSDL_Ext::toSDL(color));
 }