mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Merge branch 'main' into 12.0-development
This commit is contained in:
@@ -338,7 +338,7 @@ float Font::getKerning(uint32 leftglyph, uint32 rightglyph)
|
||||
if (it != kerning.end())
|
||||
return it->second;
|
||||
|
||||
float k = rasterizers[0]->getKerning(leftglyph, rightglyph) / dpiScale + 0.5f;
|
||||
float k = floorf(rasterizers[0]->getKerning(leftglyph, rightglyph) / dpiScale + 0.5f);
|
||||
|
||||
for (const auto &r : rasterizers)
|
||||
{
|
||||
|
||||
@@ -1480,7 +1480,7 @@ void Graphics::rectangle(DrawMode mode, float x, float y, float w, float h)
|
||||
|
||||
void Graphics::rectangle(DrawMode mode, float x, float y, float w, float h, float rx, float ry, int points)
|
||||
{
|
||||
if (rx == 0 || ry == 0)
|
||||
if (rx <= 0 || ry <= 0)
|
||||
{
|
||||
rectangle(mode, x, y, w, h);
|
||||
return;
|
||||
@@ -1539,7 +1539,8 @@ void Graphics::rectangle(DrawMode mode, float x, float y, float w, float h, floa
|
||||
|
||||
void Graphics::rectangle(DrawMode mode, float x, float y, float w, float h, float rx, float ry)
|
||||
{
|
||||
rectangle(mode, x, y, w, h, rx, ry, calculateEllipsePoints(rx, ry));
|
||||
int points = calculateEllipsePoints(std::min(rx, std::abs(w/2)), std::min(ry, std::abs(h/2)));
|
||||
rectangle(mode, x, y, w, h, rx, ry, points);
|
||||
}
|
||||
|
||||
void Graphics::circle(DrawMode mode, float x, float y, float radius, int points)
|
||||
|
||||
Reference in New Issue
Block a user