Changeset 2278


Ignore:
Timestamp:
Jul 3, 2007, 10:16:57 AM (15 years ago)
Author:
livings124
Message:

add a real yellow bar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/CTGradient/CTGradientAdditions.m

    r2277 r2278  
    313313+ (CTGradient *)progressYellowGradient
    314314{
    315     #warning someone make a real one!
    316     return [CTGradient gradientWithBeginningColor: [NSColor orangeColor] endingColor: [NSColor yellowColor]];
     315    CTGradient *newInstance = [[[self class] alloc] init];
     316   
     317    CTGradientElement color1;
     318    color1.red = 0.933;
     319    color1.green = 0.831;
     320    color1.blue  = 0.227;
     321    color1.alpha = 1.00;
     322    color1.position = 1;
     323   
     324    CTGradientElement color2;
     325    color2.red = 0.965;
     326    color2.green = 0.737;
     327    color2.blue  = 0.086;
     328    color2.alpha = 1.00;
     329    color2.position = 0.5;
     330   
     331    CTGradientElement color3;
     332    color3.red = 0.965;
     333    color3.green = 0.831;
     334    color3.blue  = 0.169;
     335    color3.alpha = 1.00;
     336    color3.position = 0.5;
     337   
     338    CTGradientElement color4;
     339    color4.red = 0.965;
     340    color4.green = 0.831;
     341    color4.blue  = 0.169;
     342    color4.alpha = 1.00;
     343    color4.position = 0;
     344   
     345    [newInstance addElement:&color1];
     346    [newInstance addElement:&color2];
     347    [newInstance addElement:&color3];
     348    [newInstance addElement:&color4];
     349   
     350    return [newInstance autorelease];
    317351}
    318352
Note: See TracChangeset for help on using the changeset viewer.