Closed Bug 375909 Opened 17 years ago Closed 17 years ago

Incorrect coordinate computation in Canvas

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha5

People

(Reporter: reg, Assigned: reg)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a4pre) Gecko/20070329 Minefield/3.0a4pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a4pre) Gecko/20070329 Minefield/3.0a4pre

In nsCanvasRenderingContext2d there's an incorrect calculation of some coordinates (has appunits * appunits, not appunits/appunits).  It might be responsible for a few canvas bugs, but I've not tested...  I'll attach a patch now.

Reproducible: Always
Attached patch Simple fix. (obsolete) — Splinter Review
This should be right.  Uses coordinate transform functions rather than a simple one...
Attachment #260074 - Flags: review?(roc)
Comment on attachment 260074 [details] [diff] [review]
Simple fix.

p2a should be renamed. A2B typically means "a factor which you multiply by A to get B". I would just call it appUnitsPerDevPixel :-).
Attachment #260074 - Flags: superreview+
Attachment #260074 - Flags: review?(roc)
Attachment #260074 - Flags: review+
If you attach a final patch, someone can check it in. Me if necessary.
OK, as requested p2a changed to appUnitsPerDevPixel.  Also split onto two lines since the line was getting long...
Attachment #260074 - Attachment is obsolete: true
Attachment #260161 - Flags: review?(roc)
roc: the whiteboard flag should rather be [checkin needed] instead of [needs checkin], if I refer to http://wiki.mozilla.org/Bugzilla:MozillaFlagsAndSuch and what is done for the other bugs.
Whiteboard: [needs checkin] → [checkin needed]
Assignee: nobody → reg
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: in-testsuite?
Version: unspecified → Trunk
Checked in:
mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp  1.83
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → mozilla1.9alpha5
Thanks for the commit.  I don't know how to test this bug, since I found it the old fashioned way - by looking at the source code ;-).  It's possible that bug 326591 is a symptom, but that bug has no testcase either...
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: