Private Sub DrawScaleDigitalCircle
'This drawing is not basic. Requires more memory and lags performance on loading
If cBasicDrawing = False Then
If cDigitalThickBorder = False Then
Dim cBorderWidth As Float = 0.008 * cWidth
'Outter Bevel
Dim bmp As B4XBitmap = DrawRadial(cWidth, cHeight, Array As Int(cDigitalBorderColor, cDigitalBorderColor2), "TOP_BOTTOM")
cvsGauge.DrawBitmap(bmp, rectGauge2) 'Class_Globals
'Inner Bevel
If cDigitalInnerBevel = True Then
'Inner Bevel
Dim rectGauge22 As B4XRect
rectGauge22.Initialize(cBorderWidth, cBorderWidth, cWidth - cBorderWidth, cHeight - cBorderWidth)
Dim bmp2 As B4XBitmap = DrawRadial(cWidth - cBorderWidth * 2, cHeight - cBorderWidth * 2, Array As Int(cDigitalBorderColor, cDigitalBorderColor2), "BOTTOM_TOP")
cvsGauge.DrawBitmap(bmp2, rectGauge22)
End If
'Background
Dim RectGauge23 As B4XRect
RectGauge23.Initialize(cBorderWidth * 2, cBorderWidth * 2, cWidth - (cBorderWidth * 2), cHeight - (cBorderWidth * 2))
' Dim bmp3 As B4XBitmap = DrawRadial(cWidth - cBorderWidth * 4, cHeight - cBorderWidth * 4, Array As Int(cDigitalBackgroundColor, cDigitalBackgroundColor2), "TOP_BOTTOM")
Dim bmp3 As B4XBitmap = DrawRadialSpecial(cWidth - cBorderWidth * 4, cHeight - cBorderWidth * 4, Array As Int(cDigitalBackgroundColor, cDigitalBackgroundColor2))
cvsGauge.DrawBitmap(bmp3, RectGauge23)
Else
cBorderWidth = 0.036 * cWidth
'Outer Bevel
Dim bmp As B4XBitmap = DrawRadial(cWidth, cHeight, Array As Int(cDigitalBorderColor, cDigitalBorderColor2), "TOP_BOTTOM")
cvsGauge.DrawBitmap(bmp, rectGauge2)
'Inner Bevel
If cDigitalInnerBevel = True Then
'Inner Bevel
Dim rectGauge22 As B4XRect
rectGauge22.Initialize(cBorderWidth + (cBorderWidth/2), cBorderWidth + (cBorderWidth/2), cWidth - (cBorderWidth + cBorderWidth/2), cHeight - (cBorderWidth + cBorderWidth/2))
Dim bmp2 As B4XBitmap = DrawRadial(cWidth - cBorderWidth * 3, cHeight - cBorderWidth * 3, Array As Int(cDigitalBorderColor, cDigitalBorderColor2), "BOTTOM_TOP")
cvsGauge.DrawBitmap(bmp2, rectGauge22)
End If
'Background
Dim RectGauge23 As B4XRect
RectGauge23.Initialize(cBorderWidth * 2.25, cBorderWidth * 2.25, cWidth - (cBorderWidth * 2.25), cHeight - (cBorderWidth * 2.25))
' Dim bmp3 As B4XBitmap = DrawRadial(cWidth - cBorderWidth * 4.5, cHeight - cBorderWidth * 4.5, Array As Int(cDigitalBackgroundColor, cDigitalBackgroundColor2), "TOP_BOTTOM")
'This will draw radial gradient
Dim bmp3 As B4XBitmap = DrawRadialSpecial(cWidth - cBorderWidth * 4.5, cHeight - cBorderWidth * 4.5, Array As Int(cDigitalBackgroundColor, cDigitalBackgroundColor2))
cvsGauge.DrawBitmap(bmp3, RectGauge23)
End If
Else
Dim cbord As Float = 0.016 * cWidth
'Border
cvsGauge.DrawCircle(cWidth/2, cHeight/2, cWidth/2, cDigitalBorderColor, True, cbord)
'Background
cvsGauge.DrawCircle(cWidth/2, cHeight/2, (cWidth/2) - cbord, cDigitalBackgroundColor, True, cbord)
End If
cvsGauge.DrawText(cGaugeTitle, GaugeTextX, GaugeTextY, xui.CreateDefaultBoldFont(cGaugeTitleTextSize), CDigitalTitleColor, "CENTER")
cvsGauge.DrawText(cGaugeUnit, GaugeUnitX, GaugeUnitY, xui.CreateDefaultFont(cGaugeUnitTextSize), CDigitalUnitColor, "CENTER")
cvsGauge.Invalidate
End Sub