CANVAS:stroke circle

CANVAS:stroke_circle(x, y, radius, color)

Draw a stroked circle defined by the center position (x,y), with radius radius, and with the color color.

Parameters: x The x position of the center of the circle y The y position of the center of the circle radius The radius of the circle color An RGB color value as an integer value

-- Draw two stroked circles on the canvas with the color black
function Tires(name)
  local canvas = gre.get_canvas(name)
  local size = canvas:get_dimensions()
  local x = size.width / 2
  local y = size.height / 2
  local r = size.width / 9
  local dist = size.width / 2
  canvas:set_line_width(0.6 * r)
  canvas:stroke_circle(x + dist / 2, y, r, 0)
  canvas:stroke_circle(x - dist / 2, y, r, 0)
end
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.