B4A Library [B4X] [XUI] AS Draw (FabricView and CanvasView) - Alexander Stolte    Apr 28, 2024   (46 reactions) XY As Map)
Functions:
BackgroundImage_setImage (image As B4XBitmap, KeepAspectRatio As Boolean) As String
sets a background image
Class_Globals As String
Clear As String
DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
Base type must be Object
DrawMode_DRAW As String
Dr B4A Tutorial Introduction to the libGDX library - ilan (first post)    Nov 13, 2016 642
DRAW=0.910
DRAW=0.547
DRAW=0.552
DRAW=0.533
DRAW=0.397
DRAW=0.517
DRAW=0.837
DRAW=0.419
DRAW=0.426
DRAW=0.486
DRAW=0.498
DRAW=0.504
DRAW=0.499
DRAW=0.507
DRAW=0.504
DRAW=0.543
DRAW=0.502
DRAW=0.765
DRAW=2.112
DRAW=0.740
DRAW=1.077
DRAW=1.154
DRAW=1.206
DRAW=1.239
DRAW=2.152
DRAW=1.878
DRAW=1.220 B4A Tutorial [B4X] Drawing with BitmapCreator - Erel    Dec 22, 2019   (13 reactions) New drawing methods
The following drawing methods were added in v4.5: DrawLine, DrawCircle, DrawRect, DrawRectRounded and DrawPath.
With the exception of DrawLine, the shapes can be either filled or not filled. All methods include a StrokeWidth parameter that affects the contour width of non-filled B4J Library {B4X] A class to draw on canvas many types of arrows at any angle. - William Lancee    Aug 24, 2022   (19 reactions) Once again I found myself writing code to draw arrows on canvas.
@klaus has provided a basic technique that I also use: define the set of points on the arrow as a path and then draw the path.
https://www.b4x.-broken-line-arrow-head.43450/post-264259
I finally decided to write a more general class t B4A Code Snippet [B4X] [XUI] Accurate Text Measurement and Drawing - Erel    Dec 12, 2022   (54 reactions) Sub that also draws the border and the baseline:
Sub DrawTextWithBorder (cvs1 As B4XCanvas, Text As String, Fnt As B4XFont, Clr As Int, CenterX As Int, CenterY As Int)
Dim r As B4XRect = cvs1.MeasureText(Text, Fnt)
Dim BaseLine As Double = CenterY - r.Height / 2 - r.Top
cvs1.DrawText(Text, B4J Library [B4X] [XUI] xGraph Class and b4xlib - klaus    Sep 12, 2022   (26 reactions) DrawCurve (Index As Int) Draws the curve with the given index. Example code: xGraph1.DrawCurve(2) DrawCurves (Indexes() As Int) Draws the curves with the given indexes. Example code: xGraph1.DrawCurves(Array As Int(0,1,2,3)) DrawGraph Draws a graph GetScaleAuto (CurveIndex As Int) As ScaleValues G Share My Creation [B4J][B4XPages] Artifying an image - creating an impressionistic effect. - William Lancee    Sep 26, 2022   (9 reactions) I needed this when I was developing a personal project: 'A Virtual Train Set'. I have a large screen monitor, and I thought that I would animate trains on it from a bird's eye view. There would be tracks in a terrain with various types of trains running on them according to a specified schedule. Pe B4A Question Draw A Line - klaus (first post)    Jul 10, 2023   (2 reactions) Use two Panels and two Canvases, one for the drawing and another one for the temporary drawings.
Before drawing a new line, erase the previous one.
With TOUCHUP erase the temporary line and draw the definive one.
Attached a small demo project. B4A Question Subscribe to library updates - Alexander Stolte (first post)    Mar 30, 2020   (5 reactions) AS Draw
Features
cross-platform compatible
draw or erase
undo and redo
clear all
set color, thickness and background color
enable or disable the drawing
import and export the drawing for later use
export the drawing as image or the complete view
9090790908 B4J Code Snippet A method for drawing paths of line shapes in B4J with B4XCanvas - William Lancee    Jul 26, 2021   (4 reactions) This is not a problem you might say. Try it and you'll find that nothing appears to be drawn. If you do the same thing in B4A it works as expected. The reason is that the JavaFx designers differentiated between lines and line shapes. The DrawLine method draws lines, the DrawPath method draws clos Page: 1   2   3   4   5   6   7   Powered by ColBERT |