Jump to content

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:

    bmd.circle(outerCircle.x, 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?

Link to comment
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;



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...