[Webkit-unassigned] [Bug 38390] [Qt] Failed on http://philip.html5.org/tests/canvas/suite/tests/2d.drawImage.negativesource.html

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 11 06:24:22 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38390





--- Comment #4 from qi <qi.2.zhang at nokia.com>  2010-05-11 06:24:22 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > Created an attachment (id=54807)
 --> (https://bugs.webkit.org/attachment.cgi?id=54807) [details] [details]
> > patch
> > 
> > This bug is pretty much similar with 56619. Both of them is about negative width or height in drawing a image. The difference is 56619 was drawing a special image - canvas (drawing a canvas to another canvas), in Qt, StillImage draw is used for this purpose. This case is a normal image (draw a normal image to canvas), ImageQt draw is used for this purpose. I copy the code from StillImage to ImageQt for the same reason.
> IIRC I talked to hixie, and you also need to flip the image on negative sizes. So 56619 might be wrong too.

Hi Dirk,

Can you explain what's your means on "flip the image on negative sizes"?

What I did is following the HTML5 spec:
The source rectangle is the rectangle whose corners are the four points (sx, sy), (sx+sw, sy), (sx+sw, sy+sh), (sx,sy+sh).
The destination rectangle is the rectangle whose corners are the four points (dx, dy), (dx+dw, dy), (dx+dw,dy+dh), (dx, dy+dh).

In this case, the sw(width) or sh(height) could be negative. Based on the spec, as long as sx+sw > 0 or sy+sh, it is still legal.
In Qt, QPainter don't support a negative width or height.

Note: 56619 is the wrong id, it is 35005.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list