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