Issue #1325 resolved

Foolproofing love.graphics.points

hahawoo
created an issue

So originally I thought this should work, i.e. point tables not in a surrounding table:

function love.draw()
    love.graphics.setPointSize(10)
    love.graphics.points({10, 10, 0, 1, 1}, {30, 10, 1, 0, 1})
end

But then I realized "wait, that makes a single table like love.graphics.points({10, 10, 0, 1, 1, 1}) ambiguous, because does it mean a single point at (10,10) with a color or (0,1,1,1), or three points at (10,10), (0,1) and (1,1)?

The above code actually did run though, and seemed to draw a point at (0,0).

So, maybe this function could be foolproofed for fools like me, maybe it could error if more than one table is given?

Comments (4)

  1. Log in to comment