• Stars
    star
    356
  • Rank 119,446 (Top 3 %)
  • Language
    Objective-C
  • License
    Other
  • Created almost 10 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A small library to dramatically speed up common operations on UIBezierPath, and also bring its functionality closer to NSBezierPath

iOS UIBezierPath Performance

This code dramatically improves performance for common UIBezierPath operations, and it also brings UIBezierPath API closer to its NSBezierPath counterpart. For full background of this repo, checkout the blogpost explaining what this framework does.

This code was originally part of Loose Leaf. Additional components and libraries from the app have also been open sourced.

Available as a Swift Package!

Install PerformanceBezier in your project through Swift Package Manager as of v1.3.0!

What is this?

This framework adds caching into every UIBezierPath so that common operations can be performed in constant time. It also adds some missing NSBezierPath methods to the UIBezierPath class.

After linking this framework into your project, all Bezier paths will automatically be upgraded to use this new caching. No custom UIBezierPath allocation or initialization is required.

For example, by default there is no O(1) way to retrieve elements from a UIBezierPath. In order to retrieve the first point of the curve, you must CGPathApply() and interate over the entire path to retrieve that single point. This framework changes that. For many algorithms, this can dramatically affect performance.

Are you using PerformanceBezier?

Let me know! I'd love to know where PerformanceBezier is using and how it's affecting your apps. Ping me at @adamwulf!

Also - If you like PerformanceBezier, then you'll love ClippingBezier - an easy way to find intersecting points, lines, and shapes between two UIBezierPaths.

Documentation

View the header files for full documentation.

Building the framework

This library will generate a proper static framework bundle that can be used in any iOS7+ project.

Including in your project

  1. Link against the built framework.
  2. Add "-ObjC++ -lstdc++" to the Other Linker Flags in the project's Settings
  3. #import <PerformanceBezier/PerformanceBezier.h>

JRSwizzle

This framework includes and uses the JRSwizzle library, which is licensed under the MIT license.

License

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 United States License.

For attribution, please include:

  1. Mention original author "Adam Wulf for Loose Leaf app"
  2. Link to https://getlooseleaf.com/opensource/
  3. Link to https://github.com/adamwulf/PerformanceBezier

Support this framework

This framework is created by Adam Wulf (@adamwulf) as a part of the Loose Leaf app.

Become a Github Sponsor to buy me some coffee โ˜•๏ธ to continue the work ๐Ÿ˜„

More Repositories

1

app-launch-guide

This aims to be an indie dev's definitive guide to building and launching your app, including pre-launch, marketing, building, QA, buzz building, and launch. More info at:
3,926
star
2

Columnizer-jQuery-Plugin

The Columnizer jQuery Plugin will automatically layout your content in newspaper column format. You can specify either column width or a static number of columns. And, of course, itโ€™s easy to use!
JavaScript
755
star
3

loose-leaf

Intuitive note taking app. Import and annotate PDFs, manipulate imported photos with intuitive gestures, and take notes with Apple Pencil.
Objective-C
586
star
4

JotUI

OpenGL based drawing view built for and used by Loose Leaf for iPad
Objective-C
261
star
5

ClippingBezier

ClippingBezier calculates intersection points, paths, and shapes between two UIBezierPaths
Objective-C
238
star
6

json-to-mysql

Easily take any JSON object and create+insert it into a mysql table built from its structure. Also search, update, index, and validate tables with JSON.
PHP
134
star
7

ios-hand-shadows

Add shadows to your gestures for better demo videos of your app
Objective-C
121
star
8

PowerPointToUIImage

Objective-C code to generate UIImage thumbnails from slides in a PowerPoint (ppt) file
Objective-C
56
star
9

cloudkit-manager

A simple functional example of building messaging for your app on top of CloudKit.
Objective-C
51
star
10

ios-uitouch-bluedots

Simple code to add blue dots for every UITouch in an app - Helpful for recording app demos that show touch locations during use.
Objective-C
51
star
11

Inkable

Swift
41
star
12

