¡@

Home 

2014/10/15 ¤U¤È 10:11:40

iphone Programming Glossary: mycolorspace

How to draw a gradient line (fading in/out) with Core Graphics/iPhone?

http://stackoverflow.com/questions/1303855/how-to-draw-a-gradient-line-fading-in-out-with-core-graphics-iphone

context x2 y2 CGContextStrokePath context And I know how to do a gradient rectangle i.g. CGColorSpaceRef myColorspace CGColorSpaceCreateDeviceRGB size_t num_locations 2 CGFloat locations 2 1.0 0.0 CGFloat components 8 0.0 0.0 0.0 1.0 1.0.. 0.0 CGFloat components 8 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 CGGradientRef myGradient CGGradientCreateWithColorComponents myColorspace components locations num_locations CGPoint myStartPoint myEndPoint myStartPoint.x 0.0 myStartPoint.y 0.0 myEndPoint.x 0.0..

UINavigationBar gradient details

http://stackoverflow.com/questions/1852319/uinavigationbar-gradient-details

the tint colored bar CGContextRef context UIGraphicsGetCurrentContext CGFloat locations 2 0.0 1.0 CGColorSpaceRef myColorspace CGColorSpaceCreateDeviceRGB CGFloat topComponents 8 LIGHT_COLOR_COMPONENTS CGGradientRef topGradient CGGradientCreateWithColorComponents.. CGFloat topComponents 8 LIGHT_COLOR_COMPONENTS CGGradientRef topGradient CGGradientCreateWithColorComponents myColorspace topComponents locations 2 CGContextDrawLinearGradient context topGradient CGPointMake 0 0 CGPointMake 0 self.frame.size.height.. CGFloat botComponents 8 MAIN_COLOR_COMPONENTS CGGradientRef botGradient CGGradientCreateWithColorComponents myColorspace botComponents locations 2 CGContextDrawLinearGradient context botGradient CGPointMake 0 self.frame.size.height 2 CGPointMake..

Applying background gradient to a Grouple table cell

http://stackoverflow.com/questions/1979165/applying-background-gradient-to-a-grouple-table-cell

this void drawRect CGRect rect CGContextRef c UIGraphicsGetCurrentContext CGGradientRef myGradient CGColorSpaceRef myColorspace size_t num_locations 2 CGFloat locations 2 0.0 1.0 CGFloat components 8 0.8f 0.8f 0.8f 1.0f Bottom Colour Red Green Blue.. 8 0.8f 0.8f 0.8f 1.0f Bottom Colour Red Green Blue Alpha. 0.9f 0.9f 0.9f 1.0 Top Colour Red Green Blue Alpha. myColorspace CGColorSpaceCreateDeviceRGB myGradient CGGradientCreateWithColorComponents myColorspace components locations num_locations.. Colour Red Green Blue Alpha. myColorspace CGColorSpaceCreateDeviceRGB myGradient CGGradientCreateWithColorComponents myColorspace components locations num_locations CGColorSpaceRelease myColorspace CGPoint startPoint endPoint startPoint.x 0.0 startPoint.y..

Smoothing a rounded stroke in Core Graphics

http://stackoverflow.com/questions/2181279/smoothing-a-rounded-stroke-in-core-graphics

about. Here is the code I a using to generate the cell CGContextRef c UIGraphicsGetCurrentContext CGColorSpaceRef myColorspace CGColorSpaceCreateDeviceRGB CGGradientRef myGradient nil CGFloat components 8 TABLE_CELL_BACKGROUND CGContextSetStrokeColorWithColor.. c path CGContextClip c CGFloat locations 2 0.0 1.0 CGFloat mycomponents 8 TABLE_CELL_BACKGROUND CGColorSpaceRef myColorspace CGColorSpaceCreateDeviceRGB myGradient CGGradientCreateWithColorComponents myColorspace mycomponents locations 2 CGContextDrawLinearGradient.. CGColorSpaceRef myColorspace CGColorSpaceCreateDeviceRGB myGradient CGGradientCreateWithColorComponents myColorspace mycomponents locations 2 CGContextDrawLinearGradient c myGradient CGPointMake minx miny CGPointMake minx maxy 0 CGContextRestoreGState..

Adding glowing effect to the circle

http://stackoverflow.com/questions/1464283/adding-glowing-effect-to-the-circle

CGSizeMake 15 20 2 float myColorValues 1.0 1.0 1.0 .6 3 White shadow colour CGColorRef myColor 4 CGColorSpaceRef myColorSpace 5 CGContextSaveGState myContext 6 CGContextSetShadow myContext myShadowOffset 5 7 Your drawing code here 8 CGContextSetRGBFillColor.. code here 8 CGContextSetRGBFillColor myContext 0 1 0 1 CGContextFillRect myContext CGRectMake wd 3 75 ht 2 wd 4 ht 4 myColorSpace CGColorSpaceCreateDeviceRGB 9 myColor CGColorCreate myColorSpace myColorValues 10 CGContextSetShadowWithColor myContext.. myContext CGRectMake wd 3 75 ht 2 wd 4 ht 4 myColorSpace CGColorSpaceCreateDeviceRGB 9 myColor CGColorCreate myColorSpace myColorValues 10 CGContextSetShadowWithColor myContext myShadowOffset 5 myColor 11 Your drawing code here 12 CGContextSetRGBFillColor..

I am trying to add a drop shadow to a UImageView

http://stackoverflow.com/questions/1943087/i-am-trying-to-add-a-drop-shadow-to-a-uimageview

myContext UIGraphicsGetCurrentContext float myColorValues 0 0 0 darkness 3 CGColorRef myColor 4 CGColorSpaceRef myColorSpace CGContextSaveGState myContext 6 myColorSpace CGColorSpaceCreateDeviceRGB 9 myColor CGColorCreate myColorSpace myColorValues.. float myColorValues 0 0 0 darkness 3 CGColorRef myColor 4 CGColorSpaceRef myColorSpace CGContextSaveGState myContext 6 myColorSpace CGColorSpaceCreateDeviceRGB 9 myColor CGColorCreate myColorSpace myColorValues 10 CGContextSetShadowWithColor myContext.. myColorSpace CGContextSaveGState myContext 6 myColorSpace CGColorSpaceCreateDeviceRGB 9 myColor CGColorCreate myColorSpace myColorValues 10 CGContextSetShadowWithColor myContext myShadowOffset spread myColor 11 Your drawing code here 12 CGContextDrawImage..