Bug 19790 - Canvas strokeRect() doesn't support gradients
Summary: Canvas strokeRect() doesn't support gradients
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL: http://developer.mozilla.org/samples/...
Keywords:
: 18463 (view as bug list)
Depends on: 17269
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-27 08:38 PDT by Dirk Schulze
Modified: 2008-12-07 01:23 PST (History)
1 user (show)

See Also:


Attachments
Gradients for strokeRect() (1.21 KB, patch)
2008-06-27 08:40 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff
strokeRect() with gradients (3.92 KB, patch)
2008-06-28 03:04 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff
strokeRect support for Cg (1.28 KB, patch)
2008-12-05 13:53 PST, Dirk Schulze
no flags Details | Formatted Diff | Diff
strokeRect support for Cg (5.55 KB, patch)
2008-12-06 04:28 PST, Dirk Schulze
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 2008-06-27 08:38:17 PDT
strokeRect() doesn't support gradients in Canvas.
Comment 1 Dirk Schulze 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().
Comment 2 Dirk Schulze 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().
Comment 3 Dirk Schulze 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.
Comment 4 Dirk Schulze 2008-06-29 11:31:52 PDT
*** Bug 18463 has been marked as a duplicate of this bug. ***
Comment 5 Eric Seidel (no email) 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
Comment 6 Dirk Schulze 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.
Comment 7 Dirk Schulze 2008-12-06 04:28:00 PST
Created attachment 25812 [details]
strokeRect support for Cg

Added a LayoutTest.
Comment 8 Dirk Schulze 2008-12-07 01:23:51 PST
landed in r39080.