Gradient offset input field rounding

Bug #1088156 reported by rickmastfan67
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Low
Unassigned

Bug Description

Inkscape 0.48.3.1 r9886 - W7 x64

Steps to reproduce:
1) Create shape.
2) Add a linear gradient fill.
3) Pull up the "Gradient editor".
4) Hit the "Add stop" button to add a new stop.
5) Now select the new "stop" that was added.
6) In the input field for the offset of the new stop, type in the following number "0.755".

Result:
The input field is rounded up to 0.76, but saved in the file as 0.75999999 for that stop. (To see that long number, save the file first and then open it in an external text editor. I would recommend Notepad++.)

Expected results:
The field should display the setting you selected, 0.755, or at least save 0.755 in your file instead of botching the rounding up process.

So, if Inkscape would have just accepted what the user wanted to input, it would have also saved 5 bytes in the final file size since for some odd reason, when Inkscape rounded 0.755 up to 0.76, it didn't round all the way up and stopped "0.00000001" short.

Also, it gets annoying after awhile when you have to keep going to the external text editor to fix the rounding bug and input there the correct location that you wanted.

su_v (suv-lp)
tags: added: ui
Revision history for this message
su_v (suv-lp) wrote :

Reproduced with (deprecated) gradient editor dialog in Inkscape 0.48.3.1 on OS X 10.7.4
Also affects the gradient stop entry on the controls bar of the enhanced gradient tool in current trunk (r11939) - though not all input values are equally affected (0.755 is stored as 0.755, but e.g. 0.765 is saved as 0.76499999).

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
tags: added: precision
Revision history for this message
Beluga (buovjaga) wrote :

Could not repro with the new gradient editor. It is displayed as 0,75 in the interface and in the file it is: offset="0.755"

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92pre1 15073 (GTK3)

Revision history for this message
jazzynico (jazzynico) wrote :

Bug reproduced on Windows 7 with Inkscape 0.48.5.
Not reproduced with 0.91 and lp:inkscape/0.92.x.

The only minor (or maybe even not a bug) remaining issue is the rounding to 0.75 instead of 0.76.

jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.