Permalink
Browse files

update all files

  • Loading branch information...
yusenhan committed Jun 29, 2012
1 parent 174dc98 commit 238e79125de017a3c820f43b007c85e54ce2d7ca
Showing with 2,582 additions and 0 deletions.
  1. BIN Examples/examples/1.png
  2. BIN Examples/examples/2.png
  3. BIN Examples/examples/3.png
  4. +368 −0 Smooth Line View.xcodeproj/project.pbxproj
  5. +7 −0 Smooth Line View.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  6. BIN ... View.xcodeproj/project.xcworkspace/xcuserdata/nunnikl.xcuserdatad/UserInterfaceState.xcuserstate
  7. BIN ...iew.xcodeproj/project.xcworkspace/xcuserdata/splashtop.xcuserdatad/UserInterfaceState.xcuserstate
  8. +72 −0 Smooth Line View.xcodeproj/xcuserdata/nunnikl.xcuserdatad/xcschemes/Smooth Line View.xcscheme
  9. +22 −0 Smooth Line View.xcodeproj/xcuserdata/nunnikl.xcuserdatad/xcschemes/xcschememanagement.plist
  10. +5 −0 Smooth Line View.xcodeproj/xcuserdata/splashtop.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  11. +89 −0 Smooth Line View.xcodeproj/xcuserdata/splashtop.xcuserdatad/xcschemes/Smooth Line View.xcscheme
  12. +22 −0 Smooth Line View.xcodeproj/xcuserdata/splashtop.xcuserdatad/xcschemes/xcschememanagement.plist
  13. +39 −0 Smooth Line View/Smooth Line View-Info.plist
  14. +14 −0 Smooth Line View/Smooth Line View-Prefix.pch
  15. +5 −0 Smooth Line View/Smooth Line View.entitlements
  16. +57 −0 Smooth Line View/SmoothLineView.h
  17. +408 −0 Smooth Line View/SmoothLineView.m
  18. +19 −0 Smooth Line View/Smooth_Line_ViewAppDelegate.h
  19. +73 −0 Smooth Line View/Smooth_Line_ViewAppDelegate.m
  20. +17 −0 Smooth Line View/Smooth_Line_ViewViewController.h
  21. +131 −0 Smooth Line View/Smooth_Line_ViewViewController.m
  22. +2 −0 Smooth Line View/en.lproj/InfoPlist.strings
  23. +246 −0 Smooth Line View/en.lproj/MainWindow.xib
  24. +146 −0 Smooth Line View/en.lproj/Smooth_Line_ViewViewController.xib
  25. +17 −0 Smooth Line View/main.m
  26. +37 −0 spline/BezierCurve.h
  27. +34 −0 spline/BezierCurve.m
  28. +20 −0 spline/CGPointArithmetic.h
  29. +32 −0 spline/CatmullRomSpline.h
  30. +78 −0 spline/CatmullRomSpline.m
  31. +19 −0 spline/CubicBezierCurve.h
  32. +122 −0 spline/CubicBezierCurve.m
  33. +18 −0 spline/LinearBezierCurve.h
  34. +48 −0 spline/LinearBezierCurve.m
  35. +51 −0 spline/NSArray_PointArray.h
  36. +126 −0 spline/NSArray_PointArray.m
  37. +19 −0 spline/QuadraticBezierCurve.h
  38. +92 −0 spline/QuadraticBezierCurve.m
  39. +38 −0 spline/Spline.h
  40. +89 −0 spline/Spline.m
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "6B93BE6913F3374200DFAB23"
+ BuildableName = "Smooth Line View.app"
+ BlueprintName = "Smooth Line View"
+ ReferencedContainer = "container:Smooth Line View.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "6B93BE6913F3374200DFAB23"
+ BuildableName = "Smooth Line View.app"
+ BlueprintName = "Smooth Line View"
+ ReferencedContainer = "container:Smooth Line View.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "6B93BE6913F3374200DFAB23"
+ BuildableName = "Smooth Line View.app"
+ BlueprintName = "Smooth Line View"
+ ReferencedContainer = "container:Smooth Line View.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Smooth Line View.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>6B93BE6913F3374200DFAB23</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+</Bucket>
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.7">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "6B93BE6913F3374200DFAB23"
+ BuildableName = "Smooth Line View.app"
+ BlueprintName = "Smooth Line View"
+ ReferencedContainer = "container:Smooth Line View.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "6B93BE6913F3374200DFAB23"
+ BuildableName = "Smooth Line View.app"
+ BlueprintName = "Smooth Line View"
+ ReferencedContainer = "container:Smooth Line View.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "NO">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "6B93BE6913F3374200DFAB23"
+ BuildableName = "Smooth Line View.app"
+ BlueprintName = "Smooth Line View"
+ ReferencedContainer = "container:Smooth Line View.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <LocationScenarioReference
+ identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
+ referenceType = "1">
+ </LocationScenarioReference>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "6B93BE6913F3374200DFAB23"
+ BuildableName = "Smooth Line View.app"
+ BlueprintName = "Smooth Line View"
+ ReferencedContainer = "container:Smooth Line View.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Smooth Line View.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>6B93BE6913F3374200DFAB23</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.culturezoo.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <false/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ </array>
+</dict>
+</plist>
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'Smooth Line View' target in the 'Smooth Line View' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iPhone SDK 3.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict/>
+</plist>
@@ -0,0 +1,57 @@
+//
+// SmoothLineView.h
+// Smooth Line View
+//
+// Created by Levi Nunnink on 8/15/11.
+// Copyright 2011 culturezoo. All rights reserved.
+//
+// modify by Hanson @ Splashtop
+
+#import <UIKit/UIKit.h>
+
+enum
+{
+ DRAW = 0x0000,
+ CLEAR = 0x0001,
+ ERASE = 0x0002,
+ UNDO = 0x0003,
+ REDO = 0x0004,
+};
+
+@interface SmoothLineView : UIView {
+ @private
+
+ NSMutableArray *pathArray;
+ NSMutableArray *lineArray;
+ NSMutableArray *bufferArray;
+ NSMutableArray *colorArray;
+
+
+ CGPoint currentPoint;
+ CGPoint previousPoint1;
+ CGPoint previousPoint2;
+ CGFloat lineWidth;
+ UIColor *lineColor;
+ CGFloat lineAlpha;
+
+ UIImage *curImage;
+
+ int drawStep;
+
+}
+@property (nonatomic, retain) UIColor *lineColor;
+@property (readwrite) CGFloat lineWidth;
+@property (readwrite) CGFloat lineAlpha;
+
+
+
+- (void)calculateMinImageArea:(CGPoint)pp1 :(CGPoint)pp2 :(CGPoint)cp;
+- (void)redoButtonClicked;
+- (void)undoButtonClicked;
+- (void)clearButtonClicked;
+- (void)eraserButtonClicked;
+
+- (void)drawLines;
+- (void)setColor:(UIColor*)_color;
+
+@end
Oops, something went wrong.

0 comments on commit 238e791

Please sign in to comment.