View Source Rayex.Shapes (Rayex v0.0.3)
Shapes related functions
Summary
Functions
Check if point is inside rectangle
Draw a line
Draw a pixel
Draw rectangle outline with extended parameters
Draw a color-filled rectangle
Draw a color-filled triangle (vertex in counter-clockwise order!)
Get collision info between ray and box
Set texture and rectangle to be used on shapes drawing
Functions
@spec check_collision_point_rec( Rayex.Structs.Vector2.t(), Rayex.Structs.Rectangle.t() ) :: boolean()
Check if point is inside rectangle
@spec draw_line(integer(), integer(), integer(), integer(), Rayex.Structs.Color.t()) :: :ok
Draw a line
@spec draw_pixel(integer(), integer(), Rayex.Structs.Color.t()) :: :ok
Draw a pixel
@spec draw_rectangle_lines_ex( Rayex.Structs.Rectangle.t(), integer(), Rayex.Structs.Color.t() ) :: :ok
Draw rectangle outline with extended parameters
@spec draw_rectangle_rec(Rayex.Structs.Rectangle.t(), Rayex.Structs.Color.t()) :: :ok
Draw a color-filled rectangle
@spec draw_triangle( Rayex.Structs.Vector2.t(), Rayex.Structs.Vector2.t(), Rayex.Structs.Vector2.t(), Rayex.Structs.Color.t() ) :: :ok
Draw a color-filled triangle (vertex in counter-clockwise order!)
@spec get_ray_collision_box(Rayex.Structs.Ray.t(), Rayex.Structs.BoundingBox.t()) :: Rayex.Structs.RayCollision.t()
Get collision info between ray and box
@spec set_shapes_texture(Rayex.Structs.Texture2D.t(), Rayex.Structs.Rectangle.t()) :: :ok
Set texture and rectangle to be used on shapes drawing