Fix issue 246: Add line antialiasing through 'overdraw'.

Points to consider:
- Make softness customizable (`halo' in Graphics::polyline()).
- Add overdraw at beginning and ending edge of the line.
This commit is contained in:
vrld
2011-12-25 19:05:04 +01:00
parent c707a4ca45
commit 247f57c10b
3 changed files with 139 additions and 60 deletions
+4 -4
View File
@@ -108,6 +108,7 @@ namespace opengl
Image::Filter currentImageFilter;
love::window::Window *currentWindow;
LineStyle lineStyle;
float lineWidth;
GLint matrixLimit;
GLint userMatrices;
@@ -440,11 +441,10 @@ namespace opengl
/**
* Draws a series of lines connecting the given vertices.
* @param coords Vertex components (x1, y1, x2, y2, etc.)
* @param count Number of coordinates in the array.
* @param looping Whether the line joins up with itself.
* @param coords Vertex components (x1, y1, ..., xn, yn). If x1,y1 == xn,yn the line will be drawn closed.
* @param count Number of items in the array, i.e. count = 2 * n
**/
void polyline(const float* coords, size_t count, bool looping = false);
void polyline(const float* coords, size_t count);
/**
* Draws a triangle using the three coordinates passed.