English 中文(简体)
CGAffine Transformlate Weird Issue
原标题:CGAffineTransformTranslate Weird Issue

我谈一下某些我们的问题。

- (void)translateTextPosition:(CGSize)size {
NSLog(@"before tx = %f, %f",_textMatrix.tx,size.width);
_textMatrix = CGAffineTransformTranslate(_textMatrix, size.width, size.height);
NSLog(@"tx = %f",_textMatrix.tx);
}

But output shows that

2011-10-26 18:57:03.351 PDF[62708:b903] Tm tx:48.437599 ty:752.559387
2011-10-26 18:57:03.353 PDF[62708:b903] before tx = 48.437599, 0.345000
2011-10-26 18:57:03.353 PDF[62708:b903] tx = 53.549774

That is not the correct result I want? What I expected is tx = 48.782599 Can someone enlighten me what is wrong with this?

问题回答

你们正在用你现有的手法而不是其他方式,把翻译矩阵成倍。 用途

_textMatrix = CGAffineTransformConcat(_textMatrix, CGAffineTransformMakeTranslation(size.width, size.height));




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签