Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brightredchilli/Free-Sketching
A project to help me figure out how to save smooth path information to a CALayer and display it on the screen
https://github.com/brightredchilli/Free-Sketching
Last synced: about 1 month ago
JSON representation
A project to help me figure out how to save smooth path information to a CALayer and display it on the screen
- Host: GitHub
- URL: https://github.com/brightredchilli/Free-Sketching
- Owner: brightredchilli
- Created: 2012-02-18T20:29:59.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-02-18T22:25:34.000Z (almost 13 years ago)
- Last Synced: 2024-04-14T22:45:44.865Z (8 months ago)
- Homepage:
- Size: 144 KB
- Stars: 33
- Watchers: 6
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome - Free-Sketching - A project to help me figure out how to save smooth path information to a CALayer and display it on the screen (etc)
- awesome - Free-Sketching - A project to help me figure out how to save smooth path information to a CALayer and display it on the screen (etc)
README
Freeform Drawing in iOS
This sample project demonstrates how to draw freeform lines in iOS. Based strongly on: http://stackoverflow.com/questions/5076622/iphone-smooth-sketch-drawing-algorithm
The main classes are
- MotionTrackingViewController.h/m
View Controller that adds a pan gesture recognizer to the screen and conveys the information to the drawing delegate, FreeformLineDrawer. This controller also creates a layer that is added to the view.- FreeformLineDrawer.h/m
Drawing delegate for the CALayer. Maintains a CFMutableArray that keeps track of all the paths that have been drawn onto the screen. Keeps track of paths that have been added.Contributions are welcome.