diff --git a/gfx/2d/Point.h b/gfx/2d/Point.h index fabed9dd71a4..3da9f2f32b87 100644 --- a/gfx/2d/Point.h +++ b/gfx/2d/Point.h @@ -59,7 +59,7 @@ struct Point : Point() : Super() {} Point(Float aX, Float aY) : Super(aX, aY) {} - Point(const IntPoint& point) : Super(point.x, point.y) {} + Point(const IntPoint& point) : Super(float(point.x), float(point.y)) {} }; struct IntSize : @@ -76,7 +76,8 @@ struct Size : Size() : Super() {} Size(Float aWidth, Float aHeight) : Super(aWidth, aHeight) {} - explicit Size(const IntSize& size) : Super(size.width, size.height) {} + explicit Size(const IntSize& size) : + Super(float(size.width), float(size.height)) {} }; } diff --git a/gfx/2d/Rect.h b/gfx/2d/Rect.h index 8e31d95ade20..4917f2f99bbf 100644 --- a/gfx/2d/Rect.h +++ b/gfx/2d/Rect.h @@ -81,7 +81,8 @@ struct Rect : Rect(Float _x, Float _y, Float _width, Float _height) : Super(_x, _y, _width, _height) {} explicit Rect(const IntRect& rect) : - Super(rect.x, rect.y, rect.width, rect.height) {} + Super(float(rect.x), float(rect.y), + float(rect.width), float(rect.height)) {} }; }