1
1
//
2
- // CTGradient.m
2
+ // CTFGradient.m (renamed from CTGradient to avoid namespace collisions with other projects using CTGradient and WebKit)
3
3
//
4
4
// Created by Chad Weider on 2/14/07.
5
5
// Writtin by Chad Weider.
8
8
//
9
9
// Version: 1.8
10
10
11
- #import " CTGradient .h"
11
+ #import " CTFGradient .h"
12
12
13
- @interface CTGradient (Private)
13
+ @interface CTFGradient (Private)
14
14
- (void )_commonInit ;
15
15
- (void )setBlendingMode : (CTGradientBlendingMode)mode ;
16
16
- (void )addElement : (CTGradientElement*)newElement ;
@@ -30,7 +30,7 @@ - (CTGradientElement)removeElementAtPosition:(float)position;
30
30
static void resolveHSV (float *color1, float *color2);
31
31
32
32
33
- @implementation CTGradient
33
+ @implementation CTFGradient
34
34
// ///////////////////////////////////Initialization Type Stuff
35
35
- (id )init
36
36
{
@@ -66,7 +66,7 @@ - (void)dealloc
66
66
67
67
- (id )copyWithZone : (NSZone *)zone
68
68
{
69
- CTGradient *copy = [[[self class ] allocWithZone: zone] init ];
69
+ CTFGradient *copy = [[[self class ] allocWithZone: zone] init ];
70
70
71
71
// now just copy my elementlist
72
72
CTGradientElement *currentElement = elementList;
@@ -495,7 +495,7 @@ + (id)hydrogenSpectrumGradient
495
495
496
496
497
497
#pragma mark Modification
498
- - (CTGradient *)gradientWithAlphaComponent : (float )alpha
498
+ - (CTFGradient *)gradientWithAlphaComponent : (float )alpha
499
499
{
500
500
id newInstance = [[[self class ] alloc ] init ];
501
501
@@ -514,9 +514,9 @@ - (CTGradient *)gradientWithAlphaComponent:(float)alpha
514
514
return [newInstance autorelease ];
515
515
}
516
516
517
- - (CTGradient *)gradientWithBlendingMode : (CTGradientBlendingMode)mode
517
+ - (CTFGradient *)gradientWithBlendingMode : (CTGradientBlendingMode)mode
518
518
{
519
- CTGradient *newGradient = [self copy ];
519
+ CTFGradient *newGradient = [self copy ];
520
520
521
521
[newGradient setBlendingMode: mode];
522
522
@@ -526,9 +526,9 @@ - (CTGradient *)gradientWithBlendingMode:(CTGradientBlendingMode)mode
526
526
527
527
// Adds a color stop with <color> at <position> in elementList
528
528
// (if two elements are at the same position then added imediatly after the one that was there already)
529
- - (CTGradient *)addColorStop : (NSColor *)color atPosition : (float )position
529
+ - (CTFGradient *)addColorStop : (NSColor *)color atPosition : (float )position
530
530
{
531
- CTGradient *newGradient = [self copy ];
531
+ CTFGradient *newGradient = [self copy ];
532
532
CTGradientElement newGradientElement;
533
533
534
534
// put the components of color into the newGradientElement - must make sure it is a RGB color (not Gray or CMYK)
@@ -546,9 +546,9 @@ - (CTGradient *)addColorStop:(NSColor *)color atPosition:(float)position
546
546
547
547
548
548
// Removes the color stop at <position> from elementList
549
- - (CTGradient *)removeColorStopAtPosition : (float )position
549
+ - (CTFGradient *)removeColorStopAtPosition : (float )position
550
550
{
551
- CTGradient *newGradient = [self copy ];
551
+ CTFGradient *newGradient = [self copy ];
552
552
CTGradientElement removedElement = [newGradient removeElementAtPosition: position];
553
553
554
554
if (isnan (removedElement.position ))
@@ -557,9 +557,9 @@ - (CTGradient *)removeColorStopAtPosition:(float)position
557
557
return [newGradient autorelease ];
558
558
}
559
559
560
- - (CTGradient *)removeColorStopAtIndex : (unsigned )index
560
+ - (CTFGradient *)removeColorStopAtIndex : (unsigned )index
561
561
{
562
- CTGradient *newGradient = [self copy ];
562
+ CTFGradient *newGradient = [self copy ];
563
563
CTGradientElement removedElement = [newGradient removeElementAtIndex: index ];
564
564
565
565
if (isnan (removedElement.position ))
0 commit comments