In the latest commit I've fixed a mistake I did with the code to extend
bline from its end. (Thanks Zelgadis!). So it should work now.
I forgot to explain that it was coded that lower boundary cannot be never
equal to upper boundary because it would raise a division by zero or one
expception. Then I did code the needed to avoid create or modify those
values to be lower boundary greater or equal to upper boundary. Even if the
user modifies those values in the sif file, it won't load.
Also I have to mention too that the idea of the lower and upper individual
boundaries came from Zelgadis during one of our brainstorming sessions ^___^
El 24 de octubre de 2011 13:02, Carlos López González
> The support to create advanced outlines with the draw tool is fully
> implemented. Maybe it is needed to add one more option on the tool's option
> panel, but basically the feature is done.
> Here is a resumee of the situation:
> The Draw Tool options are now like this:
> -Create Outline
> -Create Advanced Outline (new)
> -Create Region
> -Auto Loop
> -Auto Extend
> -Auto Link
> -Auto Export
> -Pressure Width
> -Local Error
> -Min Pressure
> -Width Max Error (new)
> Create Advanced Outline checkbox: When unchecked, Pressure Width and Width
> Max Error are unsensitive, sensitive in contrary.
> Width Max Error: it is a 0.01 to 100.0 value that is used for compare to
> the squared root error of the widths achieved by the current calculated
> widthpoint list and the original list of widths given by the input device.
> The written number is divided by 100 before compare to the squared root
> error value. Since widths form input device goes from 0.0 (no pressure ) to
> 1.0 (max pressure) the square root máx error can't be greater than 1.0. One
> value that works fine is 0.01 and below, so I make the default value to 1.0
> (later is divided by 100). I considered that for the user would be confusing
> to write such so small values thinking on errors. This can be fine tuned
> When creating Advanced Outline Layer that doesn't extend one existing one,
> there is always at last two widthpoints on the new WPList. One at the start
> of the bline (at position 0.0) and one at the end of the bline (at position
> 1.0). That's like that because those two widthpoints are inserted on the
> calculated WPList regardless the squared error value. If those two
> widthpoints are enough to be below the maximum error allowed then no more
> are inserted.
> When extending a existing bline and AutoExtend is checked, there is not new
> layer created, but the blinepoints are inserted on the existing bline (like
> current behavior). When extending a bline that belongs to an Advanced
> Outline, it is detected and then it happens some things:
> 1) Blinepoints are inserted at start or end of the bline.
> 2) The widths from the original Advanced Outline are modified to be able to
> stay in place when the bline is enlarged (there are new blinepoints)
> 3) New widthpoints are inserted on the WPList of the Advanced Outline and
> they are modified to be on the correct place relative to the modified bline.
> To be able to make the widthpoints "stay in place" when the bline is
> modified, it has been added two sub parameters to each widthpoint:
> -Lower boundary ("lower_bound")
> -Upper boundary ("upper_bound")
> Those two real values are used to place the widthpoints on the bline.
> Initially the default values for those new parameters are:
> When the bline is modified, the boundaries of the existing widthpoints are
> modified to the correct values to keep the widthpoints on the same place
> relative to the unextended bline. Instead of modify the widthpoint position
> it was decided to modify the boundary of each widthpoint. This allows to
> extend existing advanced outlines with animated widthpoint positions with no
> trouble. (this has to be tested)
> Also, the inserted widthpoints are modified to be placed correctly on the
> inserted bline stroke.
> Those lower and upper boundaries are sub parameters of each Width Point
> (composite type). I've set to them special characterirtics:
> They cannot be exported
> They cannot be animated (by default itis forbidde the animation - static-
> and cannot be modified to be animatable)
> They cannot be converted to anything.
> This is like that because animate those boundaries would produce unexpected
> results for most of the users. Maybe in the future this behavior can be
> changed to be optionally modified by the user as one global prefernce.
> When extending a bline, the widths values of the existing widthpoint list
> is not modified. To avoid extend a bline and have abrupted changed in width
> due to the user doesn't match the width of the existing widthpoints when
> doing the stroke widht the stylus, The program eliminates the inserted width
> at the connection point, giving a smooth transition between the old and the
> inserted widths.