CraftSynth.ImageEditor – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System.Drawing; |
2 | using System.Drawing.Drawing2D; |
||
3 | |||
4 | namespace CraftSynth.ImageEditor |
||
5 | { |
||
6 | public class FillBrushes |
||
7 | { |
||
8 | #region Enumerations |
||
9 | public enum BrushType |
||
10 | { |
||
11 | Brown, |
||
12 | Aqua, |
||
13 | GrayDivot, |
||
14 | RedDiag, |
||
15 | ConfettiGreen, |
||
16 | NoBrush, |
||
17 | NumberOfBrushes |
||
18 | } ; |
||
19 | #endregion Enumerations |
||
20 | |||
21 | public static Brush SetCurrentBrush(BrushType _bType) |
||
22 | { |
||
23 | Brush b = null; |
||
24 | switch (_bType) |
||
25 | { |
||
26 | case BrushType.Aqua: |
||
27 | b = AquaBrush(); |
||
28 | break; |
||
29 | case BrushType.Brown: |
||
30 | b = BrownBrush(); |
||
31 | break; |
||
32 | case BrushType.ConfettiGreen: |
||
33 | b = ConfettiBrush(); |
||
34 | break; |
||
35 | case BrushType.GrayDivot: |
||
36 | b = GrayDivotBrush(); |
||
37 | break; |
||
38 | case BrushType.RedDiag: |
||
39 | b = RedDiagBrush(); |
||
40 | break; |
||
41 | default: |
||
42 | break; |
||
43 | } |
||
44 | return b; |
||
45 | } |
||
46 | |||
47 | private static Brush BrownBrush() |
||
48 | { |
||
49 | return new SolidBrush(Color.Brown); |
||
50 | } |
||
51 | |||
52 | private static Brush AquaBrush() |
||
53 | { |
||
54 | return new SolidBrush(Color.Aqua); |
||
55 | } |
||
56 | |||
57 | private static Brush GrayDivotBrush() |
||
58 | { |
||
59 | return new HatchBrush(HatchStyle.Divot, Color.Gray, Color.Gainsboro); |
||
60 | } |
||
61 | |||
62 | private static Brush RedDiagBrush() |
||
63 | { |
||
64 | return new HatchBrush(HatchStyle.ForwardDiagonal, Color.Red, Color.Yellow); |
||
65 | } |
||
66 | |||
67 | private static Brush ConfettiBrush() |
||
68 | { |
||
69 | return new HatchBrush(HatchStyle.LargeConfetti, Color.Green, Color.White); |
||
70 | } |
||
71 | } |
||
72 | } |