Sub drawRoundRect(cvs As Canvas, Rect1 As Rect, Radius As Float, StrokeColor As Int, FillColor As Int, StrokeWidth As Float)
Dim drw As ABExtDrawing
Dim r1 As ABRectF
Dim pt1, pt2 As ABPaint
r1.Initialize(Rect1.Left, Rect1.Top, Rect1.Right, Rect1.Bottom)
pt1.Initialize
pt1.SetStrokeWidth(1)
pt1.SetColor(FillColor)
pt1.SetStyle(pt1.Style_FILL)
'added this line
If FillColor = Colors.Transparent Then pt1.SetPorterDuffXfermode(drw.PorterDuffMode_CLEAR)
drw.drawRoundRect(cvs, r1, Radius, Radius, pt1)
pt2.Initialize
pt2.SetStrokeWidth(StrokeWidth)
pt2.SetColor(StrokeColor)
pt2.SetStyle(pt1.Style_STROKE)
'added this line
If StrokeColor = Colors.Transparent Then pt2.SetPorterDuffXfermode(drw.PorterDuffMode_CLEAR)
drw.drawRoundRect(cvs, r1, Radius, Radius, pt2)
End Sub