Questions tagged [quartz-graphics]

Quartz is graphic framework used on Mac OS X. It forms a graphic layer. Term Quartz is used to represent Quartz 2D and Quartz Compositor. Quartz graphic is a 2D renderer in Core Graphics.

1214 questions
18
votes
6 answers

How to Get the Display Name with the Display ID in Mac OS X?

I was wondering if you could help me figure out how to progmatically get the Display Name for a monitor by using its Display ID number in Mac OS X (10.5)? A requirement is if I give a function the Display ID, it'll provide the Display Name in…
Dave
17
votes
5 answers

UIImageWriteToSavedPhotosAlbum save as PNG with transparency?

I'm using UIImageWriteToSavedPhotosAlbum to save a UIImage to the user's photo album. The problem is that the image doesn't have transparency and is a JPG. I've got the pixel data set correctly to have transparency, but there doesn't seem to be a…
Eli
  • 4,874
  • 6
  • 41
  • 50
17
votes
2 answers

CALayer Resize is slow

I am having some performance issues with some code that I have written for resizing a CALayer using touch. It works fine but the animation is far from snappy enough and lags behind the touch location. CGPoint startPoint; CALayer *select; -…
EcksMedia
  • 461
  • 2
  • 5
  • 20
16
votes
4 answers

Cannot create PDF document with 400+ pages on iOS

I am using the following pseudocode to generate a PDF document: CGContextRef context = CGPDFContextCreateWithURL(url, &rect, NULL); for (int i = 1; i <= N; i++) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; …
TP.
  • 740
  • 7
  • 17
16
votes
6 answers

How do you load a local jpeg or png image file into an iPhone app?

Or I should ask why is it so difficult for me? The answer is probably that I'm new to iPhone development and I'm trying to ditch my old methods and step into the new platform of the future. From start to finish, I have a few questions about this…
BeachRunnerFred
  • 18,070
  • 35
  • 139
  • 238
15
votes
1 answer

In Objective-C (OS X), is the "global display" coordinate space used by Quartz Display Services the same as Cocoa's "screen" coordinate space?

I'm attempting to create an image "loupe" for my application that can be used to inspect images at different magnification levels, and I have run into a bit of a road bump. I'm using Quartz to create a CGImageRef snapshot of a selected portion of…
Ben Stock
  • 1,986
  • 1
  • 22
  • 30
15
votes
5 answers

Is it possible to alter the letter-spacing/kerning of a font with Cocoa Touch?

I've been scouring the Internet for a while now for information on how one can alter the letter-spacing/kerning of a font within UIKit. My fear is, that like using your own custom fonts, you simply can't. Which would be terrible news. I know Apple…
Tricky
  • 7,025
  • 5
  • 33
  • 43
14
votes
2 answers

how to compute the control points for a smooth path given a set of points?

I am using UIBezierPath, but this question concerns control points for the paths, not the drawing. Given a set of points, I can render a path. However, I have not been able to figure out how to calculate the control points to have a smooth line like…
akaru
  • 6,299
  • 9
  • 63
  • 102
14
votes
1 answer

Mac OS X public APIs for checking/requiring HDCP/DPCP protection?

Are there any public APIs in Mac OS X for checking the High-bandwidth Digital Content Protection (HDCP), and/or Display Port Content Protection (DPCP) compliance of connected displays, or for requiring that your application's output only be…
Spiff
  • 608
  • 4
  • 11
14
votes
1 answer

What does kCGWindowSharingState actually do?

If you call CGWindowListCopyWindowInfo(), the CFDictionaryRef that you get back contains a number of keys and values. One of these is kCGWindowSharingState, which has three possible values: Window Sharing Constants Specifies whether and how windows…
Mark Bessey
  • 19,598
  • 4
  • 47
  • 69
14
votes
3 answers

How can I get a list of all windows, currently on the screen, in swift?

How can I get a list of all windows, currently on the screen, in swift? (all examples are preceded by import Cocoa) In objective-c I can run the following code successfully: CFArrayRef windowList =…
m3o
  • 3,881
  • 3
  • 35
  • 56
14
votes
6 answers

CGEventPost - possible bug when simulating keyboard events?

I have a very simple chunk of code that is designed to simulate keyboard events. The simple example below should type "Cz" - the shift key goes down, the c key goes down, c comes up and shift comes up. Then the z key goes down and up. It seems…
Ben Packard
  • 26,102
  • 25
  • 102
  • 183
14
votes
4 answers

Using cornerRadius on a UIImageView in a UITableViewCell

I'm using a UIImageView for each of my UITableViewCells, as thumbnails. My code uses SDWebImage to asynchronously grab those images from my backend and load them in, and then caching them. This is working fine. My UIImageView is a 50x50 square,…
swiftcode
  • 3,039
  • 9
  • 39
  • 64
14
votes
5 answers

CALayer delegate method drawLayer not getting called

My object a sub class of NSObject has CALayer instance variable. I use it for drawing and caching content with its delegate set to my object. But for some reason drawLayer:inContext: method NEVER gets called. Whereas actionForLayer:forKey:…
Roby
14
votes
5 answers

How to figure out the resolution (DPI) of images embedded in a PDF document?

I have a PDF document that also contains images. Now I want to know the resolution of these images. A first step would be to somehow get the images out of the PDF document. But how? Is that even possible with something provided in Cocoa?
Daniel
  • 1,473
  • 3
  • 33
  • 63