Android Question BitmapCreator Shape

Mike1970

Well-Known Member
Licensed User
It's possible to draw something like this with BitmapCreator? (the blue part)

Senza titolo-1.jpg
 

Erel

Administrator
Staff member
Licensed User
SS-2019-05-13_15.55.15.png


B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("1")
   Dim bc As BitmapCreator
   bc.Initialize(ImageView1.Width, ImageView1.Height)
   Dim path As BCPath
   path.Initialize(0, bc.mHeight)
   path.LineTo(0, 65%y)
   AddBezier(path, 35%x, 50%y, 50%x, 85%y, 100%x, 85%y, 30)
   path.LineTo(100%x, 100%y)
   bc.DrawPath(path, 0xFF008EFF, True, 0)
   bc.DrawLine(0, 100%y, 100%x, 100%y, 0xFF008EFF, 1dip)
   bc.SetBitmapToImageView(bc.Bitmap, ImageView1)
End Sub
 

Attachments

  • 1.zip
    9.3 KB · Views: 151
Upvote 0

Mike1970

Well-Known Member
Licensed User
SS-2019-05-13_15.55.15.png


B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("1")
   Dim bc As BitmapCreator
   bc.Initialize(ImageView1.Width, ImageView1.Height)
   Dim path As BCPath
   path.Initialize(0, bc.mHeight)
   path.LineTo(0, 65%y)
   AddBezier(path, 35%x, 50%y, 50%x, 85%y, 100%x, 85%y, 30)
   path.LineTo(100%x, 100%y)
   bc.DrawPath(path, 0xFF008EFF, True, 0)
   bc.DrawLine(0, 100%y, 100%x, 100%y, 0xFF008EFF, 1dip)
   bc.SetBitmapToImageView(bc.Bitmap, ImageView1)
End Sub


WOW :D
Thanks, very much
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
SS-2019-05-13_15.55.15.png


B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("1")
   Dim bc As BitmapCreator
   bc.Initialize(ImageView1.Width, ImageView1.Height)
   Dim path As BCPath
   path.Initialize(0, bc.mHeight)
   path.LineTo(0, 65%y)
   AddBezier(path, 35%x, 50%y, 50%x, 85%y, 100%x, 85%y, 30)
   path.LineTo(100%x, 100%y)
   bc.DrawPath(path, 0xFF008EFF, True, 0)
   bc.DrawLine(0, 100%y, 100%x, 100%y, 0xFF008EFF, 1dip)
   bc.SetBitmapToImageView(bc.Bitmap, ImageView1)
End Sub


Erel, sorry for the delay, a question.. Why when this code generate that shape i see in the logs a lot of 1?
Like:


B4X:
3
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

And so on for a while
 
Upvote 0
Top