Commit Graph

132 Commits

Author SHA1 Message Date
Alex Szpakowski bcee9a222b Made some float/int/unsigned char conversions explicit, fixed ParticleSystem:getColors, fixed love.mouse.isDown with x1 and x2 buttons 2013-09-26 00:36:50 -03:00
Alex Szpakowski 5de43a7207 The Vertex struct is now recognized as POD by C++, also fixed the name to be consistent with other love structs 2013-09-24 11:09:18 -03:00
Alex Szpakowski 91e4feeca0 Fixed justify AlignMode 2013-07-10 20:36:20 -03:00
Alex Szpakowski 8b261abfdc Slightly improved performance and cleaned up code a bit for love.graphics.print 2013-06-26 20:21:08 -03:00
Alex Szpakowski 76618f0328 Cleaned up font code to always use uint32 instead of the slightly more ambiguous "unsigned int" for codepoints 2013-06-16 19:48:53 -03:00
Alex Szpakowski d48d1fd441 Exposed the internal Rasterizer and GlyphData object methods to Lua. Also added Font:hasGlyph. 2013-06-16 07:36:18 -03:00
Alex Szpakowski 8b50dd499b Removed now-unnecessary optional filter parameters from love.graphics.newImageFont 2013-04-28 18:15:03 -07:00
Alex Szpakowski a5eaffe625 Disabled opengl debug output until it can be improved & made optional 2013-04-23 16:47:22 -07:00
vrld 71317c4359 Add Geometries (replaces Quads).
A Geometry is a collection of vertices describing a non self-intersecting
(simple) polygon. In addition to screen coordinates, the vertices have
attributes for texture coordinates (s,t) and color (r,g,b,a).

It can be used as a quad, to display distorted images, or anything in between.

Added:
^^^^^^

-- geometry from table, where table has the format:
-- info = {
-- {x,y, s,t, [r = 255, g = 255, b = 255, a = 255]}
-- {x,y, s,t, [r = 255, g = 255, b = 255, a = 255]}
-- ...
-- }
geom = love.graphics.newGeometry(info)

-- convenience wrapper for quads (same as before)
geom = love.graphics.newQuad(x,y, w,h, sw,sh)

-- retrieve vertex i (1-indexed)
x,y,s,t,r,g,b,a = geom:getVertex(i)

-- set vertex i (1-indexed)
geom:setVertex(i, x,y, s,t, [r,g,b,a])

-- flip geometry
geom:flip(x, y)


Renamed:
^^^^^^^^

love.graphics.drawq() -> love.graphics.drawg()


Removed:
^^^^^^^^

