MHBeautyParams.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. //
  2. // MHBeautyParams.h
  3. #ifndef MHBeautyParams_h
  4. #define MHBeautyParams_h
  5. //#import "UIView+Additions.h"
  6. #import <UIKit/UIKit.h>
  7. //#import "RookieTools.h"
  8. #import <MHBeautySDK/MHSDK.h>
  9. typedef NS_ENUM(NSInteger , MHBeautyAssembleType) {
  10. MHBeautyAssembleType_Beauty = 0,//美颜
  11. MHBeautyAssembleType_Face = 1,//美型
  12. MHBeautyAssembleType_CompleteBeauty = 2,//一键美颜
  13. };
  14. typedef NS_ENUM(NSInteger, MHBeautyType) {
  15. MHBeautyType_Original = 0,//原图
  16. MHBeautyType_White = 1,//美白
  17. MHBeautyType_Mopi = 2,//磨皮
  18. MHBeautyType_Ruddiess = 3, //红润
  19. MHBeautyType_Brightness = 4 // 亮度
  20. };
  21. typedef NS_ENUM(NSInteger,MHBeautyFaceType) {
  22. MHBeautyFaceType_Original = 0,//原图
  23. MHBeautyFaceType_BigEyes = 1,//大眼
  24. MHBeautyFaceType_ThinFace = 2,//瘦脸
  25. MHBeautyFaceType_Mouth,//嘴型
  26. MHBeautyFaceType_Nose,//鼻子
  27. MHBeautyFaceType_Chin,//下巴
  28. MHBeautyFaceType_Forehead,//额头
  29. MHBeautyFaceType_Eyebrow,//眉毛
  30. MHBeautyFaceType_Canthus,//眼角
  31. MHBeautyFaceType_EyeDistance,//眼距
  32. MHBeautyFaceType_EyeAlae,//开眼角
  33. MHBeautyFaceType_ShaveFace,//削脸
  34. MHBeautyFaceType_LongNose//长鼻
  35. };
  36. static const BOOL isNeedBottom = NO ;
  37. //以下是否保存所选数据,如果是YES,则保存数据。默认是YES(Whether to save one beauty data. If yes, save the data,Default is YES)
  38. static const BOOL isSaveOneclickBeauty = YES;
  39. static const BOOL isSaveSticker = YES;
  40. static const BOOL isSaveFilter = YES;
  41. static const BOOL isSaveSpecialFilter = YES;
  42. static const BOOL isSaveHaHaMirror = YES;
  43. static const BOOL isSaveWatermark = YES;
  44. static const BOOL isSaveActionSticker = YES;
  45. static const BOOL isSaveMakeup = YES;
  46. //一键美颜包含美颜、美型,所以选中一键美颜会去掉美颜美型
  47. //cancelOtherBeauty 设置为NO,则美颜美型和一键美颜选中状态会共存,YES表示选中一键美型,美型和美颜全置为0
  48. static const BOOL cancelOtherBeauty = NO;
  49. /**********
  50. 美颜美型默认的数据获取方式有两种:一种是后台可以设置,从接口获取数值,
  51. 第二种方式读取本地默认数据。
  52. 针对自己项目的实际情况修改defaultValueFromLocal。NO表示从接口获取,YES表示读取本地plist文件的数据.
  53. 注意:当设置为NO时,需要完善MHMeiyanMenusView.m文件里的setupDefaultBeautyAndFaceValue方法,将后台读取的默认值赋值给对应的功能
  54. **********/
  55. static const BOOL kDefaultValueFromLocal = YES;
  56. //frame
  57. static const CGFloat MHMeiyanMenuHeight = 139.f;
  58. static const CGFloat MHMeiyanMenusCellHeight = 90.f;
  59. static const CGFloat MHBeautyViewHeight = 140.f;
  60. static const CGFloat MHFaceViewHeight = 140.f;
  61. static const CGFloat MHStickersViewHeight = 250.f;
  62. static const CGFloat MHStickersViewENHeight = 300.f;
  63. static const CGFloat MHFiltersViewHeight = 140.f;
  64. static const CGFloat MHFilterCellHeight = 100.f;
  65. static const CGFloat MHFilterItemColumn = 6;
  66. static const CGFloat MHStickerItemWidth = 55;
  67. static const CGFloat MHStickerItemHeight = 55;
  68. static const CGFloat MHStickerSectionHeight = 40;
  69. static const CGFloat MHBottomViewHeight = isNeedBottom?70.f:0.0f;
  70. static const CGFloat MHBottomViewHeight1 = 70.f;
  71. static const CGFloat MHMagnifyViewHeight = isNeedBottom?250.f:250.f-MHBottomViewHeight1;
  72. static const CGFloat MHSpecificCellHeight = 100.f;
  73. static const CGFloat MHSpecificViewHeight = 140.f;
  74. static const CGFloat MHBeautyAssembleViewHeight = isNeedBottom?330.5f:330.5f-MHBottomViewHeight1;
  75. static const CGFloat MHSpecificAssembleViewHeight = isNeedBottom?250.f:250.f-MHBottomViewHeight1;
  76. static const CGFloat MHSliderwHeight = 50.f;
  77. static const CGFloat MHSliderwTop = 10.f;
  78. static const CGFloat MHAlpha = 0.8f;
  79. static const CGFloat MHBlackAlpha = 0.5f;
  80. static const CGFloat FoxSeparatorHeight = 2.f;
  81. static const CGFloat FoxSeparatorWidth = 8.f;
  82. static const CGFloat MHLineHeight = 0.5f;
  83. #define ActionList @"ActionList"
  84. #define window_width [UIScreen mainScreen].bounds.size.width
  85. #define window_height [UIScreen mainScreen].bounds.size.height
  86. #define ImageBundlePath [[NSBundle mainBundle] pathForResource:@"MHResource" ofType:@"bundle"]
  87. #define Bundle [NSBundle bundleWithPath:ImageBundlePath]
  88. #define BundleImg(Name) [UIImage imageNamed:Name inBundle:Bundle compatibleWithTraitCollection:nil];
  89. #define BeautyFoxBundlePath [[NSBundle mainBundle] pathForResource:@"MHForeignResource" ofType:@"bundle"]
  90. #define BFBundle [NSBundle bundleWithPath:BeautyFoxBundlePath]
  91. #define FoxBundleImg(Name) [UIImage imageNamed:Name inBundle:BFBundle compatibleWithTraitCollection:nil];
  92. #define FontColorNormal [UIColor colorWithRed:100/255.f green:100/255.f blue:100/255.f alpha:1]
  93. #define FontColorBlackNormal [UIColor colorWithRed:220/255.f green:220/255.f blue:220/255.f alpha:1]
  94. #define FontColorSelected [UIColor colorWithRed:255/255.f green:85/255.f blue:10/255.f alpha:1]
  95. #define FontColorBlackNormal1 [UIColor colorWithRed:108/255.f green:108/255.f blue:108/255.f alpha:1]
  96. #define LineColor [UIColor colorWithRed:255/255.f green:255/255.f blue:255/255.f alpha:0.2]
  97. #define Font_12 [UIFont systemFontOfSize:12]
  98. #define Font_10 [UIFont systemFontOfSize:10]
  99. #define iPhoneX (window_width>= 375.f && window_height >= 812.f)||(window_width>= 414.f && window_height >= 896.f)
  100. #define BottomIndicatorHeight (iPhoneX ? 34: 0)
  101. #define IsString(__string) ([(__string) isKindOfClass:[NSString class]])
  102. #define IsStringWithAnyText(__string) (IsString(__string) && ([((NSString *)__string) length] > 0) && (![(__string) isKindOfClass:[NSNull class]]) && (![(__string) isEqualToString:@"(null)"]))
  103. #define IsArray(__array) ([(__array) isKindOfClass:[NSArray class]])
  104. #define IsArrayWithAnyItem(__array) (IsArray(__array) && ([((NSArray *)__array) count] > 0))
  105. #define IsDictionary(__dict) ([(__dict) isKindOfClass:[NSDictionary class]])
  106. #define IsDictionaryWithAnyKeyValue(__dict) (IsDictionary(__dict) && ([[((NSDictionary *)__dict) allKeys] count] > 0))
  107. #define kMHBeautyTitle @"kMHBeautyTitle"
  108. #define kMHFaceTitle @"kMHFaceTitle"
  109. #define kOneclickBeauty @"OneclickBeauty"
  110. #define kOneclickIndex @"OneclickBeautyIndex"
  111. #define kMHFilter @"kMHFilter"
  112. #define kMHSticker @"kMHSticker"
  113. #define kMHSpecialFilter @"kMHSpecialFilter"
  114. #define kMHHaHaMirror @"kMHHaHaMirror"
  115. #define kMHWatermark @"kMHWatermark"
  116. #define kMHAction @"kMHActionSticker"
  117. #define kMHMakeup @"kMHMakeup"
  118. #define kMHSelectedQuickBeauty @"hasSelectedQuickBeauty"
  119. //#define YZMsg(key) [[RookieTools shareInstance] getStringForKey:key withTable:@"InfoPlist"]
  120. #define OldStickerVesion @"oldStickerVesion"
  121. #define FoxThemeColor [UIColor colorWithRed:254/255.f green:53/255.f blue:197/255.f alpha:1]
  122. #define kLanguage @"Fox_Language"
  123. #define kLanguage_EN @"en"
  124. #define kLanguage_ZH @"zh-Hans"
  125. #endif /* MHBeautyParams_h */