Closed Ulucai closed 5 years ago
If you want to store a region in vector format, look into CanvasGeometry and its associated set of manipulation methods. Win2D has very rich functionality for geometry operations such as intersection and hit testing.
If you want to store in bitmap format, look at CanvasRenderTarget.
I am trying to create a map-maker for tabletop RPGs.
Right now I am trying to make a "freehand" drawing feature. Basically what I did was: Load some texture in a
CanvasBitmap
. Use it to create aCanvasImageBrush
. Then, whenever the mouse is pressed, the app saves its location into aList<Vector2>
.On the drawing Loop It just go through the list and use each item to
Draw.FillCircle()
I wonder if Win2d has: Some kind of container to store the "painted" area. A feature that would aid me into checking if an area is already painted by said texture to avoid waste.