Description
Description
Comment Actions
Requirements for the project
- Stroke with configurable vector lines:
- Should be able to draw a line with the following options:
- Antialiasing (?)
- Width measured in pixels, mm and inches
- Line style:
- Cap Style
- Join Style
- Miter Style
- Dash Style
- The color of the line should be the currently selected Foreground Color
- If the filling is "on", then the internals of the polygon should be filled with the currently selected Background Color (or chosen in the GUI like in polygon tool).
- Should be able to draw a line with the following options:
- Stroke selection with the currently selected brush preset
- The color of the line should be the currently selected Foreground Color
- If the filling is "on", then the internals of the polygon should be filled with the currently selected Background Color (or chosen in the GUI like in polygon tool).
- The user should be able to adjust where he wants to draw the line:
- exactly on selection
- outside the selection
- inside the selection
Plan of the iterations
- Outlining with the current brush
- Implement GUI for point 2.A and 2.B
- Implement the painting itself for 2.A and 2.B
- Give out to the users for testing
- Basic outlining with vector tools
- Implement GUI for 1.A.b, 1.B and 1.C
- Implement painting of the outlines with the available options
- Give out to the users for testing
- Advanced outlining with vector tools
- Implement GUI for 1.A.a and 1.A.c
- Implement painting of the outlines with the available options
- Give out to the users for testing
- Profit!!!
Recommendations
- Stroke with configurable vector lines:
- Should be able to draw a line with the following options:
- To draw with all these options just use KisPainter::drawPainterPath() and pass it QPen object with all the corresponding options configured.
- It would be nice if the painter calls would be wrapped into a StrokeStrategy to solve the threading issues. But that might be done after the initial draft implementation.
- GUI widget for configuring Cap, Join, Miter and Dash options can be found in KoStrokeConfigWidget
- Should be able to draw a line with the following options:
- Stroke selection with the currently selected brush preset
- KisToolPolyline::finishPolyline(), use KisFigurePaintingToolHelper class, which has all the filling options needed.
- The user should be able to adjust where he wants to draw the line:
- Use KisLsUtils::growSelectionUniform() on the copy of the current selection