A wrapper for this project https://github.com/mukeshsolanki/DrawingView-Android
DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images.
sample:
NOTE:
When saving image use format fields like COMPRESS_PNG .
Version 2 adds loadimage(bitmap as bitmap) method so you can load your previous drawing as asked by @Almora
DrawingView
Author: SMM
Version: 0.01
DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images.
sample:
B4X:
Dim demo As DrawingView
B4X:
demo.Initialize("")
Activity.AddView(demo,0,0,100%x,80%y)
demo.DrawBackgroundColor=Colors.White
NOTE:
B4X:
DependsOn(values={"android-support-v4"})
When saving image use format fields like COMPRESS_PNG .
Version 2 adds loadimage(bitmap as bitmap) method so you can load your previous drawing as asked by @Almora
DrawingView
Author: SMM
Version: 0.01
- DrawingView
Fields:- COMPRESS_JPEG As CompressFormat
- COMPRESS_PNG As CompressFormat
- ba As BA
- BringToFront
- Initialize (EventName As String)
- Invalidate
- Invalidate2 (arg0 As Rect)
- Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- IsInitialized As Boolean
- RemoveView
- RequestFocus As Boolean
- SendToBack
- SetBackgroundImage (arg0 As Bitmap)
- SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
- SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
- SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
- initializeEraser
- initializePen
- saveImage (filePath As String, filename As String, format As CompressFormat, quality As Int)
- Background As Drawable
- Color As Int [write only]
- DrawBackgroundColor As Int [write only]
- Enabled As Boolean
- EraserSize As Float [write only]
- Height As Int
- Left As Int
- Parent As Object [read only]
- PenColor As Int [write only]
- PenSize As Float [write only]
- Tag As Object
- Top As Int
- Visible As Boolean
- Width As Int
Attachments
Last edited: