mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +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.
|
* 3. This notice may not be removed or altered from any source distribution.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
// LOVE
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "common/math.h"
|
#include "common/math.h"
|
||||||
#include "common/Vector.h"
|
#include "common/Vector.h"
|
||||||
@@ -26,11 +27,15 @@
|
|||||||
#include "window/sdl/Window.h"
|
#include "window/sdl/Window.h"
|
||||||
#include "Polyline.h"
|
#include "Polyline.h"
|
||||||
|
|
||||||
|
// C++
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
// C
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace love
|
namespace love
|
||||||
{
|
{
|
||||||
namespace graphics
|
namespace graphics
|
||||||
@@ -1028,7 +1033,7 @@ void Graphics::rotate(float r)
|
|||||||
void Graphics::scale(float x, float y)
|
void Graphics::scale(float x, float y)
|
||||||
{
|
{
|
||||||
glScalef(x, y, 1);
|
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)
|
void Graphics::translate(float x, float y)
|
||||||
|
|||||||
Reference in New Issue
Block a user