Procházet zdrojové kódy

【兼容】• NSColor.initWithHex:alpha:

lizhe před 1 rokem
rodič
revize
10eecb1bc7

+ 5 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteFilterCollevtionViewItem.m

@@ -148,25 +148,25 @@
     const CGFloat *component = CGColorGetComponents(color1.CGColor);
     NSColor *color2 = [NSColor colorWithRed:0 green:0 blue:0 alpha:1];
     const CGFloat *component1 = CGColorGetComponents(color2.CGColor);
-    if (![self compareSize:component[0] :component1[0]]) {
+    if (![self km_compareSize:component[0] :component1[0]]) {
         return NO;
     }
     
-    if (![self compareSize:component[1] :component1[1]]) {
+    if (![self km_compareSize:component[1] :component1[1]]) {
         return NO;
     }
     
-    if (![self compareSize:component[2] :component1[2]]) {
+    if (![self km_compareSize:component[2] :component1[2]]) {
         return NO;
     }
     
-    if (![self compareSize:component[3] :component1[3]]) {
+    if (![self km_compareSize:component[3] :component1[3]]) {
         return NO;
     }
     return YES;
 }
 
--(BOOL)compareSize:(CGFloat)floa1 :(CGFloat)floa2
+-(BOOL)km_compareSize:(CGFloat)floa1 :(CGFloat)floa2
 {
     CGFloat t1 = [[NSString stringWithFormat:@"%.3f", floa1] floatValue];
     CGFloat t2 = [[NSString stringWithFormat:@"%.3f", floa2] floatValue];

+ 5 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMColorPickerViewController.m

@@ -354,25 +354,25 @@
 - (BOOL)isTheSameColor:(NSColor *)color1 anotherColor:(NSColor *)color2 {
     const CGFloat *component = CGColorGetComponents(color1.CGColor);
     const CGFloat *component1 = CGColorGetComponents(color2.CGColor);
-    if (![self compareSize:component[0] :component1[0]]) {
+    if (![self km_compareSize:component[0] :component1[0]]) {
         return NO;
     }
     
-    if (![self compareSize:component[1] :component1[1]]) {
+    if (![self km_compareSize:component[1] :component1[1]]) {
         return NO;
     }
     
-    if (![self compareSize:component[2] :component1[2]]) {
+    if (![self km_compareSize:component[2] :component1[2]]) {
         return NO;
     }
     
-    if (![self compareSize:component[3] :component1[3]]) {
+    if (![self km_compareSize:component[3] :component1[3]]) {
         return NO;
     }
     return YES;
 }
 
--(BOOL)compareSize:(CGFloat)floa1 :(CGFloat)floa2
+-(BOOL)km_compareSize:(CGFloat)floa1 :(CGFloat)floa2
 {
     CGFloat t1 = [[NSString stringWithFormat:@"%.3f", floa1] floatValue];
     CGFloat t2 = [[NSString stringWithFormat:@"%.3f", floa2] floatValue];

+ 5 - 5
PDF Office/PDF Master/Class/ToolsLibrary/AppKitCategories/NSColor_SKExtensions.m

@@ -267,25 +267,25 @@
 - (BOOL)isTheSameColor:(NSColor *)color2 {
     const CGFloat *component = CGColorGetComponents(self.CGColor);
     const CGFloat *component1 = CGColorGetComponents(color2.CGColor);
-    if (![self compareSize:component[0] :component1[0]]) {
+    if (![self km_compareSize:component[0] :component1[0]]) {
         return NO;
     }
     
-    if (![self compareSize:component[1] :component1[1]]) {
+    if (![self km_compareSize:component[1] :component1[1]]) {
         return NO;
     }
     
-    if (![self compareSize:component[2] :component1[2]]) {
+    if (![self km_compareSize:component[2] :component1[2]]) {
         return NO;
     }
     
-    if (![self compareSize:component[3] :component1[3]]) {
+    if (![self km_compareSize:component[3] :component1[3]]) {
         return NO;
     }
     return YES;
 }
 
--(BOOL)compareSize:(CGFloat)floa1 :(CGFloat)floa2
+-(BOOL)km_compareSize:(CGFloat)floa1 :(CGFloat)floa2
 {
     CGFloat t1 = [[NSString stringWithFormat:@"%.3f", floa1] floatValue];
     CGFloat t2 = [[NSString stringWithFormat:@"%.3f", floa2] floatValue];