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;
|
||||
{ Ending color of fill }
|
||||
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 }
|
||||
property FillDirection: TFillDirection read FDirection write SetFillDirection default fdLeftToRight;
|
||||
{ Number of colors to use in the fill (1 - 256) - default is 255. If 1 }
|
||||
@ -533,17 +533,22 @@ begin
|
||||
//Canvas.Textout(FTextLeft, FTextTop, FCaption); *** Enzo *** Implemetation
|
||||
if FFlatBorder then
|
||||
begin
|
||||
Canvas.Pen.Width := BorderWidth;
|
||||
Canvas.Pen.EndCap := pecSquare;
|
||||
Canvas.Pen.Color := FBorderColor;
|
||||
//see if there's a better way of drawing a rectangle since
|
||||
// in BorderWidth >= 3 glitches occurs
|
||||
Canvas.Polyline(GetBorderPoints(rp));
|
||||
if BorderWidth > 0 then
|
||||
begin
|
||||
Canvas.Pen.Width := BorderWidth;
|
||||
Canvas.Pen.EndCap := pecSquare;
|
||||
Canvas.Pen.Color := FBorderColor;
|
||||
//see if there's a better way of drawing a rectangle since
|
||||
// in BorderWidth >= 3 glitches occurs
|
||||
Canvas.Polyline(GetBorderPoints(rp));
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Canvas.Frame3D(rp, 1, FBevelOuter);
|
||||
Canvas.Frame3D(rp, 1, FBevelInner);
|
||||
if FBevelOuter <> bvNone then
|
||||
Canvas.Frame3D(rp, 1, FBevelOuter);
|
||||
if FBevelInner <> bvNone then
|
||||
Canvas.Frame3D(rp, 1, FBevelInner);
|
||||
end;
|
||||
|
||||
if Caption <> '' then begin
|
||||
|
Reference in New Issue
Block a user