Bitmapdata example not working in typescript

Recommended Posts


I'm trying to do something similar to this example:


But, I'm working in TypeScript, and it doesn't 'like' the last part:, outerCircle.y, outerCircle.radius, grd);

gets me the error:

Argument of type 'CanvasGradient' is not assignable to parameter of type 'string'.

Any ideas how I resolve this?

Share this post

Link to post
Share on other sites

ok, should anyone come across this, and be interested, I've fixed it by drawing directly to the context. What I was trying to do was a little different, so it's not a straight replacement of the above.

bmd.context.fillStyle = grd;



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.