~~NOTOC~~ ====== SXBezierCurve ====== ---- dataentry extension ---- author_mail : alessandro.maroso@gmail.com Alessandro Maroso description : A customisable curved line. lastupdate_dt : 2014-11-10 # the date you created the extension compatible : v2.1 # the Sparrow version you tested the extension with depends : # if the ext. depends on others, list them here tags : line, curved, bezier, texture # enter a few tags, separated by commas homepage_url : https://gist.github.com/membersheep/22db1a2a6b794b4fe1d7 download_url : https://gist.github.com/membersheep/22db1a2a6b794b4fe1d7/download ---- ===== Usage ===== This is a simple, dynamic and customisable curved line based on Bezier curves. For informations about the meaning and the usage of the control points check http://pomax.github.io/bezierinfo/ Sample: self.curve = [[SXBezierCurve alloc]initWithStartPoint:[SPPoint pointWithX:0 y:0] endPoint:[SPPoint pointWithX:0 y:100] controlPoint1:[SPPoint pointWithX:100 y:20] controlPoint2:[SPPoint pointWithX:80 y:80]]; self.curve.x = 300; self.curve.y = 100; self.curve.color = SPColorNavy; self.curve.thickness = 5; [self addChild:self.curve]; ===== Changelog ===== * //2014/11/04 21:12//: First public version * //2014/11/10 00:00//: Added textured curve * //2014/11/20 14:46//: Updated with 3 curve type (linear, quadratic, cubic) and new texturization. * //2014/12/18 14:46//: Updated with new texturization (1 texture applied for the whole line, repeated if needed). ===== Source Code ===== %gist(22db1a2a6b794b4fe1d7)% ===== Discussion ===== //No comments so far. Feel free to edit this part of the page.//