mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Fixed line width after love.graphics.scale with negative numbers (resolves issue #808)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
|
||||
// LOVE
|
||||
#include "common/config.h"
|
||||
#include "common/math.h"
|
||||
#include "common/Vector.h"
|
||||
@@ -26,11 +27,15 @@
|
||||
#include "window/sdl/Window.h"
|
||||
#include "Polyline.h"
|
||||
|
||||
// C++
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
// C
|
||||
#include <cmath>
|
||||
|
||||
namespace love
|
||||
{
|
||||
namespace graphics
|
||||
@@ -1028,7 +1033,7 @@ void Graphics::rotate(float r)
|
||||
void Graphics::scale(float x, float y)
|
||||
{
|
||||
glScalef(x, y, 1);
|
||||
pixel_size_stack.back() *= 2. / double(x + y);
|
||||
pixel_size_stack.back() *= 2. / (fabs(x) + fabs(y));
|
||||
}
|
||||
|
||||
void Graphics::translate(float x, float y)
|
||||
|
||||
Reference in New Issue
Block a user