Guides/Grids/3D Box Tool should use 'user units'

Bug #1400702 reported by Tavmjong Bah on 2014-12-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tavmjong Bah
Tavmjong Bah

Bug Description

Guides, Grids, and the 3D Box tool should use 'user units'.

For the rational, see:

Guides and the 3D Box tool already use user units in trunk (0.92). This code should be back ported to 0.91 (patch attached). This is especially important for the 3D box tool as boxes will change shape and position between 0.91 and 0.92 without the back port. This is also important for guides as a typical drawing has multiple guides which resetting by hand could be tedious. As 0.48 templates mostly used width/heights in pixels ('user units') there should be little fallout when users move from 0.48 to 0.91.

Grids are a bit more problematic as they use 'absolute' units ('mm', 'in', etc.) and are defined relative to the drawing size. While fixing this is highly desirable, it is not as crucial as drawings usually contain only one grid so correcting a grid by hand is not as tedious. We could wait until 0.91.1.

The ultimate grid fix requires:

1. Using only 'user units' (not using 'absolute' units).
2. Converting already existing grids with 'absolute' units to 'user units'
3. Changing the grid 'unit identifier' to work the same was as 'display-unit' (i.e. so it effects the GUI only).

For test files, see:

To test:


  1. Open a new file in 0.48, 0.91 (patched), or trunk.
  2. Draw a rectangle.
  3. Duplicate
  4. Objects to Guides (Shift G)
  5. Save
  6. Open file in one of the other Inkscape versions, guides should be along edges of rectangle.
     (Guides created in 0.91 or trunk with a scale factor other than 1px/'user unit' will not be the same in 0.48.)

  3D Box Tool

  1. Open a new file in 0.48, 0.91 (patched), or trunk.
  2. Select box tool, draw box.
  3. Save
  4. Open file in on of the other Inkscape versions, box should be the same.
      (A box created in 0.91 or trunk with a scale factor other than 1px/'user unit' will not be the same in 0.48.)

Tavmjong Bah (tavmjong-free) wrote :
su_v (suv-lp) on 2014-12-09
tags: added: 3dbox grids guides
su_v (suv-lp) on 2014-12-09
tags: added: backport-proposed blocker
tags: added: units
removed: grids
tags: added: grids
Tavmjong Bah (tavmjong-free) wrote :

Trunk now updated to use 'user units' for grids. Patch attached for 0.91.

Legacy grids (using unit identifiers) will still be read in but are subject to a scaling error due to the change from 90 to 96dpi.

Test files at updated.

su_v (suv-lp) wrote :

Commits in trunk (for 0.92.x):
- guides: r13769, r13771
- 3dbox: r13784
- grids: r13795

Tavmjong Bah (tavmjong-free) wrote :

Note: One cannot simply patch 0.91 with the commits listed above for guides and 3dbox as the code evolved in trunk too much before the commits were made. The patch in #1 is a back-ported version of r13769, r13771, and r13784.

ScislaC (scislac) wrote :

Patches tested successfully and committed in r13697 of 0.91.x.

Tavmjong: For note, in the patch for grids & 3d boxes it introduced a warning on exiting when a file with 3d boxes was open.

(inkscape:20572): GLib-GObject-WARNING **: instance of invalid non-instantiatable type '(null)'
(inkscape:20572): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

I verified both with and without the patch and it's consistent in both cases (never emitted before the patch, always emitted after). This is something that existed in trunk before your patch, but I just figured it was worth noting when it was introduced into 0.91.x.

su_v (suv-lp) on 2015-01-16
tags: removed: backport-proposed
su_v (suv-lp) on 2015-01-25
tags: removed: blocker
Bryce Harrington (bryce) on 2017-01-10
Changed in inkscape:
status: Fix Committed → Fix Released
no longer affects: inkscape/0.92.x
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers