Closed whereswaldon closed 2 years ago
I'm a little confused here, I am not sure if it relates to naming or purpose. It looks like RTL is always defined as "toward origin" - but in a RTL document the origin is in a different place, so it will be "from origin". So I guess the question is, does this need to take the context of the overall document, or does it need naming change where origin is more specifically top left?
I'm a little confused here, I am not sure if it relates to naming or purpose. It looks like RTL is always defined as "toward origin" - but in a RTL document the origin is in a different place, so it will be "from origin".
Well, following the context of #14, the origin of the (drawing) pen would change, but not the origin of the document.
I think the documentation of the constants FromOrigin
and TowardOrigin
are rather explicit in this regard.
@benoitkugler @andydotxyz Does this naming work for everyone?
@benoitkugler @andydotxyz Does this naming work for everyone?
I'm happy with it, thanks !
Sorry I missed this, was swamped with other things leading to the holiday. This is much clearer, though reading through it I wondered - should it be "Top" instead of "Upper"? That way it matches the TTB and LTR naming...
I think we have enough consensus on this to merge this version.
I think we have enough consensus on this to merge this version.
Personally I would have waited for @benoitkugler, though I was going to approve the current state anyhow.
I figured that the difference between "Upper" and "Top" was very slim, and an approval for "Upper" probably translated. If @benoitkugler prefers something else, I'm happy to have another PR change it.
This commit introduces a type that represents how a piece of text is read relative to the origin as well as a method to get the progression from any direction.
This information makes it easy to write algorithms that operate on text of only one progression, but across any axis.
Closes #14
Signed-off-by: Chris Waldon christopher.waldon.dev@gmail.com