diff options
author | bptato <nincsnevem662@gmail.com> | 2022-01-19 18:12:02 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-01-19 18:21:33 +0100 |
commit | bcaaf4e6b68ce1245558bc41559116a7a3296904 (patch) | |
tree | c6d97036f0bd553802917e17a2baf86e67a27d43 /src/render | |
parent | 0c0aa01a19d5dfb86562650c200cdc8c4b216fa0 (diff) | |
download | chawan-bcaaf4e6b68ce1245558bc41559116a7a3296904.tar.gz |
Re-implement inline blocks
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/renderdocument.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim index 1b195be0..39183c52 100644 --- a/src/render/renderdocument.nim +++ b/src/render/renderdocument.nim @@ -128,8 +128,11 @@ proc renderBlockContext(grid: var FlexibleGrid, ctx: BlockContext, x, y: int) proc renderInlineContext(grid: var FlexibleGrid, ctx: InlineContext, x, y: int) = for row in ctx.rows: let x = x + row.relx - let y = y + row.rely + let y = y + row.rely + row.height for atom in row.atoms: + # This aligns atoms with the baseline. + # (other alignment types in progress) + let y = y - atom.height if atom of BlockContext: let ctx = BlockContext(atom) grid.renderBlockContext(ctx, x + ctx.relx, y) |