Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (CALayer *) makeContentsLayer
  2. {
  3.     CALayer * contents = [CALayer layer];
  4.    
  5.     contents.bounds = CGRectMake(-5000, -5000, 2*5000, 2*5000);
  6.     contents.backgroundColor = self.clr;
  7.    
  8.     // - - -
  9.  
  10.     // clip contents layer by outline (outline centered on (0, 0))
  11.     CAShapeLayer * shapeOutline = [CAShapeLayer layer];
  12.     shapeOutline.path = self.pOutline;
  13.    
  14.     contents.mask = shapeOutline;
  15.    
  16.     // - - -
  17.    
  18.     if (NO)
  19.         [self markPosition: CGPointZero
  20.                    onLayer: contents ];
  21.     // - - -
  22.        
  23.     [self refreshTextLayer];
  24.    
  25.     [contents addSublayer: self.shapeLayerForText];
  26.    
  27.     // - - -
  28.    
  29.     return contents;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement