How do I implement an eraser tool for a drawing/painting app? [closed] - objective-c

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am trying to develop a drawing/painting app for my portfolio.
The functions I have now are "Write", "Change Size", and "Change Color".
Now, I am trying to implement an eraser tool that will totally erase what's written. What I did so far was copy the same code I used for writing, using white as the color, but instead of erasing what's written it just overwrites the first one. Is that the right way, or is there another way to implement this?

I don't honestly know too much about OpenGL as of this writing, but I suspect that painting over with white is the wrong thing to do. Consider what happens if you decide to allow users to change the background color. The your code gets a little more complicated. What if you decide to add support for gradients?
I suggest finding a way to simply clear the data at a given point, for example, where your brush is. You might want to look at an open source graphics program, like GIMP, to see how they do it.

Related

How do you make a simple Cocoa/Objective-C text editor [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to know how to make a very, very simple text editor with Xcode. I only want it to be able to save, load, and write text files. I am just doing it out of curiosity.
Here's a complete project for TextEdit the text editor that comes with OS X: https://developer.apple.com/library/mac/samplecode/TextEdit/Introduction/Intro.html#//apple_ref/doc/uid/DTS40011741
If you want to start from scratch and do it yourself, take a look at the NSTextField class, or for saving, take a look at NSArchiver. All your pretty much have to do is create a new project, add an NSTextField to your window, and write the code to load and save the file.
Get the book Cocoa Programming for Mac OS X by Aaron Hillegass. It will show you how to get started, or just check out developer.apple.com. Lots of documentation there.

Draw along a path detection in iOS [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am writing a writing app for Kids.
I need to enforce writing along a define path like in Dora ABC apps. For example, writing A.
When user touch and draw, it draw only when user finger are along the defined path and can detect whether user follow that path or not.
My path are defined in UIBezierpath.
I try to use CGRectContainsPoint but it seem to be too much code when I have so many alphabet.
Any suggestion is much appreciated.
Thanks!
you may try another approach-
Using Custom gestures in ios: Using this feature you can have predefined gestures for alphabets and you can use these gestures for detection. demo code available at https://github.com/britg/MultistrokeGestureRecognizer-iOS
Or if you want to implement it from scratch- http://blog.federicomestrone.com/2012/01/31/creating-custom-gesture-recognisers-for-ios/

Split screen application iPad [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to create an iPad application in which there are four windows on single screen.
these windows should be updating simultaneously (Multitasking). How i can do this any suggestion/help will be appreciable
I'm going to assume that you mean views and not windows.
First, make sure you're not over-complicating the interface. It should be intuitive, and four distinct simultaneous views sound like a lot (of course, it depends).
Second, create a UIViewController. Then, create four UIView subclasses, with all the properties and objects you need, lay them out as subviews, and build the logic into the UIViewController, which can be the delegate for them.
I hope this helps get you started in the right direction, but as others have said, this is a broad question and there are many applicable approaches.

General approach for an Mac OSX drawing app (with obj-c) [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am planning to make a simple OSX drawing/painting app in objective-c/cocoa and thinking that the best approach is to (in a nutshell) use quartz in an NSView sub-class.
Question: should I look into using OPEN GL or will Quartz do the trick? Will using OPEN GL mean a big performance advantage?
The app would be very basic and should (for example) be able to:
-paint in color
-paint with bitmap textures
-use gradient fills
-programmatic paint brushes
There's already "an app for that" - it's the Sketch example available from Apple's developer site.

How to create adjustable UIView similar to the Pic Jointer / Diptic apps in iOS [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am working on app like on Pic Jointer / Diptic. I am successfully able to create two separate view which are re-sizable separately, but I want to implement an adjustable view like the Pic Jointer and Diptic apps.
I have tried lot to make a UIView similar to some example apps, however I've failed to implement this kind functionality. I have also successfully been able to create two separate UIViews which can be resized and dragged.
Can any one guide me how can I achieve this kind of functionality? Tutorials, links, explanations, open source libraries, anything?
What kind of functionality would this require, and how would one go about implementing that using UIImageView and / or UIView?