Search found 5 matches

by stingund
Tue May 04, 2021 8:29 am
Forum: Support and Development
Topic: Coordinates for lines vs points (and pixel grid alignment for points)
Replies: 20
Views: 19066

Re: Coordinates for lines vs points (and pixel grid alignment for points)

LÖVE's coordinate system is rooted in the upper-left corner of the screen, which is at location (0, 0) [...] the location (0, 0) aligns with the upper-left corner of the pixel as well, meaning that for some functions you may encounter off-by-one problems in the render output when drawing 1 pixel wi...
by stingund
Tue May 04, 2021 8:19 am
Forum: Support and Development
Topic: Coordinates for lines vs points (and pixel grid alignment for points)
Replies: 20
Views: 19066

Re: Coordinates for lines vs points (and pixel grid alignment for points)

In the end, it doesn't matter how the underlying hardware works. Oh yes, yes it does x). The best APIs are those that reflect how the hardware work, because they build knowledge of what exactly is going on physically. See what Gump said, he understood exactly what I meant. To be clear, this wasn't ...
by stingund
Mon May 03, 2021 12:43 am
Forum: Support and Development
Topic: Coordinates for lines vs points (and pixel grid alignment for points)
Replies: 20
Views: 19066

Re: Coordinates for lines vs points (and pixel grid alignment for points)

In the end, it doesn't matter how the underlying hardware works. The only thing which matters is the contract that the API offers. And for a 2D platform such as Love2D, specified pixel locations should *absolutely* be accurate because they should directly map to an underlying surface, for example an...
by stingund
Wed Apr 14, 2021 5:18 am
Forum: Support and Development
Topic: Coordinates for lines vs points (and pixel grid alignment for points)
Replies: 20
Views: 19066

Re: Coordinates for lines vs points (and pixel grid alignment for points)

Hello, What I pointed out is that I'm not getting the same behaviour for all primitives. If you look at the picture I posted, passing the same x coordinate to points() and line() does not result them in starting at the same horizontal pixel. In my example, I set the line drawing mode to "rough&...
by stingund
Tue Apr 13, 2021 7:23 am
Forum: Support and Development
Topic: Coordinates for lines vs points (and pixel grid alignment for points)
Replies: 20
Views: 19066

Coordinates for lines vs points (and pixel grid alignment for points)

While doing some tests, I noticed that if I drew lines and points with the same coordinates, I couldn't get them aligned. For example, calling: love.graphics.points(10, 1) love.graphics.line(10, 2, 15, 2) will result in the point being drawn one pixel before the line, as if it had been issued at (9,...