Skip to content

Commit

Permalink
Update the basic example in graphics.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
agraef committed Sep 23, 2024
1 parent fe4f9ed commit f421de1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/graphics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ function example:mouse_drag(x, y)
self:repaint()
end

function example:paint()
function example:paint(g)
-- Fill background with color
gfx.set_color(255, 0, 0, 1)
gfx.fill_all()
g:set_color(255, 0, 0, 1)
g:fill_all()

-- Draw an ellipse
gfx.set_color(0, 255, 0, 1)
gfx.fill_ellipse(self.circle_x, self.circle_y, 30, 30)
g:set_color(0, 255, 0, 1)
g:fill_ellipse(self.circle_x, self.circle_y, 30, 30)
end

0 comments on commit f421de1

Please sign in to comment.