Closed letsfindaway closed 6 months ago
@sebojolais: Do you have a proposal how <border>
should be interpreted and specified so that we can correctly draw Seyes and other use cases? At least those already existing should be covered.
I think we need two different things:
border
, which limits the length of the lines and optionally draws a short orthogonal line connecting the lines of a line group.Is extend
a good name for it? And what should it measure? Number of lines to the left and right of the origin? Or something related to the page size like border
does? But - and this is also a question for border
, what does this mean for any line group with an angle of neither 0 nor 90?
Similar to the origin
, we also create borders relative to a corner of the document page. Remember, angles are measured counter-clockwise relative to a horizontal line. Then for the border at the start of the line:
Using an inverse of the distance
function we calculate a border line, orthogonal to the grid line and with the given distance from the reference point. For the border at the end of the line we use the opposite reference point.
For the extend, i.e. the amount of parallel repeating line groups, we can choose a similar approach. Also here we specify a maximum distance from the reference point.
Perhaps it is also useful to specify a rectangular clipping area. Only lines or parts of lines inside this rectangle are drawn. This would allow to limit even the isometric grid to some rectangular area. I would propose to specify this clipping area also relative to the document page.
To some extend this has the same effect as the Border
or Extend
, but specifically the Border
was meant to not only limit a line, but also draw the small connecting lines. And also the areas to the left and the top in Seyes (as shown in the Wikipedia image linked above) can not be created by clipping.
I'm also open for proposals for better names. Some ideas:
Hi, I am trying to understand your proposition.
My understanding is that the current Seyes issue should be managed by the new Extend
parameter. Is not it ?
The windows clipping
is also an good idea.
Hi, I am trying to understand your proposition.
Let me try to explain it more from a user perspective:
By default, the lines in a line group continue endless to the left and right. If they are repeating (i.e. have a spacing), then the stack of groups also continues endless upwards and downwards. However some background patterns need a limitation. This is not only true for horizontal lines, but also for any other angle.
border
element shall limit the length of a line. Because this is now the main purpose of that element, I want to rename it as stretch
. This element allows to define a start and / or end of a line, relative to some reference point.
Currently this only works if a line is horizontal, but this limiting is needed for any angle of a line.
Just as it is currently the case, an optional border line can be drawn connecting the lines in a line group.stack
element shall limit the stacking of lines. Instead of an endless stack, it can be specified that it ends at some point, again relative to some reference point. Also this feature shall work independent of the angle of the line group.My understanding is that the current Seyes issue should be managed by the new
Extend
parameter. Is not it ?
Yes, or better a combination of stretch
and stack
, as I would propose to call them. These two elements now make it possible to create patterns which resemble a piece of paper: it is not endless.
The
windows clipping
is also an good idea.
I'm thinking about use cases. Currently I see that it is necessary if we use lines which are neither horizontal nor vertical and want to create a rectangular area for such a pattern. For other pattern stretch
and stack
can also do the job.
With my latest push I modified the XML schema as indicated above. Also the definitions of the patters are updated. @sebojolais could you please check whether Seyes is now what you expect?
Thank you for your modifications. Now I am able to set up the Seyes background as I need it. Below is the arguments for the Seyes modifications:
With this PR #168 , I got something like this:
Thanks for this PR! Merged #168, closing this for now.
Background drawing issue ?
It seems there is an issue if we set a border for 90° lines. For the Seyes background, the vertical lines should start with the margin to the right direction and no vertical line at the left of the margin. (https://en.wikipedia.org/wiki/File:Page_blanche_A5_reglure_Seyes.svg) So I try to modify the XML accordingly. Have e look below:
I get some strange not really vertical lines:
Originally posted by @sebojolais in https://github.com/letsfindaway/OpenBoard/discussions/165#discussioncomment-8478706