Source/GGBLayer.m
changeset 10 6c78cc6bd7a6
parent 9 a59acc683080
child 11 436cbdf56810
     1.1 --- a/Source/GGBLayer.m	Thu May 29 15:04:06 2008 -0700
     1.2 +++ b/Source/GGBLayer.m	Thu Jul 03 17:44:30 2008 -0700
     1.3 @@ -288,3 +288,12 @@
     1.4  }    
     1.5  
     1.6  
     1.7 +CGColorRef GetEffectiveBackground( CALayer *layer )
     1.8 +{
     1.9 +    for( ; layer; layer=layer.superlayer ) {
    1.10 +        CGColorRef bg = layer.backgroundColor;
    1.11 +        if( bg )
    1.12 +            return bg;
    1.13 +    }
    1.14 +    return nil;
    1.15 +}