Difference between revisions of "Rotating Canvas"
Jump to navigation
Jump to search
(→Steps) |
(→Steps) |
||
Line 21: | Line 21: | ||
** ✔Shift-Control-Scroll (matches Control-Scroll for zoom). | ** ✔Shift-Control-Scroll (matches Control-Scroll for zoom). | ||
** ✔Preference for rotation step size. | ** ✔Preference for rotation step size. | ||
− | ** | + | ** ✔On-screen editing tools using a class derived from SPCanvasItem. Use Ctrl-Middle Mouse to activate. |
** Fix problems (see below). | ** Fix problems (see below). | ||
Latest revision as of 06:16, 2 April 2017
Being able to rotate the canvas while working on a drawing is a highly desirable feature. Unfortunately, most of Inkscape's code assumes a non-rotating canvas.
Basic Strategy
The Inkscape SPDesktop class's Geom::Affine _w2d variable defines the Window to Desktop coordinate transformation (and _d2w defines the inverse). In 0.92.x _w2d is limited to scaling. Rotating the canvas can be added to this variable. It might also be possible to add translation (to handle scrolling) as well.
Steps
- Adapt current zooming code to work if _w2d includes a rotation.
- ✔New function: SPDesktop::set_display_area() that takes as input:
- The current transformation (_w2d).
- A point on the drawing and a point on the screen which are to be aligned.
- ✔All basic zooming functions can be handled as special cases of this new function.
- ✔Update/replace all instances of set_display_area() to use new version.
- Replace all instances of get_display_area() to handle rotated frame. Not needed?
- ✔New function: SPDesktop::set_display_area() that takes as input:
- ✔Add rotation functions that follows the zoom functions pattern.
- Add GUI to set rotation.
- ✔Desktop scroll widget.
- Menu items with keyboard shortcuts.(?)
- ✔Shift-Control-Scroll (matches Control-Scroll for zoom).
- ✔Preference for rotation step size.
- ✔On-screen editing tools using a class derived from SPCanvasItem. Use Ctrl-Middle Mouse to activate.
- Fix problems (see below).
Problems
- ✔The tools (Rectangle, Path, etc.) seem to already work when _w2d includes a rotation.
- On screen elements need to be transformed.
- ✔Guides (already shown at correct angles but ends are in wrong places.
- Grids
- ✔XY
- Axiometric
- ✔Bounding boxes (CtrlRect)
- ✔Page outline (CtrlRect)
- Arrow handles for resize, skew, ...
- ✔Scrolling needs to be adjusted.