Page 2 of 2
Re: oLv: Music-oriented GUI and OSC libraries
Posted: Thu Jul 28, 2022 10:00 pm
by GModal
ReFreezed wrote: ↑Thu Jul 28, 2022 9:42 pm
Is the centered text maybe drawn like this: love.graphics.print(text, x-textWidth/2, y)
If textWidth is odd you'll draw at non-integer coords, if x is an int.
Yes, I expect that's the issue. Thanks to both of you. I honestly didn't notice.
It seems an odd requirement, when most fonts are proportional and subsequent letters wouldn't align to integer boundaries..or would they in LÖVE???
So in 11.3, I can use math.floor() to fix it?
Re: oLv: Music-oriented GUI and OSC libraries
Posted: Thu Jul 28, 2022 10:01 pm
by GModal
BrotSagtMist wrote: ↑Thu Jul 28, 2022 9:53 pm
I tried
Code: Select all
local oldprint=love.graphics.print
love.graphics.print= function(text, x, y, r , sx, sy, ox, oy, kx, ky ) print(text,x,y) oldprint(text, math.floor(x),math.floor(y), r, sx, sy, ox, oy, kx, ky) end
And its gone, yea youre not using integers there. Rendering to floats will cause a blur.
Text on the knob is still blurry tho.
There it is (math.floor). Thanks!!!
Re: oLv: Music-oriented GUI and OSC libraries
Posted: Thu Jul 28, 2022 10:51 pm
by GModal
BrotSagtMist wrote: ↑Thu Jul 28, 2022 9:53 pm
Text on the knob is still blurry tho.
Using math.floor for the arguments of love.graphics.translate() in drawknob() fixes the knob text, too.
Cool.
Re: oLv: Music-oriented GUI and OSC libraries
Posted: Fri Jul 29, 2022 1:45 pm
by GModal
OK, pushed a fix to the repository for the text rendering issue. The new release is 0.1.2.
https://github.com/GModal/oLvgui
Many thanks to
BrotSagtMist and
ReFreezed for pointing out a fairly rookie error.
V0.1.2 also includes the
mkGui demo from the video. It does require pd2jack to operate, as well.
(it's here:
https://github.com/GModal/pd2jack)