Drawing - Draw Function


Next, I made a new function for the drawing and added 2 variable a size one which would be an float and a location which is a 2d vector. Next using the render target variable we call a begin draw canvas to render target function and pass in the render target as the target, then we set it to draw material with the canvas being the target and the render material being the brush.


As seen above the screen is based on the location multiplied by the size of canvas function minus the size divide by 2 and then we call and to finalize the drawing we get the context of draw canvas and call the end draw canvas function.

Leave a comment

Log in with itch.io to leave a comment.