//线帽
var
g: TGPGraphics;
p: TGPPen;
begin
g := TGPGraphics.Create(Canvas.Handle);
p:= TGPPen.Create(aclBlue, 8);
p.SetStartCap(LineCapArrowAnchor); {起点线帽}
p.SetEndCap(LineCapRoundAnchor); {终点线帽}
g.DrawLine(p, 20, 20, 300, 175);
p.Free;
g.Free;
end;
Line cap Style sheet:
| Delphi |
Microsoft |
Description |
| Linecapanchormask |
Anchormask |
Specifies the mask used to check whether the cap is an anchor cap. |
| Linecaparrowanchor |
Arrowanchor |
Specifies an arrow-like anchor cap. |
| Linecapcustom |
Custom |
Specifies a custom line cap. |
| Linecapdiamondanchor |
Diamondanchor |
Specifies a diamond-shaped anchor head cap. |
| Linecapflat |
Flat |
Specifies a flat line cap. |
| Linecapnoanchor |
Noanchor |
Specifies no anchor. |
| Linecapround |
Round |
Specifies a round line cap. |
| Linecaproundanchor |
Roundanchor |
Specify a round anchor cap. |
| Linecapsquare |
Square |
Specifies the square line cap. |
| Linecapsquareanchor |
Squareanchor |
Designation of the square anchor head cap. |
| Linecaptriangle |
Triangle |
Specifies a triangular line cap. |