quad:setViewport()
quad:getViewport()
2013-04-21 18:53:13 +02:00
Alex Szpakowski 6fd3038405 Improved clarity/readability of internal OpenGL state shadowing functions 2013-04-17 01:06:33 -03:00
Alex Szpakowski d5aa807747 More internal code cleanup 2013-03-31 19:02:27 -03:00
Alex Szpakowski 3fcb2201bc Fixed love.graphics.newFont using the wrong texture format when creating its glyph texture 2013-03-24 23:43:36 -03:00
Alex Szpakowski 2009124cf9 Reworked internal anisotropic filtering code to be more concise and intuitive 2013-03-21 12:21:13 -03:00
Alex Szpakowski 25d6700361 Moved anisotropic filtering to Image:setFilter(min, mag, anisotropy), added anisotropic filtering support to canvases and fonts 2013-03-20 23:23:26 -03:00
Alex Szpakowski b8ec6633ab Fixed love.graphics.printf wrapping when the wrap limit is the same as the text width (issue #558) 2013-03-13 00:08:09 -03:00
Alex Szpakowski d9736ab3ab Removed mipmap support from Font graphics objects 2013-02-19 14:21:01 -04:00
Alex Szpakowski 23968d3b4a Fixed image mipmap creation on some systems with buggy video drivers 2013-02-17 11:36:17 -04:00
Alex Szpakowski 1945b7975d Cleaned up exception handling code when creating new fonts, spritebatches, and shaders 2013-02-14 21:49:11 -04:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Alex Szpakowski 022f549554 Use unsigned ints instead of unsigned shorts to represent UTF8 font glyphs 2013-01-22 23:43:35 -04:00
rude de8b4d91a5 Use GLint when getting GL_GENERATE_MIPMAP.
Using GLboolean caused a stack corruption according to VS2012.
2013-01-12 12:53:07 +01:00
Bart van Strien 32684b674e Add Font:getAscent/getDescent/getBaseline (issue #445) 2013-01-18 13:20:40 +01:00
Alexander Szpakowski 36c5259e12 Font objects now have mipmap filter and mipmap sharpness support 2013-01-07 16:31:48 -04:00
Alexander Szpakowski a6f4a3ab0f Removed names of unused parameters to quiet noisy compilers 2013-01-07 07:29:04 -04:00
Alexander Szpakowski e5388ff73b Removed more unnecessary tabs in blank lines 2013-01-07 07:11:40 -04:00
Alexander Szpakowski 1678252b7a Applied patch from issue #542 (texture filtering inconsistencies) in main LÖVE repository 2013-01-01 21:29:38 -04:00
Alexander Szpakowski a8dc813258 Text drawing performance improvements (issue #532) 2012-12-15 22:18:40 +01:00
vrld 6d02057864 Close issue #408: printf-justify alignment.
Add letter_spacing argument to Font::print(). Might be worth to expose to Lua
at some point. Justify alignment may result in mushy/blurred glyphs.
2012-07-08 13:37:09 +02:00
vrld 12f714bf74 Issue #419: Make font:getWidth(str) account for newlines. 2012-07-05 16:15:38 +02:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
vrld d4c59d3508 Fix issue #406: Empty glyphs cause some ATI cards to crash in Font::addGlyph(). 2012-04-03 13:55:12 +02:00
vrld 340ee8442d Fix issue #397: printf does not center string correctly. 2012-03-22 13:11:35 +01:00
Bart van Strien 2ac4a9e6d0 Manually keep track of bound textures, so we don't have to poll each frame
Patch submitted by slime73.
2012-01-10 15:36:18 +01:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Bill Meltsner 21516fc658 Add padding around every glyph in a Font texture, fixing the fringing seen with scaled text (actually fixes issue #321) 2012-01-08 20:59:52 -06:00
Bill Meltsner 4c5d11d582 Backout changeset e90d89c7b9712297c14ba73eda37ec28f25101f9 2012-01-08 20:14:27 -06:00
Bart van Strien 5fa0a4cfa3 Drastically improve the font scaling quality (issue #321)
Note that it isn't perfect yet, but a lot better.
2012-01-08 14:11:40 +01:00
Bart van Strien 864c800e10 Fix some warnings 2011-12-27 21:25:06 +01:00
Bart van Strien 0aae9684b3 Automated formatting fix 2011-11-16 11:32:41 +01:00
vrld 7a513e1434 Make love::Exception safe(r).
Now allows exceptions of arbitrary length.
Now allows catching a non-reference, i.e. catch(love::Exception e).
2011-11-12 21:11:41 +01:00
Bart van Strien 49ec65dbf3 Oops, didn't have a clean tree 2011-11-05 23:17:32 +01:00
Bart van Strien d8666202cd Improve compatibility check (I still can't believe robin was right) 2011-11-05 22:07:15 +01:00
Bart van Strien dc873c24f0 Some exception cleanup 2011-09-11 22:55:34 +02:00
Bart van Strien 96a5a3e402 Catch not just the generic utf8 exception, but a few specific ones as well (bug #244) 2011-09-11 12:51:34 +02:00
Bart van Strien 9199f1be5b Catch ALL the utf8 errors (bug #244) 2011-09-10 15:34:45 +02:00
Bart van Strien 6e630e8987 Fix width for getWrap and catch utf8 decoding errors in getWrap and getSize (issues #230 and #244) 2011-09-03 16:22:21 +02:00
Bart van Strien 190e11d016 Move wrapping to Font::getWrap and make printf use that (fixes issue #230) 2011-09-03 14:31:31 +02:00
Bart van Strien 0d174cfb81 Fix compiler warnings 2011-08-26 12:48:57 +02:00
vrld d420d68048 Add shear transformation and transform object (issue #152).
Add origin parameters to love.graphics.print.

New shear parameters kx,ky for:
- love.graphics.draw,
- love.graphics.drawq,
- love.graphics.print,
- SpriteBatch:add,
- SpriteBatch:addq.

Transform objects apply to:
- love.graphics.draw,
- love.graphics.drawq,
- love.graphics.print.
2011-07-05 14:33:34 +02:00