View Source Exray.Text.Drawing (Exray v0.6.0)

Draw text onto the window

Summary

Functions

@spec draw_fps(pos_x :: integer(), pos_y :: integer()) :: :ok

Draw current FPS

Link to this function

draw_text(text, pos_x, pos_y, font_size, color)

View Source
@spec draw_text(
  text :: binary(),
  pos_x :: integer(),
  pos_y :: integer(),
  font_size :: integer(),
  color :: Color.t()
) :: :ok

Draw text (using default font)

Link to this function

draw_text_codepoint(font, codepoint, position, font_size, tint)

View Source
@spec draw_text_codepoint(
  font :: Font.t(),
  codepoint :: integer(),
  position :: Vector2.t(),
  font_size :: float(),
  tint :: Color.t()
) :: :ok

Draw one character (codepoint)

Link to this function

draw_text_codepoints(font, codepoints, position, font_size, spacing, tint)

View Source
@spec draw_text_codepoints(
  font :: Font.t(),
  codepoints :: [integer()],
  position :: Vector2.t(),
  font_size :: float(),
  spacing :: float(),
  tint :: Color.t()
) :: :ok

Draw multiple character (codepoint)

Link to this function

draw_text_ex(font, text, position, font_size, spacing, tint)

View Source
@spec draw_text_ex(
  font :: Font.t(),
  text :: binary(),
  position :: Vector2.t(),
  font_size :: float(),
  spacing :: float(),
  tint :: Color.t()
) :: :ok

Draw text using font and additional parameters

Link to this function

draw_text_pro(font, text, position, origin, rotation, font_size, spacing, tint)

View Source
@spec draw_text_pro(
  font :: Font.t(),
  text :: binary(),
  position :: Vector2.t(),
  origin :: Vector2.t(),
  rotation :: float(),
  font_size :: float(),
  spacing :: float(),
  tint :: Color.t()
) :: :ok

Draw text using Font and pro parameters (rotation)