Clocks

Swift implementations of a Lamport clock, hybrid logical clock, and a vector clock.
Swift
29
star
13

automatic-php-api

A barebones PHP API for the Automatic API
PHP
24
star
14

DrawUI

A variety of methods for making a drawing canvas UIView for iPhone and iPad. Objective-C.
Swift
19
star
15

MMStretchGestureRecognizers

A collection of three gestures that can stretch an arbitrary view with four fingers. Used in getlooseleaf.com's clone gesture.
C++
18
star
16

touch-chart

Simplify and smooth UIBezierPaths by reducing the number of elements within the path.
Objective-C
15
star
17

DrawKit

git mirror of DrawKit OS X framework from http://apptree.net/drawkit.htm
Objective-C
15
star
18

spare-parts-app

Simple 2D point and line physics using Verlet integration. Port and fork of https://www.youtube.com/watch?v=tAd7ttKbugA.
Objective-C
14
star
19

vectorboolean

Github clone of https://bitbucket.org/andyfinnell/vectorboolean
Objective-C
13
star
20

PonyExpress

Type-safe NotificationCenter alternative for Swift
Swift
8
star
21

PageCollectionView

Collection view controller, view, and layouts for pinching from book view, to page grid, to full screen page.
Swift
7
star
22

stanford-postagger-objc

This is an Objective-C port of Stanford's Java Part-of-Speech Tagger for iOS
Objective-C
7
star
23

chili58

A choc-spaced version of the Lily58 mechanical keyboard.
6
star
24

jotbook

PHP
6
star
25

chrome-stream-chat

a simple Chrome extension to combine youtube + livecoding + twitch chat
Objective-C
4
star
26

old-khan

This is a version of Khan Academy cerca 2010 and should be taken as an old reference only. this code is not maintained. For up to date Khan Academy code, look at:
JavaScript
3
star
27

bezier-curve-ios-examples

a simple project that shows different bezier curve drawing/clipping/masking examples
3
star
28

easy-php-app

A barebones PHP app that uses Twitter OAuth for user login and https://github.com/adamwulf/json-to-mysql for database access.
PHP
2
star
29

Locks

NSLock alternatives from https://www.vadimbulavin.com/atomic-properties/
Swift
2
star
30

neuralnet

A super simple neural network written in c++ from the tutorial by @BobbyAnguelov
C++
2
star
31

MMToolbox

A little bitty collection of Objective-C helper categories and classes
Objective-C
2
star
32

SwiftPGN

Basic chess pgn parser in Swift
Swift
2
star
33

verlet-nn

A simple CPU based educational neural net, with neuron visualizations using verlet integration.
Objective-C
2
star
34

SKDraw

An example SKView that renders a scene with two bezier path lines, one as a blue line, and one as eraser
Objective-C
2
star
35

twitter-manage

A simple twitter app that can help automatically manage followers
PHP
2
star
36

PaperPile

A swift reimplementation of Loose Leaf's core feature set
Swift
1
star
37

drivesafetogether

PHP
1
star
38

ARC-dealloc-self

This repository explains how and when an object might be dealloc'd inside of one of its own methods, and provides alternative implementations that would not exhibit this memory bug.
Objective-C
1
star
39

MMPageManager

Objective-C
1
star
40

Caches

Swift datastructures for caching, a wrapper around NSCache and dictionary with weak values
Swift
1
star
41

GLPaint

Both OpenGL ES 1.1 and OpenGL ES 2.0 versions of Apple's GLPaint app
Objective-C
1
star
42

nswindow-nsscreen-restoration

Simple project showing window origin will restore, but the screen will not restore
Objective-C
1
star
43

SwiftTex

A very simple Latex parser and math expression simplifier
Swift
1
star
44

QuadTree

A simple Swift implementation of a QuadTree data structure
Swift
1
star
45

simplenn

Bare bones neural network written in Objective-C, based off of the tutorial: http://mattmazur.com/2015/03/17/a-step-by-step-backpropagation-example/
Objective-C
1
star