Class TManyShape (unit Gpshape)

Inherits from

TGraphicControl

Constructors


constructor Create(AOwner: TComponent);



Functions

destructor Destroy;


procedure Paint;


procedure ChangedImage(Sender: TObject);


procedure FillWithBitmap;

presumes region has been set up one could add a transparent bitmap property and SRCAND and SRCPAINT for a cool effect

procedure FillWithGradient;

Draw the gradient fill.

procedure GetShadowRects(var rMainRect,rShadowRect:TRect);

Determine the rectangles for the shape and for the shadow.

procedure PaintDiamond;

canvas.

procedure PaintEllipse;

and draw the outside

Procedure PaintPolyGon;

paints all polygons

procedure PaintRectangle;

and draw the outside

procedure PaintRoundRectangle;

and draw the outside

procedure PaintTriangle;

can't just draw an ellipse, because color will always be white on black.

Procedure PolyGonFromWinProcs(a:array of TPoint;i :integer);

This just let's me call Windows' Polygon, which ignores the extra leftover points in the array.

procedure SetBackColor(Value: TColor);


procedure SetFillDirection(Value : TFillDirection);


procedure SetForeColor(Value: TColor);


procedure SetGradientToColor(Value : TColor);


procedure SetImage(Value: TBitMap);

case

procedure SetInVectorPercent(Value : integer);

invalid

procedure SetOutlineColor(Value: TColor);


procedure SetOutlineStyle(Value: TPenStyle);


procedure SetOutlineWidth(Value: integer);


procedure SetPattern(Value :TBrushStyle);


procedure SetPenBrushForBackground;

Set the canvas brush and pen properties for drawing the background

procedure SetPenBrushForForeground;

Set the canvas brush and pen properties for drawing the foreground

procedure SetPenBrushForGradient;

Set the canvas brush and pen properties for drawing the gradient fill

procedure SetPenBrushForImage;

Set the canvas brush and pen properties for drawing the brush image

procedure SetPenBrushForOutline;

Set the canvas brush and pen properties for drawing the outline

procedure SetPenBrushForShadow;

Set the canvas brush and pen properties for drawing the shadow

procedure SetPointsInPolyGonArray(var v:array of TPoint; l,t,w,h,offsetleft,offsettop : integer);

build the array of polygon points

procedure SetRoundPerc(Value: integer);

case

procedure SetShadowColor(Value: TColor);


procedure SetShadowDepth(Value: integer);

invalid

procedure SetShadowFill(Value:TShadowFill);


procedure SetShadowOrient(Value: TShadowOrient);


procedure SetShape(Value: TGPShapeType);


procedure SetStartingAngle(Value : integer);

invalid

procedure SetSurfaceType(Value : TSurfaceType);


procedure SetVectors(Value : integer);


Properties

property Align :


property BackColor : TColor


property FillDirection : TFillDirection


property ForeColor : TColor


property GradientToColor : Tcolor


property Image : TBitMap


property InVectorPercent : integer


property OutlineColor : TColor


property OutlineStyle : TPenStyle


property OutlineWidth : integer


property Pattern : TBrushStyle


property PopupMenu :


property RoundPerc : integer


property ShadowColor : TColor


property ShadowDepth : integer


property ShadowFill : TShadowFill


property ShadowOrient : TShadowOrient


property Shape : TGPShapeType


property StartingAngle : integer


property SurfaceType : TSurfaceType


property Vectors : integer


Events

event OnClick :


event OnDblClick :


event OnDragDrop :


event OnDragOver :


event OnMouseDown :


event OnMouseMove :


event OnMouseUp :


Variables

FBackColor : TColor;


FFillDirection : TFillDirection;


FForeColor : TColor;


FGradientToColor : Tcolor;


FImage : TBitmap;


FInVectorPercent : integer;


FOutlineColor : TColor;


FOutlineStyle : TPenStyle;


FOutlineWidth : integer;


FPattern : TBrushStyle;


FReserved : Byte;


FRoundPerc : integer;


FShadowColor : TColor;


FShadowDepth : integer;


FShadowFill : TShadowFill;


FShadowOrient : TShadowOrient;


FShape : TGPShapeType;


FStartingAngle : integer;


FSurfaceType : TSurfaceType;


FVectors : integer;



Constructors


constructor Create(AOwner: TComponent);


Functions


destructor Destroy;


procedure Paint;


procedure ChangedImage(Sender: TObject);


procedure FillWithBitmap;

