Canvas.fill() - newo2001/HTML5-Canvas-Wrapper GitHub Wiki
Changes the color that the canvas will use for future drawing operations.
The instance of the Canvas class to be affected.
The color to use for future drawing operations represented as a Vec4 where the vector's (x, y, z, w)
components are the color's (r, g, b, a) values respectively.
A Vec3 can also be used, this is then casted to a Vec4 with a default w-value of 255 making it completely opaque.
Will make future drawing operations use the color red.
canvas.fill(color);
canvas (Canvas)
A Vec3 can also be used, this is then casted to a Vec4 with a default w-value of 255 making it completely opaque.
let canvas = new Canvas(new Vec2(50, 50), new Vec2(100, 200));
canvas.fill(new Vec3(255, 0, 0));