Bug 19790

Summary: Canvas strokeRect() doesn't support gradients
Product: WebKit Reporter: Dirk Schulze <krit>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: quark67
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
URL: http://developer.mozilla.org/samples/canvas-tutorial/4_9_canvas_lineargradient.html
Bug Depends on: 17269    
Bug Blocks:    
Attachments:
Description Flags
Gradients for strokeRect()
none
strokeRect() with gradients
none
strokeRect support for Cg
none
strokeRect support for Cg oliver: review+

Dirk Schulze
Reported 2008-06-27 08:38:17 PDT
strokeRect() doesn't support gradients in Canvas.
Attachments
Gradients for strokeRect() (1.21 KB, patch)
2008-06-27 08:40 PDT, Dirk Schulze
no flags
strokeRect() with gradients (3.92 KB, patch)
2008-06-28 03:04 PDT, Dirk Schulze
no flags
strokeRect support for Cg (1.28 KB, patch)
2008-12-05 13:53 PST, Dirk Schulze
no flags
strokeRect support for Cg (5.55 KB, patch)
2008-12-06 04:28 PST, Dirk Schulze
oliver: review+
Dirk Schulze
Comment 1 2008-06-27 08:40:46 PDT
Created attachment 21972 [details] Gradients for strokeRect() Transformed the Rectangle to a path and let stroke() render the content of strokeRect().
Dirk Schulze
Comment 2 2008-06-27 09:29:25 PDT
(In reply to comment #1) > Created an attachment (id=21972) [edit] > Gradients for strokeRect() > > Transformed the Rectangle to a path and let stroke() render the content of > strokeRect(). > I'm unsure about lineWidth. If we let stroke() render rectangles, do we still need strokeRect(float, float, float, float, float) (5 floats)? I believe it was used to let the rect render by GraphicsContext and isn't usefull anymore with the changes above. Otherwise we need to call setLineWidth().
Dirk Schulze
Comment 3 2008-06-28 03:04:01 PDT
Created attachment 21984 [details] strokeRect() with gradients I spoke with olliej and we were agreed to clean up canvas first before fixing strokeRect() and look if the code could be reused later.
Dirk Schulze
Comment 4 2008-06-29 11:31:52 PDT
*** Bug 18463 has been marked as a duplicate of this bug. ***
Eric Seidel (no email)
Comment 5 2008-08-29 12:08:14 PDT
This still fails for CG in the latest nightly: r35993.dmg">http://builds.nightly.webkit.org/files/trunk/mac/WebKit-SVN-r35993.dmg
Dirk Schulze
Comment 6 2008-12-05 13:53:00 PST
Created attachment 25786 [details] strokeRect support for Cg This should add patter and gradient-strokes for strokeRect(). I'll run layouttest and set the review-flag afterwards.
Dirk Schulze
Comment 7 2008-12-06 04:28:00 PST
Created attachment 25812 [details] strokeRect support for Cg Added a LayoutTest.
Dirk Schulze
Comment 8 2008-12-07 01:23:51 PST
landed in r39080.
Note You need to log in before you can comment on or make changes to this bug.