I don't want to transform the ENTIRE context.
I'm making a game with Quartz, and I'm drawing my player with lines, rects and ellipses.
And then I have diamong.png which I rendered at 0,0 in the top left of the screen.
Problem is...
It renders upside down!
How would I rotate it 180 degrees?
Here's some of my code:
CGImageRef diam...
I'm trying to display a PDF of music using the Quartz 2D calls:
CGPDFDocumentGetPage
and
CGPDFPageGetDrawingTransform
The problem is that some horizontal lines in the PDF get drawn thicker than others. The biggest problem is that I notice this in Preview on the Mac and on iPhone/iPad. Even when viewing this PDF in the iPhone/iPad mail,...
Hi,
I'm relatively new to Objective-C + Quartz and am running into what is probably a very simple issue. I have a custom UIView sub class which I am using to draw simple rectangles via Quartz. However I am trying to hook up an NSTimer so that it draws a new object every second, the below code will draw the first rectangle but will never...
I'm implementing my own NSBitmapImageRep (to draw PBM image files). To draw them, I'm using NSDrawBitmap() and passing it the NSCalibratedBlackColorSpace (as the bits are 1 for black, 0 for white).
Trouble is, I get the following warning:
warning: 'NSCalibratedBlackColorSpace' is deprecated
However, I couldn't find a good replacement...
I have a strange issue where I'm scrolling through a paged UIScrollView which displays the pages of a PDF document (using Quartz 2D and CATiledLayer). When I page through memory allocation looks fine with it going up with a few initial pages and then keeping it steady as it obviously releases the memory kept for earlier pages. Upon hitti...
I've recently asked a question about clipping an image via path at view's drawRect method.
http://stackoverflow.com/questions/2570653/iphone-clip-image-with-path
Krasnyk's code is copied below.
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGMutablePathRef path = CGPathCreateMutable();
/...
I have a plan to make a game using OpenGL for 3D world view, and CALayer(or UIView) for HUD UI.
It's easy to imagine performance degrade from mixing them, but the document which mention this impact disappeared: http://developer.apple.com/iphone/library/technotes/tn2008/tn2230.html
I cannot find the document on current version of SDK refe...
Basically what I want to do is copy the already rendered content (a PDF drawn into the UIView's graphics context using CGContextDrawPDFPage()) onto a similar UIView, without having to re render the PDF. The idea is, that I'd then be able to perform an animated transform on the UIView and later re render the PDF with more accuracy. For bo...
Is there any way of adding jobs to Quartz.Net jobstore without starting up a scheduler instance?
...
I'm using Mac OS X 10.6 SDK ImageKit's IKSaveOptions to add the file format accessory to an NSSavePanel using:
- (id)initWithImageProperties:(NSDictionary *)imageProperties imageUTType:(NSString *)imageUTType;
and
- (void)addSaveOptionsAccessoryViewToSavePanel:(NSSavePanel *)savePanel;
I have tried creating an NSDictionary to speci...
Using Mac OS X API, I'm trying to save a PDF file with a Quartz filter applied, just like it is possible from the "Save As" dialog in the Preview application. So far I've written the following code (using Python and pyObjC, but it isn't important for me):
-- filter-pdf.py: begin
from Foundation import *
from Quartz import *
import objc...
This is quite the iPhone quandry. I am working on a library, but have narrowed down my problem to very simple code. What this code does is create a 50x50 view, applies a rotation transform of a few degrees, then shifts the frame down a few times. The result is the 50x50 view is now much larger looking.
Here's the code:
// a simple 5...
I'm having a little trouble with my MySQL- Connection- Pooling.
This is the case:
Different jobs are scheduled via Quartz. All jobs connect to different databases which works fine the whole day while the nightly scheduled jobs fail with a CommunicationsException...
Quartz-Jobs:
Job1 runs 0 0 6,10,14,18 * * ?
Job2 runs 0 30 10,18 * * ?...
I mean, for pixel position, sizes, etc. It's not like I'll be making a rectangle that's 100 and a half pixels high. These might as well be integers.
...
My goal is to make a program that will draw points whenever the screen is touched. This is what I have so far:
The header file:
#import <UIKit/UIKit.h>
@interface ElSimView : UIView
{
CGPoint firstTouch;
CGPoint lastTouch;
UIColor *pointColor;
CGRect *points;
int npoints;
}
@property CGPoint firstTouch;
@property CGPoint ...
While developing a rounded rectangle widget I encountered the following problem: path built with arcs looks ugly when stroked.
How to make the stroked arcs look nicer?
...
I have an array of CGPoints, and I'd like to fill the whole screen with colours, the colour of each pixel depending on the total distance to each of the points in the array. The natural way to do this is to, for each pixel, compute the total distance, and turn that into a colour. Questions follow:
1) How can I colour a single pixel in Q...
I'm trying to write some code that discards all keyboard and mouse events when enabled on Mac OSX 10.6. My code runs as the root user. The approach I'm taking is to create an event tap that discards all events passed to it (while enabled). The event tap callback function looks like this:
CGEventRef MyTapCallback(CGEventTapProxy proxy,
...
Hi,
I am developing for iphone. I want to creating a mutable path via CGPathCreateMutable(), and I want to return it out of the function which creates it. I'm suppose to call a CGPathRelease() when I'm done with it. But since I'm returning it I wish to autorelease it. Since Quartz path is a C code (and doesn't look like an objective C o...
I'm using Quartz to do some basic drawing. I recently decided I wanted a background image for my app. So I went into my XIB file and added a UIImageView and set the background, looks good. However, when I run it, the Z-Index of the image is above my drawing. I googled a bit and found that you can do Layout > Send to Back in IB...but ...