Created
September 17, 2014 13:19
-
-
Save jonathanpeppers/b72ca71673b418ab41c6 to your computer and use it in GitHub Desktop.
This file contains 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 | |
UIColor color = UIColor.FromRGBA(1.000f, 1.000f, 1.000f, 1.000f); | |
UIColor color2 = UIColor.FromRGBA(0.110f, 0.110f, 0.110f, 1.000f); | |
UIColor color3 = UIColor.FromRGBA(0.118f, 0.118f, 0.118f, 1.000f); | |
//// Gradient Declarations | |
var customColors = new CGColor [] {color.CGColor, color2.CGColor, color3.CGColor}; | |
var customLocations = new float [] {0, 0.47f, 0.56f}; | |
var custom = new CGGradient(colorSpace, customColors, customLocations); | |
//// Group 32 | |
{ | |
//// Rectangle 9 copy 32 GradientOverlay Drawing | |
UIBezierPath rectangle9Copy32GradientOverlayPath = new UIBezierPath(); | |
rectangle9Copy32GradientOverlayPath.MoveTo(new PointF(70, 208)); | |
rectangle9Copy32GradientOverlayPath.AddLineTo(new PointF(81, 208)); | |
rectangle9Copy32GradientOverlayPath.AddLineTo(new PointF(81, 558)); | |
rectangle9Copy32GradientOverlayPath.AddLineTo(new PointF(70, 558)); | |
rectangle9Copy32GradientOverlayPath.AddLineTo(new PointF(70, 208)); | |
rectangle9Copy32GradientOverlayPath.ClosePath(); | |
context.SaveState(); | |
rectangle9Copy32GradientOverlayPath.AddClip(); | |
context.DrawLinearGradient(custom, | |
new PointF(75.5f, 558), | |
new PointF(75.5f, 208), | |
CGGradientDrawingOptions.DrawsBeforeStartLocation | CGGradientDrawingOptions.DrawsAfterEndLocation); | |
context.RestoreState(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment