B4J Library AsyncCanvas, B4XCanvas wrapper with Invalidate for B4J - max123 Apr 08, 2025 (7 reactions) GetDrawingCount As Long Get the drawing counter. NOTE: GetDrawingCount, ClearDrawingCount, Invalidate, AutoInvalidate and any getter command will be excluded from count. ClearDrawingCount As Clear the drawing counter. Cls As Clear the full canvas with the black color. This is a short hand to cle Share My Creation Easy cad dimensions - hookshy (first post) Dec 15, 2018 (2 reactions) Waited long time to figure out how to erase objects drawn on table
Here is some simple efficient way to clear the canvas
How did I do it ?
-save the picture copy when the user starts new project
-clippath with canvas.clippath to a rectangle boundary
-draw the saved copy of original to the current B4J Library jCanvasExt Extends Canvas methods - klaus Aug 27, 2023 (20 reactions) The coordinates are transformed by the current transform as they are added to the path. arcTo (x1 As Double, y1 As Double, x2 As Double, y2 As Double, Radius As Double) As String Adds an arc to the next point (x2, y2) in the current path x1, y1 coordinates of point 1 x2, y2 coordinates of point 2 B4A Example RoundBitmapWithBorder - inline java code - Johan Schoeman (first post) Nov 15, 2015 (4 reactions) (targetWidth - 5)/2); Bitmap targetBitmap = Bitmap.createBitmap(targetWidth, targetHeight, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(targetBitmap); Path path = new Path(); path.addCircle(((float) targetWidth - 1) / 2, ((float) targetHeight - B4J Question .drawpath auto invalidates? - Erel (first post) Jun 24, 2018 It has nothing to do with invalidation.
It is possible that DrawPath is slow as it requires clipping the canvas. DrawPolygon is not the same as DrawPath.
B4XCanvas and Canvas have the exact same performance characteristics. B4A Question Help needed. DrawPath object on canvas is covered by Label view - fredo Nov 16, 2019 Left = innerView.Left + x - downx
innerView.Top = innerView.Top + y - downy
TouchPanelOverBubble.Left = innerView.Left
TouchPanelOverBubble.Top = innerView.Top
BubbleMoved
End If
Return True
End Sub
private Sub BubbleMoved
cvs.ClearRect(cvs.TargetRect)
B4A Question Make panel in different shape - JordiCP (first post) Feb 19, 2016 (3 reactions) If you want to keep the image horizontal, then you don't want to rotate the imageview, but its borders. A way to do it would be to use canvas to draw the desired bitmap into an imageview using clippath to define these "custom" borders For instance, IV.Initialize("IV") IV.Gravity=Gravity.F B4A Question DrawPath() problem with Clipping? [SOLVED] - W. Graf Jul 06, 2018 Hi!
I'm having a question about ImageView, Canvas and DrawPath().
I want to draw multiple lines with DrawPath with this Code (see also attachment for a demo):
Dim canvas1 As Canvas
canvas1.Initialize(ImageView1)
Dim PolygonPath As Path
PolygonPath.Initialize (64,154)
PolygonPath.LineTo (113,234) B4i Question Need Help Cropping an Image - ilan (first post) Sep 10, 2020 Sub DrawBitmap(canvas1 As Canvas, Bitmap1 As Bitmap, SrcRect As Rect, DestRect As Rect) If SrcRect = Null Then Dim SrcRect As Rect SrcRect.Initialize(0, 0, Bitmap1.Width, Bitmap1.Height) End If Dim p1 As Path p1.InitializeRect(DestRect, 0) canvas1.ClipPath(p1) B4J Question Canvas Snapshot Crash - RobertK (first post) Nov 28, 2021 Thanks for your quick reply, Erel.
No, the error does not crash the app right away, but once the error has occurred all subsequent calls to Canvas.Shapshot throw the same error, as described in the JDK Bug Report:
“After this moment, every GUI rendering causes a NullPointerException (triggered by Page: 1 2 3 4 5 6 7 Powered by ColBERT |