dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.2k stars 1.57k forks source link

Canvas: context.setStrokeColor is not a function #2084

Closed andersjohnsen closed 9 years ago

andersjohnsen commented 12 years ago

I get the error in firefox with the following line:

  context.setStrokeColor("rgba(0, 0, 0, 0.1)");

where context is a canvas drawing context.

Thank you!

kasperl commented 12 years ago

Removed Area-Library label. Added Area-UI, Triaged labels.

DartBot commented 12 years ago

This comment was originally written by skab...@gmail.com


I can see that http://www.w3.org/TR/2dcontext/#colors-and-styles says it should be

  context.strokeStyle [ = value ]

And I must agree the setStrokeColor in Dart feels a bit odd in the Context class. Changing it to a setter seems like the right thing to do.

Again, thank you :)

DartBot commented 12 years ago

This comment was originally written by skabet...@gmail.com


I just realized we actually expose strokeStyle in dart. Feel free to close this bug, I supposed we want to keep setStrokeColor for compatibility reason. :)

Sorry for the noise.

vsmenon commented 12 years ago

Removed Area-UI label. Added Area-DOM label.

vsmenon commented 12 years ago

Added AsDesigned label.