Closed Bug 345488 Opened 19 years ago Closed 19 years ago

bad transformation of a SVG text on the "textPath"

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: martin.hejral, Assigned: tor)

Details

Attachments

(9 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; cs; rv:1.8.1b1) Gecko/20060710 Firefox/2.0b1 "textPath" should be transformed first and THEN glyphs placed on the transformed path Reproducible: Always Steps to Reproduce: try this code --- <defs> <path id="krivka" d="M 300 200 C 200 100 300 0 400 00 C 550 00 600 300 700 200 C 800 100 900 100 900 100" transform="scale(1 -1)" /> </defs> <circle cx="500" cy="100" r="10"/> <use xlink:href="#krivka" fill="none" stroke="red" /> <text font-family="'Times CE', 'Times New Roman', serif" font-size="72" font-weight="normal" fill="blue" > <textPath xlink:href="#krivka" method="stretch" > text <tspan dy="-30" fill="red" > nahoru, </tspan> <tspan dy="30"> dolù a tak dále </tspan> </textPath> </text> Actual Results: see image Expected Results: see image
Attached image expected output
Attached image test case
Assignee: general → tor
Status: UNCONFIRMED → ASSIGNED
Attachment #230158 - Flags: review?
Attachment #230158 - Flags: review? → review?(longsonr)
Comment on attachment 230158 [details] [diff] [review] apply appropriate transform >+ >+//---------------------------------------------------------------------- >+// nsSVGContainerFrame methods: >+ >+already_AddRefed<nsIDOMSVGMatrix> >+nsSVGTextPathFrame::GetCanvasTM() >+{ >+ nsCOMPtr<nsIDOMSVGMatrix> xform = nsSVGTextPathFrameBase::GetCanvasTM(); Nit: I'd rather this variable was called matrix (c.f. nsSVGUtils.cpp) or transform. r=longsonr whatever you chose.
Attachment #230158 - Flags: review?(longsonr) → review+
Attachment #230158 - Flags: superreview?(roc)
Comment on attachment 230158 [details] [diff] [review] apply appropriate transform + nsIDOMSVGMatrix* retval = xform.get(); + NS_IF_ADDREF(retval); + return retval; Instead, do nsIDOMSVGMatrix* retval = nsnull; xform.swap(retval); return retval;
Attachment #230158 - Flags: superreview?(roc) → superreview+
Attachment #230153 - Attachment mime type: image/xml+svg → image/svg+xml
Checked into trunk.
Attached image new trunk behavior
Hmm, looks like we're still reading the spec differently.
Attachment #232184 - Flags: review?(longsonr)
Attachment #232184 - Flags: review?(longsonr) → review+
Attachment #232184 - Flags: superreview?(roc)
Attachment #232184 - Flags: superreview?(roc) → superreview+
Checked in on trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Attachment #232795 - Attachment description: branch possible approach (not working) → branch approach experiment (not working)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: