mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
graphics: improve setScissor's handling of fractional DPI-scaled coordinates.
This commit is contained in:
@@ -72,6 +72,17 @@ struct Rect
|
||||
}
|
||||
};
|
||||
|
||||
struct FRect
|
||||
{
|
||||
float x, y;
|
||||
float w, h;
|
||||
|
||||
bool operator == (const FRect &rhs) const
|
||||
{
|
||||
return x == rhs.x && y == rhs.y && w == rhs.w && h == rhs.h;
|
||||
}
|
||||
};
|
||||
|
||||
inline int nextP2(int x)
|
||||
{
|
||||
x += (x == 0);
|
||||
|
||||
Reference in New Issue
Block a user