LoginSignup
2
2

More than 5 years have passed since last update.

Qwarkeeで出力したパス描画コードで拡縮

Last updated at Posted at 2012-10-25

出力コードのままだと大きさ固定で描画されてしまう(あたりまえ)。
せっかくパスで描画しているのだから超拡大して綺麗なラインを見てうっとりしたい!
ということで簡単に拡大率を変更するにはどうすればいいのか?

CGContextScaleCTM()関数を呼べばそれっぽいことはできた。

- (void)drawRect:(CGRect)rect
{
  CGContextRef context = UIGraphicsGetCurrentContext();
  CGContextScaleCTM(context, 4.0, 4.0); //倍率
  

これが正しい方法なのかどうかは分からないけどうっとりはできた。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2