mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Add to ShapeDynamic to kb_text_shape_procs.odin
This commit is contained in:
+11
@@ -149,3 +149,14 @@ PositionGlyph :: proc(Cursor: ^cursor, Glyph: ^glyph) -> (X, Y: i32) {
|
|||||||
kbts_PositionGlyph(Cursor, Glyph, &X, &Y)
|
kbts_PositionGlyph(Cursor, Glyph, &X, &Y)
|
||||||
return
|
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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user