diff options
| author | gingerBill <bill@gingerbill.org> | 2025-06-20 10:30:16 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2025-06-20 10:30:16 +0100 |
| commit | 676727114f124ce2e2f11a75357045e88b09cc7d (patch) | |
| tree | a7f3b9b0fc2ebd553ba9ad52eb588b453ea2821a | |
| parent | d25cd01b422c37e8f7ef20d86298c5699a9166a1 (diff) | |
Add to `ShapeDynamic` to kb_text_shape_procs.odin
| -rw-r--r-- | vendor/kb_text_shape/kb_text_shape_procs.odin | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/kb_text_shape/kb_text_shape_procs.odin b/vendor/kb_text_shape/kb_text_shape_procs.odin index 83c5a9d6f..991aaeab6 100644 --- a/vendor/kb_text_shape/kb_text_shape_procs.odin +++ b/vendor/kb_text_shape/kb_text_shape_procs.odin @@ -149,3 +149,14 @@ PositionGlyph :: proc(Cursor: ^cursor, Glyph: ^glyph) -> (X, Y: i32) { kbts_PositionGlyph(Cursor, Glyph, &X, &Y) return } + +@(require_results) +ShapeDynamic :: proc(State: ^shape_state, Config: ^shape_config, + MainDirection, RunDirection: direction, + Glyphs: ^[dynamic]glyph) -> c.int { + GlyphCount := u32(len(Glyphs^)) + GlyphCapacity := u32(cap(Glyphs^)) + Res := Shape(State, Config, MainDirection, RunDirection, raw_data(Glyphs^), &GlyphCount, GlyphCapacity) + resize(Glyphs, int(GlyphCount)) + return Res +}
\ No newline at end of file |