• allegro5.a5_display
  • allegro5.a5_file
  • allegro5.a5_font
  • allegro5.a5_image
  • allegro5.a5_joystick
  • allegro5.a5_main
  • allegro5.a5_misc
  • allegro5.a5_opengl
  • allegro5.a5_shader
  • allegro5.a5_sound
  • allegro5.a5_thread
  • allegro5.a5_triangles
  • animation
  • array
  • atlas
  • buffer
  • color
  • common
  • csg.csg_aabb
  • csg.csg
  • csg.csg_octree
  • csg.csg_shapes
  • csg.csg_test
  • data
  • display
  • exception
  • file
  • font
  • glsl
  • grid
  • hash
  • image
  • image_op
  • index
  • ini
  • isometric
  • joystick
  • keyboard
  • land
  • layer
  • list
  • log
  • main
  • map
  • mem
  • mouse
  • net
  • noise
  • openglutil
  • perlin
  • pixelmask
  • plasma
  • pool
  • protobuf
  • queue
  • random
  • runner
  • shader
  • sound
  • sprite
  • thread
  • tilegrid
  • triangles
  • util2d
  • util3d
  • util
  • view
  • voronoi
  • widget.base
  • widget.board
  • widget.book
  • widget.box
  • widget.button
  • widget.checkbox
  • widget.container
  • widget.edit
  • widget.gul
  • widget.hbox
  • widget.layout
  • widget
  • widget.menu
  • widget.mover
  • widget.panel
  • widget.scrollbar
  • widget.scrolling
  • widget.sizer
  • widget.slider
  • widget.spin
  • widget.text
  • widget.theme
  • widget.vbox
  • widget.widget_list
  • yaml.external
  • yaml.internal
  • yaml
  • yaml.xml

land.font

LandFont

void

LandFontState

land_font_init

no parameters

land_font_exit

no parameters

land_font_active

no parameters

Returns: int

land_font_load

Parameters: char const * filename, float size

Returns: LandFont*

Load the given font file, with the given size. The size usually is the pixel height of a line in the font. But some fonts, e.g. bitmap fonts, will ignore it. The font also us made the current font if successfully loaded.

land_font_destroy

Parameters: LandFont * self

land_font_new

no parameters

Returns: LandFont*

land_font_scale

Parameters: LandFont * f, double scaling

land_font_yscale

Parameters: LandFont * f, double scaling

land_font_set

Parameters: LandFont * self

land_text_pos

Parameters: float x, float y

land_text_set_width

Parameters: float w

land_text_x_pos

no parameters

Returns: float

land_text_y_pos

no parameters

Returns: float

land_text_x

no parameters

Returns: float

land_text_y

no parameters

Returns: float

land_text_width

no parameters

Returns: float

land_text_height

no parameters

Returns: float

land_text_state

no parameters

Returns: int

land_font_height

Parameters: LandFont * self

Returns: float

land_font_current

no parameters

Returns: LandFont*

land_line_height

no parameters

Returns: float

land_text_off

no parameters

land_text_on

no parameters

land_paragraph_start

Parameters: float wrap_width

land_paragraph_end

no parameters

land_print_string

Parameters: char const * s, int newline, int alignment

land_font_set_print_override

Parameters: PrintFunc print_override

land_text_get_width

Parameters: char const * str

Returns: float

land_text_get_char_offset

Parameters: char const * str, int nth

Returns: int

land_text_get_char_index

Parameters: char const * str, int x

Returns: int

land_print

Parameters: char const * text, …

land_print_right

Parameters: char const * text, …

land_print_center

Parameters: char const * text, …

land_print_middle

Parameters: char const * text, …

land_write

Parameters: char const * text, …

land_write_right

Parameters: char const * text, …

land_write_center

Parameters: char const * text, …

land_write_middle

Parameters: char const * text, …

land_printv

Parameters: char const * text, va_list args

land_print_string_wordwrap

Parameters: char const * text, int w, int h, int alignment

Returns: int

Print text inside, and starts a new line whenever the text goes over the given width, wrapping at whitespace. If a single word is bigger than w, it will be printed in its own line and exceed w. If h is 0, the whole text is printed. Otherwise, only as many lines as fit into h pixels are printed. The return value is the offset into text in bytes of one past the last printed character.

land_print_wordwrap

Parameters: int w, int h, char const * text, …

Returns: int

land_print_wordwrap_right

Parameters: int w, int h, char const * text, …

Returns: int

land_print_wordwrap_center

Parameters: int w, int h, char const * text, …

Returns: int

land_wordwrap_text

Parameters: int w, int h, char const * str

Returns: LandArray*

Splits the given string into multiple lines no longer than w pixels. The returned array will have a newly allocated string for each line. You are responsible for freeing those strings again. The calculations will use the current font. Note that for large texts, this can take a while, so you should do calculations on demand and only for the visible text. You can call land_wordwrap_extents after this functions to get the dimensions of a box which will be able to hold all the text.

land_text_destroy_lines

Parameters: LandArray * lines

land_text_splitlines

Parameters: char const * str

Returns: LandArray*

Splits the text into lines, and updates the wordwrap extents.

land_wordwrap_extents

Parameters: float * w, float * h

land_print_colored_lines

Parameters: LandArray * lines, int alignment, LandHash * colors

Given an array of lines, print the visible ones.

land_set_line_color

Parameters: LandHash * colors, int i, str col

land_print_lines

Parameters: LandArray * lines, int alignment

land_font_from_image

Parameters: LandImage * image, int n_ranges, int * ranges

Returns: LandFont*

land_print_multiline

Parameters: char const * text, …


Generated: Thu 27 Feb 2020 10:49:37 PM EST