CanvasDraw - A powerful pixel-based graphics library (Draw pixels, lines, triangles, read/modify image data, and much more!)

I have been looking for this for a very long time, I was wondering how you could also “Redo” after doing “Undo”? Been trying for the past 3 hours but just couldn’t do it

Oh, thank you so much for fixing this. I’ve been trying to figure out why I haven’t been able to use ascii characters for ages.

I think one way to do this is like so:

Whenever you undo, instead of removing the latest saved frame from the table, we instead keep it and use a number value that goes up and down when ever we undo and redo, and just index the saved frame with that number to draw it

Module Patch / Small Update - v4.6.1

CanvasDraw fonts can now support multi-byte UTF-8 characters (such as greek letters, ascii characters, blocks, etc)

The Codepage and CodepageLarge fonts have been updated and now support 254 characters

These changes affect Canvas:DrawText() and Canvas:DrawTextXY()


Special thanks to @Lxi099!


CanvasDraw4.6.1.b.rbxm (63.2 KB)

4 Likes

That’l be good, especially for any games using CanvasDraw that want an easy way to incorporate Graphics Levels* for performance on different devices.

*(Not 100% even needed since CanvasDraw is so optimized!)

1 Like

CanvasDraw Tools Plugin - Image Editor Temporarily Broken

Hey all, we currently have an EditableImage rendering issue with the plugin, which causes the Image Editor to no longer show anything while drawing/importing an image.

This issue should be fixed sometime on Monday


EDIT: The issue has now been resolved

1 Like

Small Optimisation Update - v4.6.2

Hey all, this update is one of the few rare optimisation updates where I somehow make CanvasDraw even faster than it already is!


Here is the list of changes:

  • Improved performance by 20% for textured triangles. This affects the following methods:

    • Canvas:DrawTexturedTriangle() and Canvas:DrawTexturedTriangleXY()
    • Canvas:DrawDistortedImage() and Canvas:DrawDistortedImageXY()
    • Canvas:DrawRotatedImage() and Canvas:DrawRotatedImageXY()
    • Canvas:DrawImageRect() and Canvas:DrawImageRectXY()
  • Improved performance for Canvas:DrawTriangle() and Canvas:DrawTriangleXY() by 22%

  • Fixed and increased performance for Canvas:ClearPixels() and Canvas:FillPixels() by over 200%


CanvasDraw4.6.2.b.rbxm (63.6 KB)

1 Like

Optimisation Update - v4.7.0


Hey all, roblox has recently released a new API for EditableImages that allows us to use buffers efficiently with them.

CanvasDraw now uses 8-bit integer buffers instead of arrays of doubles for the pixel grid management.

Doing this has not only improved memory usage, but also has improved framerate as well!


From a 1024x1024 Canvas:SetRGB() with clearing for every heartbeat test, I have acheived the following numbers:

  • CanvasDraw v4.6.2 (Previous Version):

    • 13 FPS
  • CanvasDraw v4.7.0 (Newest Version):

    • 18 FPS

This update has also reduced ImageData size by about 33%

Prior to this update, an uncompressed 1024x1024 ImageData would take up 0.3 GB of memory, and now with this update the same image only takes up 0.1 GB of memory!


CanvasDraw4.7.0.b.rbxm (64.2 KB)

3 Likes

Yay! More Mandelbrot frames per recording! But to be fair, I’m happier with the FPS improvements! Thanks, Roblox and my beloved Ethan.

2 Likes