I just can't stop asking questions lol.
I am trying to get a good concept with this DrawRectRounded2. I was setting the filled to false and playing around with Strokewidth and Radius. I notice any Strokewidth value greater then Radius will fill the entire Rect. Basically, if i need a certain Strokewidth, the Radius value must be greater then Strokewidth? Is that how it works? increasing the value of strokewidth is out of wack in a sense.
The code i was playing around.
Thanks
I am trying to get a good concept with this DrawRectRounded2. I was setting the filled to false and playing around with Strokewidth and Radius. I notice any Strokewidth value greater then Radius will fill the entire Rect. Basically, if i need a certain Strokewidth, the Radius value must be greater then Strokewidth? Is that how it works? increasing the value of strokewidth is out of wack in a sense.
The code i was playing around.
B4X:
Sub DrawRoundedRect(Width As Int, Height As Int, Radius As Int, Clrs() As Int, Orientation As String) As B4XBitmap
Dim Gradient As BitmapCreator
Gradient.Initialize(10, Height)
Gradient.FillGradient(Clrs, Gradient.TargetRect, Orientation)
Dim Brush As BCBrush = Gradient.CreateBrushFromBitmapCreator(Gradient)
Dim bc As BitmapCreator
bc.Initialize(Width, Height)
bc.DrawRectRounded2(bc.TargetRect, Brush, False, 0, Radius)
Return bc.Bitmap
End Sub
Thanks
Last edited: