CosmosOS / Cosmos

Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
https://www.goCosmos.org
BSD 3-Clause "New" or "Revised" License
2.93k stars 552 forks source link

Add ImageCanvas #1724

Open quajak opened 3 years ago

quajak commented 3 years ago

Cosmos currently has no way to draw/edit images (bitmaps for now) which have been loaded, beside direct manipulation of the array in bitmaps.

I think the best way to fix this would be to add a VirtualCanvas implementation of Canvas, which takes a Bitmap and implements the necessary methods to allow the use of the various drawing methods on it. Methods such as Display would throw NotSupportedException.

We could further also add a method to export a Canvas to an Image.

ghost commented 3 years ago

There's an easy way to do this. Split the image into pixels and draw the pixels one by one.

terminal-cs commented 3 years ago

i might try to work on this sometime later, it should be quite easy