菜鸟教程小白 发表于 2022-12-11 20:52:56

ios - Quartz2D 绘图不使用 drawRect :(CGRect)rect method


                                            <p><p>在 Quartz2D 中,我可以不使用 <code>drawRect:(CGRect)rect</code> 方法绘制任何形状吗?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>是的。如果您想绘制位图(作为一个示例)并生成一个 CGImage,您当然可以创建一个 CGBitmapContext,然后像往常一样使用 CoreGraphics 作为您的上下文。</p>

<p>如果您想在显示器上绘图,请使用提供的图形上下文在 <code>drawRect:</code> 内完成您的工作。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - Quartz2D 绘图不使用 drawRect :(CGRect)rect method,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/8753148/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/8753148/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - Quartz2D 绘图不使用 drawRect :(CGRect)rect method