mirror of
https://gh-proxy.org/https://github.com/klinsmaya/dashjim.github.com.git
synced 2026-11-08 09:26:57 +08:00
增加点core text代码的注释
This commit is contained in:
@@ -162,15 +162,16 @@ callbacks的结构体为CTRunDelegateCallbacks,主要是包含一些回调函
|
||||
{
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
|
||||
//这四行代码只是简单测试drawRect中context的坐标系
|
||||
CGContextSetRGBFillColor (context, 1, 0, 0, 1);
|
||||
CGContextFillRect (context, CGRectMake (0, 200, 200, 100 ));
|
||||
CGContextSetRGBFillColor (context, 0, 0, 1, .5);
|
||||
CGContextFillRect (context, CGRectMake (0, 200, 100, 200));
|
||||
|
||||
CGContextSetTextMatrix(context, CGAffineTransformIdentity);//设置字形变换矩阵为CGAffineTransformIdentity,也就是说每一个字形都不做图形变换
|
||||
|
||||
|
||||
CGContextSetTextMatrix(context, CGAffineTransformIdentity);
|
||||
CGAffineTransform flipVertical = CGAffineTransformMake(1,0,0,-1,0,self.bounds.size.height);
|
||||
CGContextConcatCTM(context, flipVertical);
|
||||
CGAffineTransform flipVertical = CGAffineTransformMake(1,0,0,-1,0,self.bounds.size.height);
|
||||
CGContextConcatCTM(context, flipVertical);//将当前context的坐标系进行flip
|
||||
|
||||
NSMutableAttributedString *attributedString = [[[NSMutableAttributedString alloc] initWithString:@"测试富文本显示"] autorelease];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user