Convert an Arrangement into a paintable canvas.
The stroke looks good without noise or unwanted lines, here the use of undo and redo is shown.
When erasing, a black line will appear where the eraser is passed and when you release your finger, the eraser will be applied.
Changing the stroke value will display a preview of the current size and color at the top.
I know the Canva component exists, and you can do a ton of amazing things there, but here I have a Canva that's set to an Arrangement. I've been testing to make sure it works with the other ImageLoader
and Text
extensions. But when you save the image with the built-in function, it will only save what was done with this extension, not the other extensions. To save from all extensions, you can use the ArrangementCapture
extension.
MakePaintable
Turn an Arrangement into a canvas for drawing with touch
StrokeColor
StrokeWidth
Eraser
Enable eraser mode. True = eraser on, False = draw mode.
ClearCanvas
Clear the entire canvas.
SaveCanvas
Saves the entire canvas as a PNG with the specified filename. Returns the file path.
DrawAboveComponents
Set whether the drawing appears above or below the components in the arrangement.
BrushStyle
Set the brush style. Options: 'default', 'dotted', 'dashed', 'emboss', 'blur'.
FillCanvas
Fill the entire canvas.
UndoLastStroke
Undo the last stroke on the canvas.
RedoLastStroke
Redo the last undone stroke on the canvas.
CanUndo
Returns true if there are strokes to undo.
CanRedo
Returns true if there are strokes to redo.
StrokeUndone
Triggered when a stroke is undone.
StrokeRedone
Triggered when a stroke is redone.
Update v1.1 June 24, 2025.
- The spacing between dotted and dashed brushes has been corrected.
- They can now be displayed correctly with any stroke width.
- New brushes added.
joejsanz.joedevpaint.aix (19.1 KB)
JDK: 11
Minimum API Level: 21
Updated On: 2025-06-24T07:00:00Z
Built & documented using: FAST v3.7.0-premium
Thanks.