Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.6.2
-
None
-
Windows using Qt 4.6.2 SDK, building in QtCreator
Description
I am drawing a custom dashed line between two fixed points. On each update cycle I reduce the dash offset to simulate forward movement of the dashes. If I use the simple pattern in the QPen::setDashOffset() docentation where the stroke is 4 and the gap is 2, iI am finding that:
1. If the dash offset is equal to the dash pattern (stroke + gap = 6), the program aborts. (UNEXPECTED)
2. For dash offsets less than the total dash pattern but greater than the stroke length (4 < offset < 6) the line begins stroking at a starting point outside my line coordinates (UNEXPECTED).
3. For a dash offset equal to my stroke length, the line begins and ends at my coordinates and begins with a full gap.. (OK)
4. For dash offsets less than my stroke length but .above zero, the line begins and ends at my coordinates and begins with a partial stroke. (OK)
5. For a dash offset of zero, the line begins and ends at my coordinates and begins with a full stroke. (OK)
6. For a dash offset between zero and negative stroke length, the line begins and ends at my coordinates and begins with a gap larger than max.. (UNEXPECTED)
7. For a dash offset between negative stroke length and negative pattern length, the line begins and ends at my coordinates and begins with a stroke larger than max.. (UNEXPECTED)
The source code is borrowed from QTBUG-9169 and modified. The graphic shows the output.