presumes region has been set up one could add a transparent bitmap property and SRCAND and SRCPAINT for a cool effect


procedure FillWithGradient;

Draw the gradient fill. This could really be improved by using more colors (see Neil Rubenking's book). Presumes region has been set up.


procedure GetShadowRects(var rMainRect,rShadowRect:TRect);

Determine the rectangles for the shape and for the shadow. Both rectangles are Width-FShadowDepth wide and Height-FShadowDepth High, and are placed according to FShadowOrient. TShadowOrient = (soNone,soLowerRight,soUpperRight,soUpperLeft,soLowerLeft);


procedure PaintDiamond;

canvas.rectangle(rs.left,rs.top,rs.right,rs.bottom);


procedure PaintEllipse;

and draw the outside


Procedure PaintPolyGon;

paints all polygons


procedure PaintRectangle;

and draw the outside


procedure PaintRoundRectangle;

and draw the outside


procedure PaintTriangle;

can't just draw an ellipse, because color will always be white on black. Windows bug?


Procedure PolyGonFromWinProcs(a:array of TPoint;i :integer);

This just let's me call Windows' Polygon, which ignores the extra leftover points in the array. I know I could use ASM, but I didn't, (Wish they had a Slice() in Delphi 16)


procedure SetBackColor(Value: TColor);


procedure SetFillDirection(Value : TFillDirection);


procedure SetForeColor(Value: TColor);


procedure SetGradientToColor(Value : TColor);


procedure SetImage(Value: TBitMap);

case


procedure SetInVectorPercent(Value : integer);

invalid


procedure SetOutlineColor(Value: TColor);


procedure SetOutlineStyle(Value: TPenStyle);


procedure SetOutlineWidth(Value: integer);


procedure SetPattern(Value :TBrushStyle);


procedure SetPenBrushForBackground;

Set the canvas brush and pen properties for drawing the background


procedure SetPenBrushForForeground;

Set the canvas brush and pen properties for drawing the foreground


procedure SetPenBrushForGradient;

Set the canvas brush and pen properties for drawing the gradient fill


procedure SetPenBrushForImage;

Set the canvas brush and pen properties for drawing the brush image


procedure SetPenBrushForOutline;

Set the canvas brush and pen properties for drawing the outline


procedure SetPenBrushForShadow;

Set the canvas brush and pen properties for drawing the shadow


procedure SetPointsInPolyGonArray(var v:array of TPoint; l,t,w,h,offsetleft,offsettop : integer);

build the array of polygon points


procedure SetRoundPerc(Value: integer);

case


procedure SetShadowColor(Value: TColor);


procedure SetShadowDepth(Value: integer);

invalid


procedure SetShadowFill(Value:TShadowFill);


procedure SetShadowOrient(Value: TShadowOrient);


procedure SetShape(Value: TGPShapeType);


procedure SetStartingAngle(Value : integer);

invalid


procedure SetSurfaceType(Value : TSurfaceType);


procedure SetVectors(Value : integer);


Properties


property Align :


property BackColor : TColor


property FillDirection : TFillDirection


property ForeColor : TColor


property GradientToColor : Tcolor


property Image : TBitMap


property InVectorPercent : integer


property OutlineColor : TColor


property OutlineStyle : TPenStyle


property OutlineWidth : integer


property Pattern : TBrushStyle


property PopupMenu :


property RoundPerc : integer


property ShadowColor : TColor


property ShadowDepth : integer


property ShadowFill : TShadowFill


property ShadowOrient : TShadowOrient


property Shape : TGPShapeType


property StartingAngle : integer


property SurfaceType : TSurfaceType


property Vectors : integer


Events


event OnClick :


event OnDblClick :


event OnDragDrop :


event OnDragOver :


event OnMouseDown :


event OnMouseMove :


event OnMouseUp :


Variables


FBackColor : TColor;


FFillDirection : TFillDirection;


FForeColor : TColor;


FGradientToColor : Tcolor;


FImage : TBitmap;


FInVectorPercent : integer;


FOutlineColor : TColor;


FOutlineStyle : TPenStyle;


FOutlineWidth : integer;


FPattern : TBrushStyle;


FReserved : Byte;


FRoundPerc : integer;


FShadowColor : TColor;


FShadowDepth : integer;


FShadowFill : TShadowFill;


FShadowOrient : TShadowOrient;


FShape : TGPShapeType;


FStartingAngle : integer;


FSurfaceType : TSurfaceType;


FVectors : integer;