Search found 15 matches

by matthewburk
Wed Mar 17, 2010 8:27 am
Forum: General
Topic: Can I require "package.file" instead of "package/file.lua"?
Replies: 16
Views: 6626

Re: Can I require "package.file" instead of "package/file.lua"?

Please help, i am trying to make a package to use with love, but i have to add this package.path = '.\\?\\?.lua;' .. package.path or my require fails. This only fails when running from a .love file. Actually it seems my hack only works if i my .love file is in the same directory that its contents ar...
by matthewburk
Mon Mar 08, 2010 6:09 am
Forum: Support and Development
Topic: drawing rectangles in line mode gives unexpected results
Replies: 1
Views: 423

drawing rectangles in line mode gives unexpected results

I am running this on 0.6.2, the expected result is a white box with a 1 pixel wide red edge, and an inner green rectangle exactly 1 pixel from the edge of the with square on all sides. This is just an example to illustrate the problem with drawing in line mode. function love.load(arg) love.graphics....
by matthewburk
Sat Mar 06, 2010 3:37 am
Forum: Support and Development
Topic: Drawing fonts
Replies: 5
Views: 753

Re: Drawing fonts

Ok, i checked out the source, looks like its from the NEHE tutorial, which i also based my font drawing off of, for another project. Your text drawing is from the pens position, not lower left. Which means that text will draw below the y value, (and to the left of the x value for some fonts) passed ...
by matthewburk
Fri Mar 05, 2010 5:25 pm
Forum: Support and Development
Topic: Drawing fonts
Replies: 5
Views: 753

Re: Drawing fonts

That (x,y is the bottom-left location instead of top-left) is a known problem, and is fixed in the latest development version. As a drop-in fix, you can try this: do local prnt = love.graphics.print function love.graphics.print(text, x, y) prnt(text, x, y - love.graphics.getFont():getHeight(text)) ...
by matthewburk
Fri Mar 05, 2010 7:04 am
Forum: Support and Development
Topic: Drawing fonts
Replies: 5
Views: 753

Drawing fonts

Since this is my first time posting, let me just say I love love. Now down to business. When drawing a font with graphics.print() x and y seem aren't top left, but seem to be the pen origin, so all of my text is not where i want it exactly. I couldn't find any font metrics api so that i could compen...