In my program, user can create a GoGroup with only a GoStroke in it, simplified sample which illustrate the problems:
GoGroup linegroup = new GoGroup();
GoStroke line = new GoStroke();
line.AddPoint(100, 10);
line.AddPoint(100, 100);
line.Style = GoStrokeStyle.Line;
linegroup.Add(line);
linegroup.Selectable = false;
doc.Add(linegroup);
So, the line can be moved, resized, etc… by the user everything work fine except 2 bugs which occurs when the line is perfectly vertical:
1- If user zoom in at maximum (or change the zoom a couple of time), the line become not selectable when user try to click on it (still selectable by dragging a rectangle around it).
The “DoSelect” in GoToolSelecting do not detect anything. If the line is not vertical, this strange behavior not occurs and the behavior is ok.
2-When saving this Gogroup and reloading with your xml class (GoXmlReaderWriterBase), vertical line was always reloaded with only a lentgh of 10 instead of the previously saved GoGroup size…again if the line is not vertical, the line correctly take the good size (one point at the top-left of the group and the other at the bottom-right).
In my sample, the line reload with this 2 point:
line.AddPoint(100, 10);
line.AddPoint(100, 20);
instead of
line.AddPoint(100, 10);
line.AddPoint(100, 100);
What can i do to avoid that?
I made many test if the line is 1 pixel width, everything works great.