0

I have program that seems to compile with dart2js enough for UI such as checkbox working, and even can do

CanvasRenderingContext2D context=canvas.context2D;

context
..setFillColorRgb(200,200,250,1)
..beginPath()
..fillRect(0,0,width, height)
..closePath();

on firefox, ( not Safari).

But it won't do

context
..setStrokeColorRgb(255,0,255)
..lineWidth=10
..beginPath()
..arc(w/2,h/2, r, 0, math.PI*2, false)
..closePath()
..stroke()

It works on Chrome, and chromium ( native dart). How to fix ?

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
si t
  • 1
  • 3

1 Answers1

0

I used context.resetTranform() , after removing this statement, it worked on Safari chrome and firefox.

si t
  • 1
  • 3