SpkToolbar: Apply conventional source formatting

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5383 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-11-26 23:56:34 +00:00
parent 6f72dd9582
commit 49c250890f
15 changed files with 2452 additions and 2521 deletions

View File

@ -18,25 +18,24 @@ interface
uses
Graphics, SysUtils, SpkMath, SpkGUITools;
type TButtonTools = class sealed(TObject)
private
protected
public
class procedure DrawButton(Bitmap: TBitmap;
Rect: T2DIntRect;
FrameColor,
InnerLightColor,
InnerDarkColor,
GradientFrom,
GradientTo: TColor;
GradientKind: TBackgroundKind;
LeftEdgeOpen,
RightEdgeOpen,
TopEdgeOpen,
BottomEdgeOpen: boolean;
Radius: integer;
ClipRect: T2DIntRect);
end;
type
TButtonTools = class sealed(TObject)
public
class procedure DrawButton(Bitmap: TBitmap;
Rect: T2DIntRect;
FrameColor,
InnerLightColor,
InnerDarkColor,
GradientFrom,
GradientTo: TColor;
GradientKind: TBackgroundKind;
LeftEdgeOpen,
RightEdgeOpen,
TopEdgeOpen,
BottomEdgeOpen: boolean;
Radius: integer;
ClipRect: T2DIntRect);
end;
implementation
@ -46,13 +45,12 @@ class procedure TButtonTools.DrawButton(Bitmap: TBitmap;
Rect: T2DIntRect; FrameColor, InnerLightColor, InnerDarkColor, GradientFrom,
GradientTo: TColor; GradientKind: TBackgroundKind; LeftEdgeOpen,
RightEdgeOpen, TopEdgeOpen, BottomEdgeOpen: boolean; Radius: integer;
ClipRect : T2DIntRect);
ClipRect: T2DIntRect);
var
x1, x2, y1, y2: integer;
LeftClosed, TopClosed, RightClosed, BottomClosed: byte;
begin
if (Rect.Width <6 ) or (Rect.Height < 6) or
if (Rect.Width < 6) or (Rect.Height < 6) or
(Rect.Width < 2*Radius) or (Rect.Height < 2*Radius) then exit;
if LeftEdgeOpen then LeftClosed := 0 else LeftClosed := 1;