Today I'll most likely be fixing yesterday's bugs, getting the Flow layout completely functional with auto margins and stuff.
I started by adding support the box-sizing
property to Chimera
and NLayout.


Fixing the second bug "0"
and opacity to 24 when initially spawning the element.
Nightmares...
The first part of this log was written 29-01-2025. This part is written on the 5th of February...
After a week or even more, after rewriting the whole renderer... The error is
that the 0
char is not centered in the Display entity. It's
offset.
If I haven't already, I'll define the term "Empty Text Display Block",
it is a text display, with content "0"
, set to a scale of
x=5.714286 y=4.0
. This means that '0' (along with the 1 pixel of
padding the entity is given) is scaled up to the size of a single block. At
that scale, the origin point of the entity is offset from its actual visual
center by 0.0625
.
This offset from the center is what caused the first bug:
EMPTY_TD_BLOCK_SIZE_X = 1.0 / (0.025 * 7.0)
BLOCK_OFFSET_X = 0.0625
f(x) = (x / EMPTY_TD_BLOCK_SIZE_X) * BLOCK_OFFSET_X
Where x
is the current X-scale of the display entity.