Opened 12 years ago

Closed 12 years ago

#2596 closed defect (fixed)

dojo.gfx path parsing

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone:
Component: gfx (svg+vml) Version: 0.4.2rc1
Keywords: Cc:
Blocked By: Blocking:

Description

In test_setPath.html example I have changed the second shape code for this one (the path is a capital "a" SVG font):

surface

.createPath("M891 1h-106v137l-1 58h-684v-195h-100v389q1 94 96 94h710q85 0 85 -101v-80v-157v-145z M100 302h684l1 41q-15 26 -23 26l-638 1q-10 0 -24 -26v-42z") .setStroke({color: "black"}) .setFill("#ddd") .setTransform({xx: 0.05, xy: 0 , yx: 0 , yy: -0.05, dx: 200, dy: 100 })

;

there are two bugs:

1.- if you do not separate "z" and "M" with an space the shape is not displayed correctly (the bar inside the "A" is placed outside) 2.- only IE (6) renders the black stroke Mozilla Firefox (2.0.0.2) does not

Attachments (1)

test_setPath.html (2.4 KB) - added by guest 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by guest

Attachment: test_setPath.html added

comment:1 Changed 12 years ago by Eugene Lazutkin

Status: newassigned

These are actually two separate bugs.

The missing stroke is due to the fact that SVG scales a stroke width, and you scale everything by 0.05 --- it makes the stroke invisible. VML doesn't scale the stroke. It is a tough problem to handle uniformly --- please file a new ticket for that.

comment:2 Changed 12 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [7814]) gfx: fixes #2596 --- incorrect parsing of the path in some cases

Note: See TracTickets for help on using tickets.