-
Notifications
You must be signed in to change notification settings - Fork 0
/
Share.h
39 lines (27 loc) · 783 Bytes
/
Share.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* common.h
*
*
* Created by Rintarou on 2010/12/28.
* Copyright 2010 http://rintarou.dyndns.org. All rights reserved.
*
*/
#import "build.h"
#ifndef _SHARE_H_
#define _SHARE_H_
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
//#define ABS(v) ((v < 0) ? -(v) : v)
#endif // _SHARE_H_
CGColorRef CreateDeviceGrayColor(CGFloat w, CGFloat a);
@interface Shared : NSObject {
}
/* Useful Utility Functions */
+ (uint)string2uint:(const char *)colorStr;
+ (void)dumpRect:(CGRect)rect andRectName:(const char *)rectName;
+ (void)dumpPoint:(CGPoint)p andPointName:(const char *)pointName;
+ (CGPoint)normalizeVector:(CGPoint)vec withLength:(CGFloat)length;
@end