Draws the segment of a circle around the location given, just like 'drawSegment'. This differs by allowing you to specify an inner radius, which is emptied out from inside the segment, when it is drawn. You can imagine it is like a wide outline of a circle.
drawInnerSegment( x, y, innerRadius, radius, startAngle, endAngle, isCentred = false )
The default function for drawing the inner segment. It is drawn around the 'x', 'y' location. 'radius' is the radius of the circle around that location, whilst the sector of the circle is drawn from 'startAngle' to 'endAngle'.
The width of the segment will be the 'radius' minus the 'innerRadius'.
Angles are in radians, and they are drawn clockwise.
* Draws spinning arcs.
baseAngle = 0
onEachFrame() do |delta|
fill( :pink )
baseAngle = baseAngle + delta/2
x = getScreenWidth()/2
y = getScreenHeight()/2
setColor( :white )
3.times() do |i|
angle = baseAngle + 120*i
endAngle = angle + 60
drawInnerSegment( x, y, 140, 180,
angle.toRadians(), endAngle.toRadians(), true )
drawInnerSegment( x, y, innerRadius, radius, startAngle, endAngle, xAlign, yAlign )
This is the same as the previous 'drawInnerSegment', but allows you to set how the segment is aligned across the x and y axis, when drawn.