I have a NSArray of points that make up a path. I can detect when it self-intersects. When this happens, I try to fill the path.
First I used CoreGraphics, now I'm using openGl to draw a triangle array. Doesn't work well as you can see in the image.
How do I fill only the circular area while leaving the "tail" alone? I was thinking of...
I have a UIView subclass that instantiates three sibling sublayers of its layer. Two of the sublayers have their content set to images files; and the third has a graphic drawn in the
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx
method. The problem is that my drawing layer always appears behind the image layers. I...
I am custom drawing text into a custom UITableViewCell, but am struggling in working out how to draw a line to underline text.
I am currently trying to do the following:
CGContextMoveToPoint(context, pt.x, pt.y+sz.height);
CGContextAddLineToPoint(context, pt.x+sz.width, pt.y+sz.height);
but although the code gets called, nothing is a...
Hi,
I am a newbie in Quartz and I am fighting to understand this stuff apple say is very easy and straightforward.
I have created two CGLayers: one for a fixed background and another one for a sprite. I want this sprite to move.
Both the background context and the sprite context are drawn offscreen and I would like both to be seen on ...
If I use [UIImage imageWithCGImage:], passing in a CGImageRef, do I then release the CGImageRef or does UIImage take care of this itself when it is deallocated?
The documentation isn't entirely clear. It says "This method does not cache the image object."
Originally I called CGImageRelease on the CGImageRef after passing it to imageWit...
N.B.: this relates to private (SPI) functions of the CoreGraphicServices framework.
I am currently running a CGSConnection to the Windowserver as the UniversalController (with the Dock killed), and would like to know how I can be notified that a CGSWindow has had the yellow minimize blob clicked.
Is there a notification event that I ca...
How to draw rectangle something like this in iphone sdk using core graphics
...
i have a view with uiimageview i assign this uiimageview image by camera..now i want to do some drawing onto image....using coregraphics.i want to do something like this... select an area by touching and drawing line when line joins something like circle or any shape..i want to change that particular area in to something else for example...
I'm trying to save and restore cgcontext to avoid doing heavy drawing computations for a second time and I'm getting the error : CGGStackRestore: gstack underflow. What am I doing wrong? What is the correct way to do this?
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
if (initialized) {
...
I have a CGPoint called point that is being assigned a touch:
UITouch *touch = [touches anyObject];
CGPoint point = [touch locationInView:self];
I want to get the x coordinate value into my console log:
NSLog(@"x: %s", point.x);
When I use this, log output for this is:
x: (null)
I have verified that point is not null when this i...
i want to create a path.something like i touch the screen and draw line in touchmove event.when line intersect from starting point.fill that path using any colour.
now see in the image i've drawn a line.i just want to detect if line intersects again to start point.then fill that path with my own desired color.also i m using core graph...
Hi there,
I'm trying to draw a line on a custom UITableViewCell. When I draw inside the overriden drawRect and use the current graphics context I don't see anything.
I know I can't see anything because the draw rect is drawing to the UIView and not the contentView. So my question is, how do I draw to the content view using CG? Say, gra...
i have a view with uiimageview and an UIimage set to it.how do i make image sharp or blur using coregraphics?
...
i have a view with uimageview and an image set to it. i want to erase image as something like we do in photoshop with an eraser.how do i achieve this.also how do i undo erase???
...
i want to get only those pixels which are inside an irregular shape..using core graphics not openGL.here is an image where i have drawn an irregular shape.
and here is the drawing code
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
if(drawLineClicked)
{
UITouch *touch = [touches anyObject];
...
I am tracking down a strange bug. The bug manifests itself with the display of this message in the console log:
BlurApp(5018,0xa00d6500) malloc: *** error for object 0x103b000: pointer being freed was not allocated
This message pops in after execution has left my event loop. It seems to be happening when the autorelease pool is bein...
how do i draw line when moving finger across screen in iphone using core graphics.
...
I need to draw a line with an arrow head. How can i do this using Core graphics.
Any help!!!
...
Hey guys,
I need to display some text on multiple views loaded on a UIScrollView. It should be centered both vertically and horizontally.
I did accomplish this with no problems using a UITextView, but now I need to perform a little bit of formatting in the middle of the text - some color changing and italics.
My first try was to use a...
Hi there,
When using an iPhone Objective C method that accepts CGFloats, e.g. [UIColor colorWithRed:green:blue:], is it important to append a f to constant arguments to specifiy them explicitly as floats, e.g. should I always type 0.1f rather than 0.1 in such cases? Or does the compiler automatically cast 0.1 (which is a double in gener...