You've already forked lazarus-ccr
* Check for border properties before drawing the border
* Set default value for flat border git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1108 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -152,7 +152,7 @@ type
|
|||||||
property BorderColor: TColor read FBorderColor write SetBorderColor default clWhite;
|
property BorderColor: TColor read FBorderColor write SetBorderColor default clWhite;
|
||||||
{ Ending color of fill }
|
{ Ending color of fill }
|
||||||
property EndColor: TColor read FEndColor write SetEndColor default clBlack;
|
property EndColor: TColor read FEndColor write SetEndColor default clBlack;
|
||||||
property FlatBorder: Boolean read FFlatBorder write SetFlatBorder;
|
property FlatBorder: Boolean read FFlatBorder write SetFlatBorder default False;
|
||||||
{ Direction of fill }
|
{ Direction of fill }
|
||||||
property FillDirection: TFillDirection read FDirection write SetFillDirection default fdLeftToRight;
|
property FillDirection: TFillDirection read FDirection write SetFillDirection default fdLeftToRight;
|
||||||
{ Number of colors to use in the fill (1 - 256) - default is 255. If 1 }
|
{ Number of colors to use in the fill (1 - 256) - default is 255. If 1 }
|
||||||
@ -532,6 +532,8 @@ begin
|
|||||||
|
|
||||||
//Canvas.Textout(FTextLeft, FTextTop, FCaption); *** Enzo *** Implemetation
|
//Canvas.Textout(FTextLeft, FTextTop, FCaption); *** Enzo *** Implemetation
|
||||||
if FFlatBorder then
|
if FFlatBorder then
|
||||||
|
begin
|
||||||
|
if BorderWidth > 0 then
|
||||||
begin
|
begin
|
||||||
Canvas.Pen.Width := BorderWidth;
|
Canvas.Pen.Width := BorderWidth;
|
||||||
Canvas.Pen.EndCap := pecSquare;
|
Canvas.Pen.EndCap := pecSquare;
|
||||||
@ -539,10 +541,13 @@ begin
|
|||||||
//see if there's a better way of drawing a rectangle since
|
//see if there's a better way of drawing a rectangle since
|
||||||
// in BorderWidth >= 3 glitches occurs
|
// in BorderWidth >= 3 glitches occurs
|
||||||
Canvas.Polyline(GetBorderPoints(rp));
|
Canvas.Polyline(GetBorderPoints(rp));
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
if FBevelOuter <> bvNone then
|
||||||
Canvas.Frame3D(rp, 1, FBevelOuter);
|
Canvas.Frame3D(rp, 1, FBevelOuter);
|
||||||
|
if FBevelInner <> bvNone then
|
||||||
Canvas.Frame3D(rp, 1, FBevelInner);
|
Canvas.Frame3D(rp, 1, FBevelInner);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user