Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Draw
- {
- public static void Gradient(Graphics g, Color c1, Color c2, int x, int y, int width, int height)
- {
- Rectangle R = new Rectangle(x, y, width, height);
- using (LinearGradientBrush T = new LinearGradientBrush(R, c1, c2, LinearGradientMode.Vertical))
- {
- g.FillRectangle(T, R);
- }
- }
- public static void Blend(Graphics g, Color c1, Color c2, Color c3, float c, int d, int x, int y, int width, int height)
- {
- ColorBlend V = new ColorBlend(3);
- V.Colors = new Color[] {c1, c2, c3};
- V.Positions = new float[] {0F, c, 1F};
- Rectangle R = new Rectangle(x, y, width, height);
- using (LinearGradientBrush T = new LinearGradientBrush(R, c1, c1, (LinearGradientMode)d))
- {
- T.InterpolationColors = V;
- g.FillRectangle(T, R);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement