View Source Exray.Shapes.Basic (Exray v0.6.0)
Draw pixels, lines and other basic geometry.
Summary
Functions
Draw a color-filled circle
Draw a gradient-filled circle
Draw circle outline
Draw circle outline (Vector version)
Draw a piece of a circle
Draw circle sector outline
Draw a color-filled circle (Vector version)
Draw ellipse outline
Draw line segment cubic-bezier in-out interpolation
Draw a line (using triangles/quads)
Draw lines sequence (using gl lines)
Draw a line (using gl lines)
Draw a pixel
Draw a pixel (Vector version)
Draw a regular polygon (Vector version)
Draw a polygon outline of n sides
Draw a polygon outline of n sides with extended parameters
Draw a color-filled rectangle
Draw a gradient-filled rectangle with custom vertex colors
Draw a horizontal-gradient-filled rectangle
Draw a vertical-gradient-filled rectangle
Draw rectangle outline
Draw rectangle outline with extended parameters
Draw a color-filled rectangle with pro parameters
Draw a color-filled rectangle
Draw rectangle with rounded edges
Draw rectangle with rounded edges outline
Draw a color-filled rectangle (Vector version)
Draw ring outline
Draw a color-filled triangle (vertex in counter-clockwise order!)
Draw a triangle fan defined by points (first vertex is the center)
Draw triangle outline (vertex in counter-clockwise order!)
Draw a triangle strip defined by points
Set texture and rectangle to be used on shapes drawing
Functions
@spec draw_circle( centerX :: integer(), centerY :: integer(), radius :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a color-filled circle
@spec draw_circle_gradient( centerX :: integer(), centerY :: integer(), radius :: float(), color1 :: Exray.Structs.Color.t(), color2 :: Exray.Structs.Color.t() ) :: :ok
Draw a gradient-filled circle
@spec draw_circle_lines( centerX :: integer(), centerY :: integer(), radius :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw circle outline
@spec draw_circle_lines_v( center :: Exray.Structs.Vector2.t(), radius :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw circle outline (Vector version)
draw_circle_sector(center, radius, start_angle, end_angle, segments, color)
View Source@spec draw_circle_sector( center :: Exray.Structs.Vector2.t(), radius :: float(), start_angle :: float(), end_angle :: float(), segments :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a piece of a circle
draw_circle_sector_lines(center, radius, start_angle, end_angle, segments, color)
View Source@spec draw_circle_sector_lines( center :: Exray.Structs.Vector2.t(), radius :: float(), start_angle :: float(), end_angle :: float(), segments :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw circle sector outline
@spec draw_circle_v( center :: Exray.Structs.Vector2.t(), radius :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a color-filled circle (Vector version)
@spec draw_ellipse( centerX :: integer(), centerY :: integer(), radiusH :: float(), radiusV :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw ellipse
@spec draw_ellipse_lines( centerX :: integer(), centerY :: integer(), radiusH :: float(), radiusV :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw ellipse outline
@spec draw_line( startPosX :: integer(), startPosY :: integer(), endPosX :: integer(), endPosY :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a line
@spec draw_line_bezier( startPos :: Exray.Structs.Vector2.t(), endPos :: Exray.Structs.Vector2.t(), thick :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw line segment cubic-bezier in-out interpolation
@spec draw_line_ex( startPos :: Exray.Structs.Vector2.t(), endPos :: Exray.Structs.Vector2.t(), thick :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a line (using triangles/quads)
@spec draw_line_strip( points :: [Exray.Structs.Vector2.t()], color :: Exray.Structs.Color.t() ) :: :ok
Draw lines sequence (using gl lines)
@spec draw_line_v( startPos :: Exray.Structs.Vector2.t(), endPos :: Exray.Structs.Vector2.t(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a line (using gl lines)
@spec draw_pixel( posX :: integer(), posY :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a pixel
@spec draw_pixel_v( position :: Exray.Structs.Vector2.t(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a pixel (Vector version)
@spec draw_poly( center :: Exray.Structs.Vector2.t(), sides :: integer(), radius :: float(), rotation :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a regular polygon (Vector version)
@spec draw_poly_lines( center :: Exray.Structs.Vector2.t(), sides :: integer(), radius :: float(), rotation :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a polygon outline of n sides
draw_poly_lines_ex(center, sides, radius, rotation, line_thick, color)
View Source@spec draw_poly_lines_ex( center :: Exray.Structs.Vector2.t(), sides :: integer(), radius :: float(), rotation :: float(), line_thick :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a polygon outline of n sides with extended parameters
@spec draw_rectangle( posX :: integer(), posY :: integer(), width :: integer(), height :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a color-filled rectangle
@spec draw_rectangle_gradient_ex( rec :: Exray.Structs.Rectangle.t(), col1 :: Exray.Structs.Color.t(), col2 :: Exray.Structs.Color.t(), col3 :: Exray.Structs.Color.t(), col4 :: Exray.Structs.Color.t() ) :: :ok
Draw a gradient-filled rectangle with custom vertex colors
draw_rectangle_gradient_h(posX, posY, width, height, color1, color2)
View Source@spec draw_rectangle_gradient_h( posX :: integer(), posY :: integer(), width :: integer(), height :: integer(), color1 :: Exray.Structs.Color.t(), color2 :: Exray.Structs.Color.t() ) :: :ok
Draw a horizontal-gradient-filled rectangle
draw_rectangle_gradient_v(posX, posY, width, height, color1, color2)
View Source@spec draw_rectangle_gradient_v( posX :: integer(), posY :: integer(), width :: integer(), height :: integer(), color1 :: Exray.Structs.Color.t(), color2 :: Exray.Structs.Color.t() ) :: :ok
Draw a vertical-gradient-filled rectangle
@spec draw_rectangle_lines( posX :: integer(), posY :: integer(), width :: integer(), height :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw rectangle outline
@spec draw_rectangle_lines_ex( rec :: Exray.Structs.Rectangle.t(), line_thick :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw rectangle outline with extended parameters
@spec draw_rectangle_pro( rec :: Exray.Structs.Rectangle.t(), origin :: Exray.Structs.Vector2.t(), rotation :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a color-filled rectangle with pro parameters
@spec draw_rectangle_rec( rec :: Exray.Structs.Rectangle.t(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a color-filled rectangle
@spec draw_rectangle_rounded( rec :: Exray.Structs.Rectangle.t(), roundness :: float(), segments :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw rectangle with rounded edges
draw_rectangle_rounded_lines(rec, roundness, segments, line_thick, color)
View Source@spec draw_rectangle_rounded_lines( rec :: Exray.Structs.Rectangle.t(), roundness :: float(), segments :: integer(), line_thick :: float(), color :: Exray.Structs.Color.t() ) :: :ok
Draw rectangle with rounded edges outline
@spec draw_rectangle_v( position :: Exray.Structs.Vector2.t(), size :: Exray.Structs.Vector2.t(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a color-filled rectangle (Vector version)
draw_ring(center, inner_radius, outer_radius, start_angle, end_angle, segments, color)
View Source@spec draw_ring( center :: Exray.Structs.Vector2, inner_radius :: float(), outer_radius :: float(), start_angle :: float(), end_angle :: float(), segments :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw ring
draw_ring_lines(center, inner_radius, outer_radius, start_angle, end_angle, segments, color)
View Source@spec draw_ring_lines( center :: Exray.Structs.Vector2.t(), inner_radius :: float(), outer_radius :: float(), start_angle :: float(), end_angle :: float(), segments :: integer(), color :: Exray.Structs.Color.t() ) :: :ok
Draw ring outline
@spec draw_triangle( v1 :: Exray.Structs.Vector2.t(), v2 :: Exray.Structs.Vector2.t(), v3 :: Exray.Structs.Vector2.t(), color :: Exray.Structs.Color.t() ) :: :ok
Draw a color-filled triangle (vertex in counter-clockwise order!)
@spec draw_triangle_fan( points :: [Exray.Structs.Vector2.t()], color :: Exray.Structs.Color.t() ) :: :ok
Draw a triangle fan defined by points (first vertex is the center)
@spec draw_triangle_lines( v1 :: Exray.Structs.Vector2.t(), v2 :: Exray.Structs.Vector2.t(), v3 :: Exray.Structs.Vector2.t(), color :: Exray.Structs.Color.t() ) :: :ok
Draw triangle outline (vertex in counter-clockwise order!)
@spec draw_triangle_strip( points :: [Exray.Structs.Vector2.t()], color :: Exray.Structs.Color.t() ) :: :ok
Draw a triangle strip defined by points
@spec set_shapes_texture( texture :: Exray.Structs.Texture.t(), source :: Exray.Structs.Rectangle.t() ) :: :ok
Set texture and rectangle to be used on shapes drawing