123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #import <UIKit/UIKit.h>
- #define kNyxNumberOfComponentsPerGreyPixel 3
- #define kNyxNumberOfComponentsPerARBGPixel 4
- #define kNyxMinPixelComponentValue (UInt8)0
- #define kNyxMaxPixelComponentValue (UInt8)255
- #define NYX_DEGREES_TO_RADIANS(__DEGREES) (__DEGREES * 0.017453293)
- #define NYX_RADIANS_TO_DEGREES(__RADIANS) (__RADIANS * 57.295779513)
- #define NYX_MIN(__A, __B) ((__A) < (__B) ? (__A) : (__B))
- #define NYX_MAX(__A ,__B) ((__A) > (__B) ? (__A) : (__B))
- #define NYX_SAFE_PIXEL_COMPONENT_VALUE(__COLOR) (NYX_MIN(kNyxMaxPixelComponentValue, NYX_MAX(kNyxMinPixelComponentValue, __COLOR)))
- #define NYX_IOS_VERSION_LESS_THAN(__VERSIONSTRING) ([[[UIDevice currentDevice] systemVersion] compare:__VERSIONSTRING options:NSNumericSearch] == NSOrderedAscending)
- #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
- #define NYX_DISPATCH_RELEASE(__QUEUE)
- #else
- #define NYX_DISPATCH_RELEASE(__QUEUE) (dispatch_release(__QUEUE))
- #endif
- CGContextRef NYXCreateARGBBitmapContext(const size_t width, const size_t height, const size_t bytesPerRow);
- CGImageRef NYXCreateGradientImage(const size_t pixelsWide, const size_t pixelsHigh, const CGFloat fromAlpha, const CGFloat toAlpha);
- CIContext* NYXGetCIContext(void);
- CGColorSpaceRef NYXGetRGBColorSpace(void);
- void NYXImagesKitRelease(void);
|