This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
users:shilo:extensions:shclippedsprite [2012/09/16 11:20] – [Example] 78.45.184.50 | users:shilo:extensions:shclippedsprite [2014/04/24 13:05] (current) – [Example] 178.219.160.178 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== SHClippedSprite ====== | ||
+ | ---- dataentry extension ---- | ||
+ | type : extension | ||
+ | author_mail | ||
+ | description | ||
+ | lastupdate_dt | ||
+ | compatible | ||
+ | depends | ||
+ | tags : clip, sprite, clippedsprite | ||
+ | homepage_url | ||
+ | download_url | ||
+ | min iOS version : 3.2 | ||
+ | ---- | ||
+ | ===== Description ===== | ||
+ | SHClippedSprite class will allow you to easily clip children (display objects) inside of a sprite. This class inherits all properties from SPSprite and also includes: | ||
+ | <code objc> | ||
+ | @property (nonatomic, readonly) SPQuad *clip; | ||
+ | Default properties: | ||
+ | clip.x = 0 | ||
+ | clip.y = 0 | ||
+ | clip.width = 0 | ||
+ | clip.height = 0 | ||
+ | |||
+ | @property (nonatomic, assign) BOOL clipping; | ||
+ | Default value is NO. | ||
+ | </ | ||
+ | |||
+ | ===== Sample ===== | ||
+ | (Coming later) | ||
+ | |||
+ | ===== Example ===== | ||
+ | <code objc> | ||
+ | SHClippedSprite *cp = [[SHClippedSprite alloc] init]; | ||
+ | cp.clip.x = 5; | ||
+ | cp.clip.y = 10; | ||
+ | cp.clip.width = 100; | ||
+ | cp.clip.height = 80; | ||
+ | </ | ||
+ | ===== Instructions ===== | ||
+ | ==== To add into your Sparrow project ==== | ||
+ | - Download the source files here: [[https:// | ||
+ | - Open your desired Sparrow project | ||
+ | - Drag and drop the files into the " | ||
+ | - Open " | ||
+ | - Include the extension: <code objc># | ||
+ | - Save " | ||
+ | |||
+ | ==== To add directly into Sparrow source ==== | ||
+ | - Download the source files here: [[https:// | ||
+ | - Save the files into Sparrow' | ||
+ | * Example: "/ | ||
+ | - Navigate back one directory and open " | ||
+ | * Example: "/ | ||
+ | - Inside the " | ||
+ | * Example: " | ||
+ | - Right click the " | ||
+ | - Navigate into the "/ | ||
+ | - On the next window, leave all options as default and click " | ||
+ | - In the " | ||
+ | * Example " | ||
+ | - At the bottom of the file, add: <code objc># | ||
+ | - Save " | ||
+ | - Close " | ||
+ | |||
+ | ===== Source Code ===== | ||
+ | %gist(12eeb51a59aa4a0cc2ea)% | ||
+ | |||
+ | ===== Changelog ===== | ||
+ | * // | ||
+ | * // | ||
+ | |||
+ | ===== Todo ===== | ||
+ | * (Empty) |