mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Decrese core-line width when overdrawing to preserve original line width.
This commit is contained in:
@@ -859,6 +859,11 @@ namespace opengl
|
|||||||
float halfwidth = lineWidth/2.f;
|
float halfwidth = lineWidth/2.f;
|
||||||
float inv_hw = 1.f / halfwidth;
|
float inv_hw = 1.f / halfwidth;
|
||||||
|
|
||||||
|
// Overdraw changes visible line width. account for that.
|
||||||
|
// Value of 0.15 chosen empirically.
|
||||||
|
if (lineStyle == LINE_SMOOTH)
|
||||||
|
halfwidth -= .15f;
|
||||||
|
|
||||||
// get line vertex boundaries
|
// get line vertex boundaries
|
||||||
// if not looping, extend the line at the beginning, else use last point as `p'
|
// if not looping, extend the line at the beginning, else use last point as `p'
|
||||||
r = Vector(coords[0], coords[1]);
|
r = Vector(coords[0], coords[1]);
|
||||||
|
|||||||
Reference in New Issue
Block a user