To set the width of the stroke, use ctx.setLineWidth(double)

In general, FillStrokeStyle currently has three subclasses:

- CanvasGradient
- CanvasPattern
- CssColor

They don't have public constructors. CanvasGradient can be created by using 
ctx.createLinearGradient() or ctx.createRadialGradient().

CanvasPatterns can be created with ctx.createPattern().

CssColors can be created with CssColor.make(). There's also a shortcut: A 
CssColor object is created in the background, when you use some of the 
overloaded methods of Context2d like ctx.setStrokeStyle(String color) or 
ctx.setFillStyle(String color).


On Thursday, August 30, 2012 12:44:22 AM UTC+2, mark wrote:
>
> Hi,
>
> I'd like to change the stroke width but am not clear how to do this:
>
>     Context2d context = ...;
>     context.setStrokeStyle(FillStrokeStyle ?);
>     context.strokeRect(…);
>
> I'm not sure how to create a FillStrokeStyle object (or specifically how 
> to create one where I can control its width). Anyone know?
>
> Thanks
>
>
>
>
> http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/gwt/canvas/dom/client/FillStrokeStyle.html
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/e5_3EDLYqxoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to