|
@@ -25,6 +25,7 @@ type
|
|
|
FFontShadowOffsetX: integer;
|
|
FFontShadowOffsetX: integer;
|
|
|
FFontShadowOffsetY: integer;
|
|
FFontShadowOffsetY: integer;
|
|
|
FFontShadowRadius: integer;
|
|
FFontShadowRadius: integer;
|
|
|
|
|
+ FLineWidth: single;
|
|
|
procedure SetFFontShadowColor(AValue: TColor);
|
|
procedure SetFFontShadowColor(AValue: TColor);
|
|
|
procedure SetFFontShadowOffsetX(AValue: integer);
|
|
procedure SetFFontShadowOffsetX(AValue: integer);
|
|
|
procedure SetFFontShadowOffsetY(AValue: integer);
|
|
procedure SetFFontShadowOffsetY(AValue: integer);
|
|
@@ -34,6 +35,7 @@ type
|
|
|
procedure SetMaxValue(AValue: integer);
|
|
procedure SetMaxValue(AValue: integer);
|
|
|
procedure SetMinValue(AValue: integer);
|
|
procedure SetMinValue(AValue: integer);
|
|
|
procedure SetValue(AValue: integer);
|
|
procedure SetValue(AValue: integer);
|
|
|
|
|
+ procedure SetLineWidth(AValue: single);
|
|
|
protected
|
|
protected
|
|
|
{ Protected declarations }
|
|
{ Protected declarations }
|
|
|
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer;
|
|
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer;
|
|
@@ -64,6 +66,7 @@ type
|
|
|
property LineColor: TColor read FLineColor write SetFLineColor default clBlack;
|
|
property LineColor: TColor read FLineColor write SetFLineColor default clBlack;
|
|
|
property LineBkgColor: TColor read FLineBkgColor write SetFLineBkgColor default
|
|
property LineBkgColor: TColor read FLineBkgColor write SetFLineBkgColor default
|
|
|
clSilver;
|
|
clSilver;
|
|
|
|
|
+ property LineWidth: single read FLineWidth write SetLineWidth default 4;
|
|
|
property FontShadowColor: TColor read FFontShadowColor
|
|
property FontShadowColor: TColor read FFontShadowColor
|
|
|
write SetFFontShadowColor default clBlack;
|
|
write SetFFontShadowColor default clBlack;
|
|
|
property FontShadowOffsetX: integer read FFontShadowOffsetX
|
|
property FontShadowOffsetX: integer read FFontShadowOffsetX
|
|
@@ -180,6 +183,15 @@ begin
|
|
|
Invalidate;
|
|
Invalidate;
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
+procedure TBCRadialProgressBar.SetLineWidth(AValue: single);
|
|
|
|
|
+begin
|
|
|
|
|
+ if (FLineWidth = AValue) then
|
|
|
|
|
+ exit;
|
|
|
|
|
+ FLineWidth := AValue;
|
|
|
|
|
+ RenderControl;
|
|
|
|
|
+ Invalidate;
|
|
|
|
|
+end;
|
|
|
|
|
+
|
|
|
procedure TBCRadialProgressBar.CalculatePreferredSize(
|
|
procedure TBCRadialProgressBar.CalculatePreferredSize(
|
|
|
var PreferredWidth, PreferredHeight: integer; WithThemeSpace: boolean);
|
|
var PreferredWidth, PreferredHeight: integer; WithThemeSpace: boolean);
|
|
|
begin
|
|
begin
|
|
@@ -196,6 +208,7 @@ procedure TBCRadialProgressBar.RenderControl;
|
|
|
var
|
|
var
|
|
|
textBmp: TBGRABitmap;
|
|
textBmp: TBGRABitmap;
|
|
|
textStr: string;
|
|
textStr: string;
|
|
|
|
|
+ EffectiveLineWidth:single;
|
|
|
begin
|
|
begin
|
|
|
FreeAndNil(FBitmap);
|
|
FreeAndNil(FBitmap);
|
|
|
FBitmap := TBGRABitmap.Create(Width, Height);
|
|
FBitmap := TBGRABitmap.Create(Width, Height);
|
|
@@ -205,7 +218,12 @@ begin
|
|
|
FBitmap.Canvas2D.fillStyle(Color);
|
|
FBitmap.Canvas2D.fillStyle(Color);
|
|
|
FBitmap.Canvas2D.fill;
|
|
FBitmap.Canvas2D.fill;
|
|
|
|
|
|
|
|
- FBitmap.Canvas2D.lineWidth := Height / 50;
|
|
|
|
|
|
|
+ if LineWidth=0 then
|
|
|
|
|
+ EffectiveLineWidth:=Height / 50
|
|
|
|
|
+ else
|
|
|
|
|
+ EffectiveLineWidth:=LineWidth;
|
|
|
|
|
+
|
|
|
|
|
+ FBitmap.Canvas2D.lineWidth := EffectiveLineWidth;
|
|
|
FBitmap.Canvas2D.strokeStyle(LineBkgColor);
|
|
FBitmap.Canvas2D.strokeStyle(LineBkgColor);
|
|
|
FBitmap.Canvas2D.stroke;
|
|
FBitmap.Canvas2D.stroke;
|
|
|
|
|
|
|
@@ -216,7 +234,7 @@ begin
|
|
|
FBitmap.Canvas2D.fillStyle(BGRAPixelTransparent);
|
|
FBitmap.Canvas2D.fillStyle(BGRAPixelTransparent);
|
|
|
FBitmap.Canvas2D.fill;
|
|
FBitmap.Canvas2D.fill;
|
|
|
|
|
|
|
|
- FBitmap.Canvas2D.lineWidth := Height / 50;
|
|
|
|
|
|
|
+ FBitmap.Canvas2D.lineWidth := EffectiveLineWidth;
|
|
|
FBitmap.Canvas2D.strokeStyle(LineColor);
|
|
FBitmap.Canvas2D.strokeStyle(LineColor);
|
|
|
FBitmap.Canvas2D.stroke;
|
|
FBitmap.Canvas2D.stroke;
|
|
|
|
|
|
|
@@ -239,6 +257,7 @@ begin
|
|
|
FValue := 0;
|
|
FValue := 0;
|
|
|
FLineColor := clBlack;
|
|
FLineColor := clBlack;
|
|
|
FLineBkgColor := clSilver;
|
|
FLineBkgColor := clSilver;
|
|
|
|
|
+ FLineWidth:=0;
|
|
|
FFontShadowColor := clBlack;
|
|
FFontShadowColor := clBlack;
|
|
|
FFontShadowOffsetX := 2;
|
|
FFontShadowOffsetX := 2;
|
|
|
FFontShadowOffsetY := 2;
|
|
FFontShadowOffsetY := 2;
|