drawing UIImage inside a CGMutablePath

后端 未结 2 371
我寻月下人不归
我寻月下人不归 2021-01-21 11:27

Given a CGMutablePathRef how do I draw a UIImage in it? I know that you can draw it like the following:

 UIImage* scaledImage = UIGraphicsGetImageFromCurrentImag         


        
2条回答
  •  误落风尘
    2021-01-21 12:13

    I think that you are choosing the hard way of doing it.

    Your approach assumes that you have already got a bitmap and created a bitmap based graphics context. At your place I would just use UIImage's :

    - (void)drawAtPoint:(CGPoint)point;
    

提交回复
热议问题