GDI + Learning Record (19): Path-Path

Source: Internet
Author: User
// Draw and fill the path var G: tgpgraphics; Path: tgpgraphicspath; P: tgppen; SB: tgpsolidbrush; begin G: = tgpgraphics. create (canvas. handle); P: = tgppen. create (makecolor (128,255,), 4); SB: = tgpsolidbrush. create (makecolor (128,255,255, 0); Path: = tgpgraphicspath. create; Path. startfigure; Path. addline (makepoint (11,11), makepoint (222,111); Path. addbesuppliers (makepoint (33,111), makepoint (111,111), makepoint (), makepoint (); Path. closefigure; G. drawpath (p, PATH); G. fillpath (SB, PATH); p. free; sb. free; Path. free; G. free; end;
  
   
 // The inflection point in the path is combined with var g: tgpgraphics; P: tgppen; Path: tgpgraphicspath; P1, P2, P3: tgppoint; begin G: = tgpgraphics. create (canvas. handle); P: = tgppen. create (makecolor (255, 0, 0,255), 8); Path: = tgpgraphicspath. create; p1.x: = 50; p1.y: = 200; p2.x: = 100; p2.y: = 200; p3.x: = 100; p3.y: = 250; Path. addline (P1, P2); Path. addline (P2, P3); p. setlinejoin (linejoinbevel); {set with style} G. drawpath (p, PATH); Path. free; p. free; G. free; end;
  
   
 

Inflection Point combination style in path:

Delphi Microsoft description
linejoinbevel bevel specifies a diagonal join. This produces an angle.
linejoinmiter miter specifies the oblique join. This will generate an acute angle or a cut angle, depending on whether the length of the Oblique join exceeds the limit of the Oblique join.
linejoinmiterclipped miterclipped specifies the oblique join. This produces an acute angle or oblique angle, depending on whether the length of the Oblique link exceeds the oblique link limit.
linejoinround round specifies a circular join. This will generate a smooth arc between the two lines.

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.