bs-webapi

How does fillStyle work in bs-webapi Canvas2d

偶尔善良 提交于 2020-01-25 09:28:07
问题 I'm wondering how to create a and set a fill style using bs-webapi and Canvas2d interface in ReasonML. I think the definition I might need is this: let fillStyle = (ctx: t) => ctx |> fillStyle |> reifyStyle; But I'm having trouble understanding it. I have previously used this project as a source of examples, but I think the bs-webapi has changed since that project was authored. At least the following line modeled after the example: Canvas2d.fillStyle(ctx, "rgba(0,255,255,255)"); gives me this