canvas

  1. Mashiane

    B4J Library [BANanoCanvas] A HTML5 Canvas Library

    Ola Download Using the BANanoElement & BANanoObject, one is able to script the HTML canvas to draw images etc. Here we follow the same methodology used to create canvas structures. To be able to do this, one uses the BANanoElement to create the <CANVAS> tab, then from that gets the 2d context...
  2. moster67

    B4J Code Snippet [B4X] Canvas - ensure free mouse drawing without gaps (smooth continuous drawing)

    EDIT: see posts #2 and #4 for better solutions thanks to Erel. There might be better ways but I have used DrawRect() method of the Canvas in the past when I want to do free mouse/hand drawing on the screen. However, very often DrawRect() skips some points, i.e., leaves gaps if one tries to draw...
  3. saeed10051

    Android Question How to draw on a canvas in Android

    Hi all i have seen on code from Erel where following code is executed on B4J side to draw on a canvas Sub cvs_MouseDragged (EventData As MouseEvent) cvs.DrawCircle(EventData.X, EventData.Y, 30dip, fx.Colors.From32Bit(Rnd(0xFF000000, -1)), True, 0) End Sub Here as we see that MouseDragged...
  4. M

    Android Question Clip / Crop with bitmapcreator ?

    Hi, is there a way to clip / crop with bitmapcreator ? Similar to canvas.ClipPath / canvas.RemoveClip. I would like to try using BitmapCreator instead of B4XCanvas, I'm trying to maximize performance gains.
  5. MitchBu

    Android Question Load picture into canvas

    I tried to search, but could not find any example to do what I want. I want to select a picture in the device, and load it into a canvas How should I proceed ? TIA :)
  6. LucaMs

    Android Question [Solved by Klaus] 9Patch and MeasureStringWidth

    If there a "conflict" between 9Patch and canvas MeasureStringWidth or, as always :D, I'm doing something wrong? If I use canvas MeasureStringWidth after applying the 9 patch I get a strange result (see the attached project, please).
  7. Alexander Stolte

    Android Question AnimatedCounter and Canvas, numbers are not in the middle

    Hello, i have a question about the canvas.drawtext function for this code: Private Sub CreateBitmap (lbl As B4XView) As B4XBitmap Dim p As B4XView = xui.CreatePanel("") p.SetLayoutAnimated(0, 0, 0, DigitWidth, DigitHeight * 10) Dim cvs As B4XCanvas cvs.Initialize(p) Dim...
  8. Multiverse app

    Share My Creation Meme Generator

    Ullu: Meme Generator, Make Hindi Memes Easily https://play.google.com/store/apps/details?id=com.multiverse.memegenerator.indian With Meme Generator, you can create the funniest memes and share them with your friends via Facebook, Twitter, Instagram, WhatsApp, Messenger, Google+, E-mail...
  9. Alexander Stolte

    Android Question [B4X] How Draw a rounded circel in the middle of a panel?

    Hey, how can i draw that on a Panel? I fail at the rounded one. Greetings :)
  10. Alexander Stolte

    Android Question [B4X] Draw a rounded circel in the middle of a panel

    Hello, is this prossible with a panel? Greetings :)
  11. M

    Android Question Draw panel views programatically on PDF Canvas

    Hi, I have seen examples in the forum of taking screen shots of panels and saving them to a canvas and bitmap image. My trouble is I am trying to draw views to a PDF canvas (or any canvas) programmatically with no views displayed on a layout at the time. I was able to solve this in B4i using...
  12. Alexander Stolte

    B4J Question Undo/Redo by canvas.drawline with UndoManager

    Hello, How can i save the state of my Canvas drawing for the Undo and Redo Button with the UndoManager? i use this code for drawing: Process_Globals Private pnl_back As B4XView Private cvs_back As B4XCanvas End Sub Sub AppStart (Form1 As Form, Args() As String)...
  13. yiankos1

    Android Question B4XCanvas "setAntiAlias" method

    Hello my friend, How can i set antialias at b4x canvas? Dim Obj1 As Reflector Dim Canv As Canvas Canv.Initialize(Btn1) ' initialize on what you want Obj1.Target = Canv Obj1.Target = Obj1.GetField("paint") Obj1.RunMethod2("setAntiAlias", True, "java.lang.boolean") This...
Top