Created
September 17, 2014 19:22
-
-
Save jonathanpeppers/3393a15f0b406b73d2c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// General Declarations | |
var colorSpace = CGColorSpace.CreateDeviceRGB(); | |
var context = UIGraphics.GetCurrentContext(); | |
//// Color Declarations | |
var color4 = UIColor.FromRGBA(0.761f, 0.678f, 0.310f, 0.000f); | |
var color5 = UIColor.FromRGBA(0.761f, 0.678f, 0.310f, 0.349f); | |
//// Gradient Declarations | |
var defaultGradientForegroundToTransparentForegroundToTransparentColors = new CGColor [] {color4.CGColor, color5.CGColor}; | |
var defaultGradientForegroundToTransparentForegroundToTransparentLocations = new float [] {0.9f, 1.0f}; | |
var defaultGradientForegroundToTransparentForegroundToTransparent = new CGGradient(colorSpace, defaultGradientForegroundToTransparentForegroundToTransparentColors, defaultGradientForegroundToTransparentForegroundToTransparentLocations); | |
//// Group 6 | |
{ | |
//// Rectangle 19 Drawing | |
UIBezierPath rectangle19Path = new UIBezierPath(); | |
rectangle19Path.MoveTo(new PointF(0.0f, 0.0f)); | |
rectangle19Path.AddLineTo(new PointF(2048.0f, 0.0f)); | |
rectangle19Path.AddLineTo(new PointF(2048.0f, 704.0f)); | |
rectangle19Path.AddLineTo(new PointF(0.0f, 704.0f)); | |
rectangle19Path.AddLineTo(new PointF(0.0f, 0.0f)); | |
rectangle19Path.ClosePath(); | |
context.SaveState(); | |
rectangle19Path.AddClip(); | |
context.DrawLinearGradient(defaultGradientForegroundToTransparentForegroundToTransparent, | |
new PointF(1024.0f, 704.0f), | |
new PointF(1024.0f, 0.0f), | |
CGGradientDrawingOptions.DrawsBeforeStartLocation | CGGradientDrawingOptions.DrawsAfterEndLocation); | |
context.RestoreState(); | |
//// Group 4 | |
{ | |
context.SaveState(); | |
context.TranslateCTM(0.0f, 1456.0f); | |
context.SetAlpha(0.29f); | |
context.BeginTransparencyLayer(); | |
context.EndTransparencyLayer(); | |
context.RestoreState(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment