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

that’s weird, i think I might know why that is possibly happening. Ill have a look at it later

Made a real-time renderer with this module, working at 50-60 fps (resolution 1000*1000), very good module, I hope you update’ll it till perfection!

5 Likes

Can you provide a repro or a code snippet? Are your X and Y values for the line whole numbers?

Yeah that the X and Y values not being whole numbers might have been the problem sorry for the inconvenience

1 Like

Module Small Patch - v4.9.3.b

  • Canvas:DrawLineXY() now has coordinate rounding

  • Fixed some small typos in the documentation within the module


CanvasDraw4.9.3.b.rbxm (68.5 KB)

1 Like

I have a question, how do I send ImageData from the client to the server using a RemoteEvent? I’m sorry if this question is dumb

Did you create all this within studio?

You may be interested in moving your code to GitHub and possibly using moonwave. If you do, you’ll be able to make it open source so others could contribute, and with moonwave, be able to have a website and easy documentation for it (there’s a lot more potential benefits to moving the code to an external code base). It’s a bit hard/complex to setup, but the effort would be well worth it.

CanvasDraw 4.10.0 - Full Release!


It’s finally happened. CanvasDraw 4.0 can now be used in live published experiences!

However, roblox has announced that EditableImage has certain restrictions to prevent misuse.

In order to use CanvasDraw 4.0, you must be:

  • 13+
  • ID-verified
  • explicitly opted-in to using the API in published experiences

You can read more about these new EditableImage changes and limitations here:


Full changelog:

  • CanvasDraw 4.0 full release (Out of beta)

  • Improved CanvasDraw.CompressImageData() and CanvasDraw.DecompressImageData() to use purely buffers instead as they are smaller and faster than string compression.

    • You should be able to store a single high detailed 1024x1024 image on a single datastore key as the new CompressedImageData will not go any higher than 2.5 MB. Simpler images with less detail and colour will be much lower in size.

CanvasDraw4.10.0.rbxm (68.5 KB)

2 Likes

Question, how come there’s no option to preset the canvas to be transparent? Unless it would make the canvas just be completely transparent Even with the image data being loaded.

It’s just never been suggested or contributed by anyone before. You can make a canvas transparent like so:

Canvas:SetClearRGBA(0, 0, 0, 0)
Canvas:Clear()

As for drawing things on a transparent canvas, there currently isn’t any good automatic support for that yet, ill be sure to see if i can add better support for that soon.

In the mean time, you can interate through specific pixels and use Canvas:SetAlpha() to set the transparency accordingly

To be honest, if I made something as good as this my ego would be also as high.

1 Like

people might see this as useless but i think it’s very useful if you wanna make a game from scratch while still using luau

1 Like