0

In iOS7, we use attributes to draw text:

NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:largeFont,NSFontAttributeName, [UIColor whiteColor],NSForegroundColorAttributeName,[UIColor blackColor], NSStrokeColorAttributeName,nil];
[myString drawAtPoint:myPosition withAttributes:dictionary];

But the stroke is not on outside of the text,it's center. Anyone know how to add outside stroke in iOS7?

Tab
  • 347
  • 3
  • 14
  • AFAIK all stroke drawing operations in Core Graphics are performed on the middle of the path lines, never on the "inside" or "outside". This is because paths are not oriented, and so there's no way to guess which "side" is the good one. – Cyrille Oct 17 '13 at 09:53
  • Well, you could look at the path's direction and make an assumption that way.. e.g. clockwise vs counterclockwise – nielsbot Oct 17 '13 at 09:59

0 Answers0