Pixel problem when moving drawings
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Pixel problem when moving drawings
Hey folks, this is a small graph app, you can drag graphs via left-button. When dragging something goes bad with pixels (look at the grid and graphs). I tried to set other Image Filter, but that doesn't seem to be helpful. Grid can be fixed with changing alpha(line 93) from 100 to 255, but I need that to be 100. Can you tell me how to fix that? Thanks!
- Attachments
-
- graph.love
- (6.38 KiB) Downloaded 75 times
Re: Pixel problem when moving drawings
Are you drawing at non-integer co-ordinates when the mouse button is held?
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Re: Pixel problem when moving drawings
Nope.Lafolie wrote:Are you drawing at non-integer co-ordinates when the mouse button is held?
Re: Pixel problem when moving drawings
If you don't know how to do that, just do something like this:
Code: Select all
love.graphics.draw( 'name', math.floor(name.x), math.floor(name.y))
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Pixel problem when moving drawings
Tried before. No result.davisdude wrote:If you don't know how to do that, just do something like this:
Code: Select all
love.graphics.draw( 'name', math.floor(name.x), math.floor(name.y))
Re: Pixel problem when moving drawings
It seems to be caused by
--EDIT
Sure... But without this it will add drawings to canvas, but I need it just to update canvas.
If I put this code in love.update(), it will always draw those wrong pixels. Is there a way to call these functions only if there was something changed from the last tick?
Code: Select all
boardField:clear()
timeField:clear()
Sure... But without this it will add drawings to canvas, but I need it just to update canvas.
If I put this code in love.update(), it will always draw those wrong pixels. Is there a way to call these functions only if there was something changed from the last tick?
Who is online
Users browsing this forum: DTmg and 4 guests