Delphi GDI + learning Record (8): Shadow painting Brush

Source: Internet
Author: User

//阴影画刷
var
 g: TGPGraphics;
 hb: TGPHatchBrush;
begin
 g := TGPGraphics.Create(Canvas.Handle);
 hb := TGPHatchBrush.Create(HatchStyleHorizontal, aclRed, aclYellow);
 {参数1是阴影样式; 参数2是前景色; 参数3是背景色, 参数3可选, 默认黑色}
 g.FillEllipse(hb, 11, 11, 222, 111);
 hb.Free;
 g.Free;
end;

Brush Shadow Style sheet:

Delphi Microsoft Description
Hatchstylebackwarddiagonal Backwarddiagonal The line pattern of the diagonal from top right to bottom left.
Hatchstylecross Cross Specifies the cross horizontal and vertical lines.
Hatchstyledarkdownwarddiagonal Darkdownwarddiagonal Specifies the diagonal from the vertex to the right, with an angle of 50% smaller than the forwarddiagonal and twice times the width. This shadow pattern is not antialiasing.
Hatchstyledarkhorizontal Darkhorizontal Specifies that the sides of the horizontal line are 50% smaller than the horizontal and twice times the width of the horizontal.
Hatchstyledarkupwarddiagonal Darkupwarddiagonal Specifies a diagonal line from the vertex to the left, with an angle of 50% smaller than backwarddiagonal and twice times the width, but these lines are not jagged.
Hatchstyledarkvertical Darkvertical Specifies that the angle between the two sides of the vertical line is 50% smaller than the vertical and twice times the width.
Hatchstyledasheddownwarddiagonal Dasheddownwarddiagonal Specifies dashed diagonal lines that tilt from the vertex to the right point.
Hatchstyledashedhorizontal Dashedhorizontal Specifies a dashed horizontal line.
Hatchstyledashedupwarddiagonal Dashedupwarddiagonal Specifies dashed diagonal lines that tilt from the vertex to the left.
Hatchstyledashedvertical Dashedvertical Specifies a dashed vertical line.
Hatchstylediagonalbrick Diagonalbrick Specifies a shadow that has the appearance of a layered brick, which is tilted to the left from the vertex point.
Hatchstylediagonalcross Diagonalcross A pattern of crossed diagonal lines.
Hatchstyledivot Divot Specifies a shadow with a turf layer appearance.
Hatchstyledotteddiamond Dotteddiamond Specifies forward diagonal and reverse diagonal lines that intersect each other, and each diagonal is composed of dots.
Hatchstyledottedgrid Dottedgrid Specifies horizontal and vertical lines that intersect each other, and each line is made up of dots.
Hatchstyleforwarddiagonal ForwardDiagonal The line pattern of the diagonal from top left to bottom right.
Hatchstylehorizontal Horizontal The pattern of the horizontal line.
Hatchstylehorizontalbrick Horizontalbrick Specifies a shadow that has the appearance of a horizontal layered brick.
Hatchstylelargecheckerboard Largecheckerboard Specifies a shadow with a chessboard appearance, which has a smallcheckerboard size of twice times the size of the board.
Hatchstylelargeconfetti Largeconfetti Specifies a shadow with a multicolored confetti appearance, and it is made of a larger slice than the Smallconfetti.
Hatchstylelargegrid Largegrid Specifies the shadow style cross.
Hatchstylelightdownwarddiagonal Lightdownwarddiagonal
Hatchstylelighthorizontal Lighthorizontal Specifies a horizontal line with an angle of 50% smaller than the horizontal.
Hatchstylelightupwarddiagonal Lightupwarddiagonal Specifies a diagonal from the vertex to the left, with an angle of 50% smaller than the backwarddiagonal, but these lines are not jagged.
Hatchstylelightvertical Lightvertical Specifies that the angle between the two sides of the vertical line is 50% smaller than vertical.
Hatchstylemax Max Specifies the shadow style Soliddiamond.
Hatchstylemin Min Specifies the shadow style horizontal.
Hatchstylenarrowhorizontal Narrowhorizontal Specifies that the side angles of the horizontal line are smaller than the shadow style horizontal 75% (or 25% smaller than the lighthorizontal).
Hatchstylenarrowvertical Narrowvertical Specifies that the angle between the two sides of the vertical line is smaller than the shadow style vertical 75% (or 25% smaller than the lightvertical).
Hatchstyleoutlineddiamond Outlineddiamond Specifies forward diagonal and reverse diagonal lines that intersect with each other, but these diagonals are not antialiasing.
HatchStylePercent05 Percent05 Specifies a 5% shadow. The foreground and background colors are 5:100.
HatchStylePercent10 Percent10 Specifies a 10% shadow. The foreground and background colors are 10:100.
HatchStylePercent20 Percent20 Specifies a 20% shadow. The foreground and background colors are 20:100.
HatchStylePercent25 Percent25 Specifies a 25% shadow. The foreground and background colors are 25:100.
HatchStylePercent30 Percent30 Specifies a 30% shadow. The foreground and background colors are 30:100.
HatchStylePercent40 Percent40 Specifies a 40% shadow. The foreground and background colors are 40:100.
HatchStylePercent50 Percent50 Specifies a 50% shadow. The foreground and background colors are 50:100.
HatchStylePercent60 Percent60 Specifies a 60% shadow. The foreground and background colors are 60:100.
HatchStylePercent70 Percent70 Specifies a 70% shadow. The foreground and background colors are 70:100.
HatchStylePercent75 Percent75 Specifies a 75% shadow. The foreground and background colors are 75:100.
HatchStylePercent80 Percent80 Specifies a 80% shadow. The foreground and background colors are 80:100.
HatchStylePercent90 Percent90 Specifies a 90% shadow. The foreground and background colors are 90:100.
Hatchstyleplaid Plaid Specifies a shadow that has the appearance of a plaid material.
Hatchstyleshingle Shingle Specifies a shadow with the appearance of a diagonal layered pebble, which tilts to the right from the vertex to the point.
Hatchstylesmallcheckerboard Smallcheckerboard Specifies a shadow with a checkerboard appearance.
Hatchstylesmallconfetti Smallconfetti Specifies a shadow with a multicolored confetti appearance.
Hatchstylesmallgrid Smallgrid Specifies horizontal and vertical lines that intersect each other, with an angle that is 50% smaller than the shadow style cross.
Hatchstylesoliddiamond Soliddiamond Specifies a shadow that has a checkerboard appearance placed diagonally.
Hatchstylesphere Sphere Specifies a shadow that has the appearance of the sphere adjacent to each other.
Hatchstyletrellis Trellis Specifies a shadow with a frame appearance.
Hatchstylevertical Vertical The pattern of the vertical line.
Hatchstylewave Wave Specifies the horizontal line that is formed by the tilde "~".
Hatchstyleweave Weave Specifies a shadow with a fabric look.
Hatchstylewidedownwarddiagonal Widedownwarddiagonal Specifies the diagonal from the vertex to the right, with the same spacing as the shadow style forwarddiagonal, which is three times times the width, but not jagged.
Hatchstylewideupwarddiagonal Wideupwarddiagonal Specifies a diagonal line from vertex to bottom to the left, with the same spacing as the shadow style backwarddiagonal, three times times the width, but not jagged.
Hatchstylezigzag Zigzag Specifies a horizontal line formed by a zigzag.

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.