Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CGContext を使用して、UIImage を簡単に描画および消去できます。
消去のために、私は使用します
CGContextSetBlendMode(ctx, kCGBlendModeClear);
パスに沿って描画します。これにより、画像上にある描画が完全に消去されます。
私がやりたいのは、そっと消すことです。ユーザーは、完全に消える前に同じ場所を 3、4、5 回ストロークする必要があります。
これを行う方法はありますか?それは可能ですか?
自分では試していませんが、ブレンドモード kCGBlendModeMultiply を使用してから、色 (r:1, g:1, b:1, a:0.5) で描画するのはどうですか?