|
@@ -135,6 +135,7 @@ type
|
|
|
|
|
|
|
|
published
|
|
published
|
|
|
property Align;
|
|
property Align;
|
|
|
|
|
+ property BorderSpacing;
|
|
|
property Caption;
|
|
property Caption;
|
|
|
property Color;
|
|
property Color;
|
|
|
property Cursor;
|
|
property Cursor;
|
|
@@ -402,7 +403,7 @@ begin
|
|
|
|
|
|
|
|
|
|
|
|
|
FBitmap.Canvas2D.resetTransform;
|
|
FBitmap.Canvas2D.resetTransform;
|
|
|
- FBitmap.Canvas2D.translate(FBitmap.Width / 2, FBitmap.Height / 2);
|
|
|
|
|
|
|
+ FBitmap.Canvas2D.translate((FBitmap.Width-1)/2, (FBitmap.Height-1)/2);
|
|
|
FBitmap.Canvas2D.rotate(pi15);
|
|
FBitmap.Canvas2D.rotate(pi15);
|
|
|
|
|
|
|
|
if FLineWidth = 0 then
|
|
if FLineWidth = 0 then
|
|
@@ -437,7 +438,7 @@ begin
|
|
|
if FDrawText and FDrawTextPhong then
|
|
if FDrawText and FDrawTextPhong then
|
|
|
begin
|
|
begin
|
|
|
TextStr := IntToStr(FValue);
|
|
TextStr := IntToStr(FValue);
|
|
|
- TextBmp := TextShadow(EffectiveSize, EffectiveSize, TextStr, Font.Height,
|
|
|
|
|
|
|
+ TextBmp := TextShadow(FBitmap.Width, FBitmap.Height, TextStr, Font.Height,
|
|
|
Font.Color, FontShadowColor, FontShadowOffsetX,
|
|
Font.Color, FontShadowColor, FontShadowOffsetX,
|
|
|
FontShadowOffsetY, FontShadowRadius, Font.Style, Font.Name) as TBGRABitmap;
|
|
FontShadowOffsetY, FontShadowRadius, Font.Style, Font.Name) as TBGRABitmap;
|
|
|
TextSize:= TextBmp.TextSize(TextStr);
|
|
TextSize:= TextBmp.TextSize(TextStr);
|
|
@@ -456,7 +457,7 @@ begin
|
|
|
|
|
|
|
|
if rDrawCaption and rDrawCaptionPhong then
|
|
if rDrawCaption and rDrawCaptionPhong then
|
|
|
begin
|
|
begin
|
|
|
- TextBmp := TextShadow(EffectiveSize, EffectiveSize, Caption, Font.Height,
|
|
|
|
|
|
|
+ TextBmp := TextShadow(FBitmap.Width, FBitmap.Height, Caption, Font.Height,
|
|
|
Font.Color, FontShadowColor, FontShadowOffsetX,
|
|
Font.Color, FontShadowColor, FontShadowOffsetX,
|
|
|
FontShadowOffsetY, FontShadowRadius, Font.Style, Font.Name) as TBGRABitmap;
|
|
FontShadowOffsetY, FontShadowRadius, Font.Style, Font.Name) as TBGRABitmap;
|
|
|
TextSize:= TextBmp.TextSize(Caption);
|
|
TextSize:= TextBmp.TextSize(Caption);
|
|
@@ -504,9 +505,9 @@ begin
|
|
|
Phong.Free;
|
|
Phong.Free;
|
|
|
Blur.Free;
|
|
Blur.Free;
|
|
|
|
|
|
|
|
- Mask := TBGRABitmap.Create(EffectiveSize, EffectiveSize, BGRABlack);
|
|
|
|
|
- Mask.FillEllipseAntialias(EffectiveSize div 2, EffectiveSize div 2, EffectiveSize div 2, EffectiveSize div 2, BGRAWhite);
|
|
|
|
|
- Mask2 := TBGRABitmap.Create(EffectiveSize, EffectiveSize, ColorToBGRA(ColorToRGB(FBkgColor)));
|
|
|
|
|
|
|
+ Mask := TBGRABitmap.Create(FBitmap.Width, FBitmap.Height, BGRABlack);
|
|
|
|
|
+ Mask.FillEllipseAntialias((FBitmap.Width-1)/2, (FBitmap.Height-1)/2, EffectiveSize div 2, EffectiveSize div 2, BGRAWhite);
|
|
|
|
|
+ Mask2 := TBGRABitmap.Create(FBitmap.Width, FBitmap.Height, ColorToBGRA(ColorToRGB(FBkgColor)));
|
|
|
Mask2.PutImage(0, 0, FBitmap, dmSet);
|
|
Mask2.PutImage(0, 0, FBitmap, dmSet);
|
|
|
Mask2.ApplyMask(Mask);
|
|
Mask2.ApplyMask(Mask);
|
|
|
Mask.Free;
|
|
Mask.Free;
|
|
@@ -518,7 +519,7 @@ begin
|
|
|
if FDrawText and not FDrawTextPhong then
|
|
if FDrawText and not FDrawTextPhong then
|
|
|
begin
|
|
begin
|
|
|
TextStr := IntToStr(FValue);
|
|
TextStr := IntToStr(FValue);
|
|
|
- TextBmp := TextShadow(EffectiveSize, EffectiveSize, TextStr, Font.Height,
|
|
|
|
|
|
|
+ TextBmp := TextShadow(FBitmap.Width, FBitmap.Height, TextStr, Font.Height,
|
|
|
Font.Color, FontShadowColor, FontShadowOffsetX,
|
|
Font.Color, FontShadowColor, FontShadowOffsetX,
|
|
|
FontShadowOffsetY, FontShadowRadius, Font.Style, Font.Name) as TBGRABitmap;
|
|
FontShadowOffsetY, FontShadowRadius, Font.Style, Font.Name) as TBGRABitmap;
|
|
|
TextSize:= TextBmp.TextSize(TextStr);
|
|
TextSize:= TextBmp.TextSize(TextStr);
|
|
@@ -537,7 +538,7 @@ begin
|
|
|
|
|
|
|
|
if rDrawCaption and not(rDrawCaptionPhong) then
|
|
if rDrawCaption and not(rDrawCaptionPhong) then
|
|
|
begin
|
|
begin
|
|
|
- TextBmp := TextShadow(EffectiveSize, EffectiveSize, Caption, Font.Height,
|
|
|
|
|
|
|
+ TextBmp := TextShadow(FBitmap.Width, FBitmap.Height, Caption, Font.Height,
|
|
|
Font.Color, FontShadowColor, FontShadowOffsetX,
|
|
Font.Color, FontShadowColor, FontShadowOffsetX,
|
|
|
FontShadowOffsetY, FontShadowRadius, Font.Style, Font.Name) as TBGRABitmap;
|
|
FontShadowOffsetY, FontShadowRadius, Font.Style, Font.Name) as TBGRABitmap;
|
|
|
TextSize:= TextBmp.TextSize(Caption);
|
|
TextSize:= TextBmp.TextSize(Caption);
|