Proofing docs more

This commit is contained in:
2025-01-27 17:33:57 -05:00
parent f145281b6a
commit d6da8ee84e
4 changed files with 14 additions and 6 deletions

View File

@@ -62,7 +62,7 @@ There a total of six procedures, 3 for shapes, 3 for text:
* `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 normalized space procedures are the `baseline` interface draw procedures. They expect 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.
@@ -105,9 +105,13 @@ Provides a Vec2 the width and height occupied by the provided text string. The y
A wrapper for `parser_get_font_vertical_metrics`. Will provide the ascent, descent, and line_gap for a font entry.
Stuff used by the draw list generation interface or just getters and setters.
## Miscellaneous
Stuff used by the draw list generation interface or just getters and setters.
### get_font_entry
Provides the backend Entry for for the given `Font_ID` (passed immutably). If the user desires a mutable reference, just resolve it manually.
### get_cursor_pos
@@ -136,6 +140,11 @@ Does nothing when zoom is 1.0
Uses `resolve_draw_px_size` to constrain which font size is used for the zoom.
### snap_normalized_position_to_view
Will snap the given position to the nearest pixel via ceil of the given view.
Does nothing if view is 1 or 0
### set_alpha_scalar
This is an artifact feature of the current shader, it *may* be removed in the future... Increasing the alpha of the colour draw with above 1.0 increases the edge contrast of the glyph shape.

View File

@@ -203,7 +203,7 @@ For `to_cached`:
### On Layering
The base draw list generation pippline provided by the library allows the user to batch whatever they want into a single "layer".
The base draw list generation pipeline provided by the library allows the user to batch whatever they want into a single "layer".
However, the user most likely would want take into consideration: font instances, font size, colors; these are things that may benefit from having shared locality during a layer batch. Overlaping text benefits from the user to handle the ordering via layers.
Layers (so far) are just a set of offssets tracked by the library's `Context.draw_layer` struct. When `flush_draw_list_layer` is called, the offsets are set to the current length of the draw list. This allows the rendering backend to retrieve the latest set of vertices, indices, and calls to render on a per-layer basis with: `get_draw_list_layer`.

View File

@@ -14,7 +14,7 @@ Its assumed the user has Odin installed and exposed to the OS enviornment's PATH
A custom version of the vendor:stb/truetype is maintained by this library:
* Added ability to set the stb_truetype allocator for STBTT_MALLOC and STBTT_FREE.
* Added ability to set the stb_truetype allocator for `STBTT_MALLOC` and `STBTT_FREE`.
* Changed procedure signatures to pass the font_info struct by immutable ptr (#by_ptr) when the C equivalent has their parameter as `const*`.
All other dependencies are cloned directly into a created thirdparty directory.
@@ -46,7 +46,6 @@ Will run `Launch-VsDevShell.ps1` for the user to populate the shell with its env
A few helper functions to utilize powerhsell & github repos as package management.
### odin_compiler_defs.ps1
Just variable declarations based on flags used with the odin compiler's CLI.

View File

@@ -1273,7 +1273,7 @@ set_snap_glyph_render_height :: #force_inline proc( ctx : ^Context, should_snap
ctx.glyph_buffer.snap_glyph_height = cast(f32) i32(should_snap)
}
//#endregion("misc")
//#endregion("miscellaneous")
//#region("scope stack")