diff --git a/docs/Readme.md b/docs/Readme.md index 97797c1..c9954c4 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -51,6 +51,25 @@ Shape will NOT be cached by the library. Use this if you want to roll your own s ## Draw list generation +### draw_text procedures + +There a total of six procedures, 3 for shapes, 3 for text: + +* `draw_shape_normalized_space` +* `draw_shape_view_space` +* `draw_shape` +* `draw_text_normalized_space +* `draw_text_view_space` +* `draw_text` + +The normalized space procedures are the `baseline` interface draw procedures. They expec the position, and scale provided to operate with an unsigned normalized space where the bottom left is 0.0, 0.0 and the top right is 1.0, 1.0. + +The view space will normalize the position and scale for the user based on the provided view and zoom. The coordinate system is still unsigned just scaled to the view's size. + +The non-suffix named procedures use the scope stack to derive the position and scale the user provides a relative position and scale for the text that will be adjusted to the scope's view, position, scale, & zoom. + +See the comment above each of the procedures for diagrams. + ### get_draw_list Get the enqueded draw_list (vertices, indices, and draw call arrays) in its entirety. diff --git a/vefontcache/vefontcache.odin b/vefontcache/vefontcache.odin index 65d4d99..8c0257d 100644 --- a/vefontcache/vefontcache.odin +++ b/vefontcache/vefontcache.odin @@ -697,7 +697,7 @@ shape_text_uncached :: #force_inline proc( ctx : ^Context, font : Font_ID, px_si <-> scale : Scale the glyph beyond its default scaling from its px_size. */ @(optimization_mode="favor_size") -draw_text_shape_normalized_space :: #force_inline proc( ctx : ^Context, +draw_shape_normalized_space :: #force_inline proc( ctx : ^Context, colour : RGBAN, position : Vec2, scale : Vec2, @@ -823,7 +823,7 @@ draw_text_normalized_space :: proc( ctx : ^Context, zoom : Will affect the scale similar to how the zoom on a canvas would behave. */ // @(optimization_mode="favor_size") -draw_text_shape_view_space :: #force_inline proc( ctx : ^Context, +draw_shape_view_space :: #force_inline proc( ctx : ^Context, colour : RGBAN, view : Vec2, position : Vec2,