quartz-2d

Erase operation in quartz 2D

Any suggestions on how to perform erase operations in Quartz 2D? ...

Drawing formulas with Quartz 2d

In my iPhone App I'd like to draw a few formulas. How can I manage that with quartz 2d? Is there a way to build formulas like for example in latex? Or are there any existing frameworks? Thanks. ...

Quartz 2D animating text?

i have to animate text around a circle. The text will also scale up/down. Whats the best approach to accomplish this? (i am using Quartz 2D) My approach is: -- Calculate point using sin and cos methods. -- Move Pen there and draw text with alpha and size. -- Clear the screen -- Calculate next point using sin and cos methods. -- Move pe...

CGContextShowTextAtPoint: invalid context

I want to call a method responsible for drawing text on screen after each 5 seconds. Here is my code -(void) handleTimer: (NSTimer *)timer { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGContextSetStrokeColorWithColor(context, currentColor.CGColor); CGContextTranslateC...

Quartz 2D's drawing text and NSTimer in custom method

i want to show text using quartz 2d. Text will be drawing randomly on different position after each 1 seconds. I am not sure how i can use NSTimer with quartz 2D text. I can draw text in drawRect method where graphics context is already available. How i will draw text using my custom method myDraw which will be called after 1 second usin...

iphone quartz 2d easeoutBounce animation on text.

Scenario: I have created an app that show text randomly on iphone. After each 1 second, some 60-100 characters are drawn on screen using quartz 2d graphics. (OK thats easy). I want when the last character is shown it should be animated in easeoutBounce style. 1)How i will get the easeoutBounce effect? (You can check jquery easing plug...

Touch draw in Quatz 2D/Core Graphics

Hello, I'm trying to implement "hand draw tool". At the moment algorythm looks like that (I don't insert any code because methods are quite big, will try to explain an idea): Drawing In touchesStarted: method I create NSMutableArray *pointsArray and add point into it. Call setNeedsDisplay: method. In touchesMoved: method I calculate ...

quartz 2d multiple UIViews

I want to create two UIViews in quartz 2D application. First UIView for static text, it will redraw automatically after each one second. Second UIView for animated text, it will be redrawn automatically after each .1 second. How can i create multiple Views/Layers? Is there drawRect methods will be different? ...

Quartz 2D Layers

I want to create 2 separate layers using quartz 2D. Can i handle there redraw methods separately? so that i can redraw 1 layer without redrawing the whole screen or other layers. Is it possible? any code sample? ...

Rollback drawRect:

Hi. Is there any way to quit from drawRect: without refresh the current UIView? For example: - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0); CGContextSetLineWidth(context, 2); CGContextMoveToPoint(context, 10.0, 30.0); CGContextAddLineToPo...

Apple iPad and PDF support

Hi, I have few questions related to the PDF and its use on the Apple iPad: 1) Does the iPad support all Quartz PDF functions (i.e. all CGPDFxxx functions/classes)? 2) Does the iPad support the PDF Kit? 3) Is it possible with any of one of both APIs, based on the coordinates of the finger touch to detect the underlying PDF item (e.g. ...

[iPhone SDK] Edit alpha of cgimage on touch

Hello, I have two uiimageview, i need to have the imageview transparent under the touch point..(with a circle)...to be able to see the image under the first one.. Can you share me some code or examples? Thanks! ...

should i learn Quartz for iphone game programming?

Hi all..I wanna learn and develop 2d game on iphone but i don't know if i should learn Quartz 2d first, or i can just jump into openGL ES directly? ...

drawing images and lines over UIScrollView

I'm programming an app in which one of the ViewControllers is showing an UIScrollView that shows an image. I'd like to load an image (pushpin in png format) and draw it (and delete it) in some points of the UIScrollView image. I'd also would like to draw bezier paths in that image (and deleting them). I've programmed several apps but...

Is Quartz 2D the right choice for iPad Game

I need to make a game with a tool bar of shapes that can be dragged on screen with the following functionality shapes can be copied shapes can be stretched and resized shapes can be rotated shape color can change shapes can be cut in half and each half is now its own shape is Quartz 2D the right way to approach this? ...

Animation in quartz 2D

I want to create an app which after each 1 second will show 4-5 words on screen but the last word will zoom out/in. I can easily create static words and for the last animating word i need to draw the static again n again. How can i create 2 separate layers so the static text is on one layer ( i will fill it after each second) and the las...

Quartz 2D: draw from a CGContext to another CGContext

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 = CGBitmapContextCreateImage(bitmapContext); CGContextClipToRect(context, rect); CGContextDrawImage(cont...

All colors work except whiteColor

const CGFloat *color = CGColorGetComponents([[UIColor whiteColor] CGColor]); CGContextSetFillColor(context, color); I have black background. While working this above code not sure whats wrong most of the colors work like redColor, purpleColor, greenColor, yellowColor but whiteColor, grayColor does not work. when i use whiteColor screen...

Draw over screen with Quartz

Hi, I'm trying to work out what the best way to draw over the top of all other items on the screen on OS X. I don't want to impede the user's ability to interact with their applications, but want to 'annotate' them. I want to be able to draw up to 20 different annotations. The top half of this screenshot from Gizmodo happens to nicely s...

ipad pdf unreadable text

Hello all, I'm using the Quartz 2d apis to display a pdf document in an iPad app I am currently working on, however the text shows up real funky and is unreadable. The text shows up fine on my laptop so its not an issue with the pdf document itself as far as I know. I'm not sure why the document is displaying like this, any help would ...