Hi all,
reading my LÖVE reference ebook, I've found an example to draw a circle:
love.graphics.circle("fill", 200, 300, 50, 50)
"fill" means that the circle is full colored;
200 is the position X
300 is the position Y
50 is the length of the radius
and the 2nd "50" is the length of the segment.
What does it mean? If this is a circle, why there is the length of a segment?
Thank you
Drawing in LÖVE
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Drawing in LÖVE
It's not the length of the segment but the number of segments. The reason it's there is because you cannot render a perfect circle on a display that only draws squares/pixels.
So you tell it how many segments to draw so that it knows roughly how accurately the circle should be drawn. If you make the number very low the circle's edge will look a little blockier but rendering will be faster; if you make the number very high the circle will look extremely round even when it's very large or if you zoom in; but rendering will be slower.
For most purposes, the default value is perfectly fine.
So you tell it how many segments to draw so that it knows roughly how accurately the circle should be drawn. If you make the number very low the circle's edge will look a little blockier but rendering will be faster; if you make the number very high the circle will look extremely round even when it's very large or if you zoom in; but rendering will be slower.
For most purposes, the default value is perfectly fine.
Who is online
Users browsing this forum: Ahrefs [Bot], slime and 5 guests