Opened 5 years ago

Last modified 2 years ago

#17482 assigned enhancement

[patch][cla][GFX] New API to specify rounding precision for SVG shape coordinates

Reported by: Eric Durocher Owned by: Eric Durocher
Priority: undecided Milestone: 1.15
Component: DojoX GFX Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Eric Durocher)

Currently, GFX rounds decimal coordinates to 4 digits after the decimal point when converting coordinates to string (for example in SVG attributes). This can lead to unexpected results when more precision is needed, like in the attached test case, where an almost-complete arc created but the arc is not drawn as the rounded start and end points are equal (although the actual coordinates specified are slightly different).

Thew new API could be a global option, or a new optional per-shape property, for example: shape.setPrecision(10).

Note this is specific to the SVG renderer (maybe VML too, not tested). The Canvas renderer does not need to convert coordinates to strings so it does not have that problem.

Attachments (1)

test_arcsvg.html (1.6 KB) - added by Eric Durocher 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by Eric Durocher

Attachment: test_arcsvg.html added

comment:1 Changed 5 years ago by Eric Durocher

Description: modified (diff)
Summary: New API to specify rounding precision[GFX] New API to specify rounding precision for SVG shape coordinates

comment:2 Changed 5 years ago by Eric Durocher

Owner: set to Eric Durocher
Status: newassigned

comment:3 Changed 3 years ago by dylan

Milestone: tbd1.12
Summary: [GFX] New API to specify rounding precision for SVG shape coordinates[patch][cla][GFX] New API to specify rounding precision for SVG shape coordinates

Any plans to land this?

comment:4 Changed 2 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.