Class OcsfmlGraphics.rectangle_shape

class rectangle_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 -> ?size:float * float -> unit -> object .. end
Specialized shape representing a rectangle.

This class inherits all the functions of sf::Transformable (position, rotation, scale, bounds, ...) as well as the functions of sf::Shape (outline, color, texture, ...).

Usage example:

    let rectangle = new rectangle_shape 
    ~size:(100.,50.)
    ~outline_color:Color.red
    ~outline_thickness:5.
    ~position:(10., 20.) ()) in
    ...
    window#draw rectangle
    

Inherits
method destroy : unit
method get_size : float * float
Set the size of the rectangle.
method set_size : float * float
Get the size of the rectangle.
Returns Size of the rectangle.