CGContext « graphics « iPhone iPad Media Q&A

Home
iPhone iPad Media Q&A
1.animation
2.audio
3.AVAudioPlayer
4.box2d
5.cocos2d
6.CoreGraphics
7.CorePlot
8.Flash
9.graphics
10.icon
11.image
12.photo
13.plot
14.sound
15.video
iPhone iPad Media Q&A » graphics » CGContext 

1. CGContext Optimization    stackoverflow.com

I have a small run speed problem. On load, I generate a CGMutablePath containing at least 1000 points. I want to scroll this path on the screen, so I use this ...

2. Simple iPhone drawing app with Quartz 2D    stackoverflow.com

I am making a simple iPhone drawing program as a personal side-project. I capture touches event in a subclassed UIView and render the actual stuff to a seperate CGLayer. After each ...

3. CGContextSetShadow produces no results    stackoverflow.com

I'm using this code in my UIView subclass to draw a circle with a gradient fill:

- (void)drawRect:(CGRect)rect {
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetShadow (context, CGSizeMake(4,4), ...

4. How would I draw something like this in Core Graphics    stackoverflow.com

I want to be able to draw using this as my stroke. How would I do this as efficient as possible, and on the fly drawing, I was thinking CGPatternRef, but ...

5. Drawing triangle/arrow on a line with CGContext    stackoverflow.com

I am using the framework of route-me for working with locations. In this code the path between two markers(points) will be drawn as a line. My Question: "What code should I add if ...

6. Drawing custom graphics on the iPhone: CALayer vs. CGContext    stackoverflow.com

I have an application in which I'm doing some custom drawing, a bunch of lines on a gradient background, like so (ignore the text, they're just UILabels): http://prehensile.co.uk/outgoing/Screenshot2010-06-09at12.22.32.png At the moment, ...

7. Quartz 2D: draw from a CGContext to another CGContext    stackoverflow.com

I have a CGBitmapContext (bitmapContext) and I would like to draw some rectangle part (rect) of it to the current CGContext (context). Right now I do that way:

CGContextRef context = UIGraphicsGetCurrentContext();
CGImageRef cgImage ...

8. Draw a line in iPhone , Exception    stackoverflow.com

Im trying to draw a line . I wrote a code like below.

UIColor *currentColor = [UIColor blackColor];

CGContextRef context = UIGraphicsGetCurrentContext(); 
CGContextSetLineWidth(context, 2.0);
CGContextSetStrokeColorWithColor(context, currentColor.CGColor);
CGContextMoveToPoint(context, startingPoint.x, startingPoint.y);
CGContextAddLineToPoint(context,endingPoint.x , endingPoint.y);
CGContextStrokePath(context);
but this shows exception ...

9. CGContext pdf page aspect fit    stackoverflow.com

I am displaying a pdf page on the CGContext using the code

- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)context
{
    CGContextSetRGBFillColor(ctx, 1.0, 1.0, 1.0, 1.0);
    CGContextFillRect(ctx, layer.bounds);
    ...

10. Drawing a color map with Core Graphics    stackoverflow.com

I'm trying to figure out how to draw a color map like this: http://www.ritsplasman.com/images/colormap.png I know Core Graphics has two functions that deal with gradients: CGContextDrawLinearGradient and CGContextDrawRadialGradient. A radial ...

11. Color a black/white image using Core Graphics    stackoverflow.com

I have a PNG with a black/white image (myImage). Parts of the image are transparent. I want to color the black/white parts (with myColor), and the transparent parts have to remain ...

12. Copy CGContext into another CGContext    stackoverflow.com

I am performing some CG drawing operations into a CGContext that I created for an MKMapOverlayView. After drawing into my context, I create an image and paste it into the ...

13. CGContextRef with two frame    stackoverflow.com

I have two frames with point and lines on them that i would like to do a fill with. Does CGContextRef work will with filling if the two point of lines ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.