quartz-graphics Questions

4

Solved

I'm using the following code to rotate an image, but half the image (down the y-axis) that has been rotated "out of" the page, disappears. How to fix? heading is in radians. CALayer *layer = myUI...
Spritsail asked 19/2, 2011 at 6:1

7

Solved

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 ev...
Valtin asked 24/7, 2012 at 18:22

7

Solved

I found this answer on how to draw rotated text with NSString drawInRect:, but I'm not sure how it works since it only sort of works for me: https://discussions.apple.com/thread/1779814?start=0&amp...
Mariel asked 23/4, 2012 at 23:49

5

Solved

I currently have two UIViews: one of a red background and the other blue. The blue view is a subview of the red view. What I would like to do is be able to "cut" out rectangles on the blue view so ...
Mccall asked 26/9, 2010 at 23:32

6

Solved

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 ...
Calbert asked 6/8, 2009 at 1:4

6

Solved

I need a function that, given a character, returns the CGKeyCode associated with the position of that character on the current keyboard layout. E.g., given "b", it should return kVK_ANSI_B if using...
Puggree asked 17/12, 2009 at 1:0

8

Solved

I'm using CGEventCreateKeyboardEvent and need to know what CGKeyCode values to use. Specifically, I am after the key code for the Command key. The docs give examples for other keys: z is 6, shift ...
Syntax asked 8/7, 2010 at 10:23

5

How can I reproduce this shadowing? My problem, that if I use high alpha color or clearColor, there is no drop shadow, if I use low alpha color, I can't see the drop shadow under the plate. As the ...
Bannister asked 2/6, 2012 at 9:20

5

Solved

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 ...
Cloche asked 28/9, 2009 at 20:41

4

Solved

I have a question regarding rounded corners and text background color for a custom UIView. Basically, I need to achieve an effect like this (image attached - notice the rounded corners on one side...

4

Solved

I'm trying to learn how to use and implement CALayer in a Mac Objective-C application, but I can't seem to probably do the most basic thing - add a new layer and set its background colour/frame siz...
Teresiateresina asked 4/3, 2012 at 3:10

6

Solved

I have a UILabel with black color; i am writing the following code to get black color's components. UIColor *aColor = [aLabel.textColor retain]; const CGFloat* components = CGColorGetComponents(a...
Shinar asked 11/11, 2010 at 14:51

6

Solved

I have an UIButton which is a logo. This logo button will glow on forever but will stop glowing on touch.It is like a glowing animation. Is there any suggestions? Undefined symbols for architec...
Illampu asked 19/7, 2012 at 7:51

3

Solved

I am going to port some screenshot grabbing code (C++) for linux to osx. The current solution run graphical applications in xvfb and then use xlib to grab screenshots from the display. (That will a...
Totality asked 28/2, 2012 at 13:37

4

I have a UIImage (generated by a user drawing) that has a white background. I'd like to make the white portions of this image transparent. I'd also like to save this to a PNG file. I've looked ar...
Adder asked 10/7, 2009 at 7:50

4

Solved

I have a view on which I've set the layerOpacity to 1. theView.layer.shadowOpacity = 1.0; This looks fine when the view is farther down the screen. When I move this view up to be flush with ano...
Landes asked 21/12, 2010 at 18:22

2

How would I programmatically activate i.e move-to-front-and-focus a window on macOS (not belonging to my app) given its Window ID. My app would run with user granted Accessibility permissions etc. ...
Fredericton asked 7/11, 2017 at 7:50

4

Solved

I'm looking for a way to programmatically create stars, sunburst, and other "spiky" effects using UIBezierPath. UIBezierPath *sunbeamsPath = [UIBezierPath bezierPath]; [sunbeamsPath moveToPoint:...
Sherburne asked 1/5, 2012 at 15:26

6

I have read the Apple PDF documentation with Quartz. But I do not know how to generate the thumbnails from a PDF document... Any idea/sample code ?
Lawry asked 21/12, 2010 at 23:11

2

I have to use Quartz X11 window when I want to plot data that is on a remote server (using NX). I'd like to use my iTerm terminal as the interface to this, as it is nicely customized with fonts, th...
Psychogenic asked 30/7, 2015 at 20:45

2

Solved

I'm trying to write a small Objective-C command line tool that adjusts the rotation of a given display. Sadly, I can not find any reference in Apple's documentation that tells how to change the ro...
Chilson asked 25/6, 2013 at 18:46

3

Solved

Scenario: I have a set of CGPaths. They are mostly just lines (i.e. not closed shapes). They are drawn on the screen in a UIView's draw method. How can I check if the user tapped near one of the ...
Desantis asked 17/7, 2009 at 14:41

5

Solved

As I cannot find any questions/answers for this, I imagine it is not possible. Is there anyway to set multiple borders on a UIView. I am currently setting a standard border with .layer.borderWid...
Clayborn asked 16/9, 2013 at 14:41

6

Solved

I would like to create a 1x1 UIImage dynamically based on a UIColor. I suspect this can quickly be done with Quartz2d, and I'm poring over the documentation trying to get a grasp of the fundamenta...
Spoofery asked 13/6, 2009 at 16:26

9

I need to draw an outline for a rounded rectangle. I know I can make lines and arcs, but maybe there is also a function for rounded rects?
Ocreate asked 14/5, 2010 at 15:40

© 2022 - 2025 — McMap. All rights reserved.