Questions tagged [quartz-2d]

Quartz 2D is the primary two-dimensional graphics rendering API for Mac OS X, part of the Core Graphics framework.

Quartz 2D is the primary two-dimensional graphics rendering API for Mac OS X, part of the Core Graphics framework.

From apple official document:

Quartz 2D provides low-level, lightweight 2D rendering with unmatched output fidelity regardless of display or printing device. Quartz 2D is resolution- and device-independent; you don’t need to think about the final destination when you use the Quartz 2D application programming interface (API) for drawing.

The Quartz 2D API is easy to use and provides access to powerful features such as transparency layers, path-based drawing, offscreen rendering, advanced color management, anti-aliased rendering, and PDF document creation, display, and parsing.

The Quartz 2D API is part of the Core Graphics framework, so you may see Quartz referred to as Core Graphics or, simply, CG.

Quartz 2D uses the painter’s model for its imaging. In the painter’s model, each successive drawing operation applies a layer of “paint” to an output “canvas,” often called a page.

For more information:

Related tags:

667 questions
0
votes
1 answer

how to draw text in existing PDF in objective-c without creating new one?

I need to draw some text on existing PDF file pages in objective-c without losing any existing document attributes and outlines. I know we can create new document and draw pages from existing one, but that will not copy all the document attributes…
AmitSri
  • 1,209
  • 1
  • 20
  • 48
0
votes
1 answer

CGPDFPageRef to CGImageRef/NSBitmapImageRep without drawing

I would like to losslessly convert a PDF to a raster image in Objective-C. To do this, there must be no drawing of the PDF into a context. Also, I need to be able to scale the PDF. Any ideas?
Alex Zielenski
  • 3,591
  • 1
  • 26
  • 44
0
votes
3 answers

Best Practice for laying out images for printing in a WYSIWYG Mac app?

I'm in the concept phase of a Mac application that should let the user easily select and layout images for printing. It's a document-based app and a document can have multiple pages with lots of pictures in different sizes and rotations on it. The…
Johannes Fahrenkrug
  • 42,912
  • 19
  • 126
  • 165
0
votes
1 answer

Performance for simple gui elements: quartz 2d or png?

I have some simple buttons in my iOS app. I'm able to draw them propperly with quartz 2d, but I could also use png-slices to build them. What would be nicer to the iPads CPU and allocations?
wasd-wasd
  • 23
  • 5
0
votes
1 answer

Quartz paths not drawing like I expect

I am trying to draw and fill simple paths in Quartz 2d for iPad. The following method from the class SPTCutPattern defines the paths that I want to draw: - (void) initDummyCutPattern { NSArray *piece1Path = [[NSArray alloc] initWithObjects: …
mwiederrecht
  • 85
  • 1
  • 8
0
votes
1 answer

Updating bounds of custom CALayer in drawLayer:inContext:

I've got a custom layer which is sub-layer of something else. The problem is, my layer can't know it's size until I'm in drawLayer:inContext:. When I don't change the bounds/frame of my layer everything draws perfectly. When I add in the the line…
DBD
  • 23,075
  • 12
  • 60
  • 84
0
votes
1 answer

iOS CGImageRef Pixel Shader

I am working on an image processing app for the iOS, and one of the various stages of my application is a vector based image posterization/color detection. Now, I've written the code that can, per-pixel, determine the posterized color, but going…
Georges Oates Larsen
  • 6,812
  • 12
  • 51
  • 67
-1
votes
2 answers

How can you perform an erase function for a certain point in Quartz2d drawing?

I use this code to draw a line in quartz2d CGPoint currentPoint = CGPointMake(rascalImage.center.x, rascalImage.center.y); currentPoint.y += 10; UIGraphicsBeginImageContext(self.view.frame.size); [drawingView.image…
Aspyn
  • 647
  • 1
  • 10
  • 25
-1
votes
1 answer

Need sample code to swing needle in Cocoa/Quartz 2d Speedometer for Mac App

I'm building this to run on the Mac, not iOS - which is quit different. I'm almost there with the speedo, but the math of making the needle move up and down the scale as data is input eludes me. I'm measuring wind speed live, and want to display it…
-1
votes
1 answer

How can I create "QuizUp" similar graphics in ios?

An application in AppStore's name "Quizup" probably know. (https://itunes.apple.com/us/app/quizup-biggest-trivia-game/id718421443) Kind of like game contest application. Competing with other people and if you know you will give points according to…
torun
  • 465
  • 1
  • 5
  • 11
-1
votes
1 answer

Using a quartz composer image effect in iOS app

This seems like a straightforward question but I cant seem to find a definitive answer... If I create a Quartz Composer QTZ file that applies some image library effects (let's say "bloom" and "color invert" as examples) how would I go about…
-1
votes
1 answer

iPhone App - Display pixel data present in buffer on screen

I have the source code for a video decoder application written in C, which I'm now porting on iphone. My problem is as follows: I have RGBA pixel data for a frame in a buffer that I need to display on the screen. My buffer is of type unsigned char.…
Ereka
  • 103
  • 1
  • 10
-1
votes
1 answer

drawRect doesn't draw rect - Objective-C

I just want to draw a rect on a view. This is my code in my UIView subclass: - (void)drawRect:(CGRect)rect { context = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(context, 255.0/255.0, 0.0/255.0, 0.0/255.0, 1); CGContextAddRect(context,…
JimmyYXA
  • 71
  • 6
-1
votes
1 answer

Draw path ontop of UIImageView - Objective-c

I have some circles, labels and buttons in a UIView. I also have an imageView that should show a background picture. So I want the circles (paths) to be on top of the imageView. The label and buttons are on top of the imageview since I arranged them…
JimmyYXA
  • 71
  • 6
-1
votes
2 answers

Quartz 2D -Drawing a point

I know that drawing a point by using drawing a line method in Quartz 2D is CGContextMoveToPoint(context,x,y-0.5f); CGContextAddLineToPoint(context,x,y+0.5f); Is there any other possible way to draw a point using Quartz? I meant, some…
Lithu T.V
  • 19,955
  • 12
  • 56
  • 101
1 2 3
44
45