Delphi GDI + learning Record (2): Brush line Cap

Source: Internet
Author: User

//线帽
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.