class circle_shape :
?position:float * float -> ?scale:float * float -> ?rotation:float -> ?origin:float * float -> ?texture:#const_texture -> ?texture_rect:IntRect.t -> ?fill_color:Color.t -> ?outline_color:Color.t -> ?outline_thickness:float -> ?point_count:int -> ?radius:float -> unit ->
This class inherits all the functions of OcsfmlGraphics.transformable (position, rotation, scale, bounds, ...) as well as the functions of OcsfmlGraphics.shape (outline, color, texture, ...).
Since the graphics card can't draw perfect circles, we have to fake them with multiple triangles connected to each other. The "points count" property of sf::CircleShape defines how many of these triangles to use, and therefore defines the quality of the circle.
let circle = new circle_shape
~position:(10, 20) () in
The number of points can also be used for another purpose; with
small numbers you can create any regular polygon shape:
equilateral triangle, square, pentagon, hexagon, ...
method destroy :
method get_radius :
method set_radius :
float -> unit
method set_point_count :
int -> unit