使用CGContextAddArcToPoint()绘制弧时,(x1,y1)和(x2,y2)是什么意思? [英] When drawing an arc using CGContextAddArcToPoint(), what does (x1,y1) and (x2,y2) mean?

查看:101
本文介绍了使用CGContextAddArcToPoint()绘制弧时,(x1,y1)和(x2,y2)是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以使用以下代码使用Quartz绘制弧:

You can use the following code to draw an arc using Quartz:

CGContextMoveToPoint(context2, x, y);
CGContextAddArcToPoint(context2, x1, y1, x2, y2, r);

在这些函数中,(x,y)是起点, r 是圆弧半径但是(x1,y1)(x2,y2)

In these functions, (x,y) is the starting point and r is the arc radius but what are (x1,y1) and (x2,y2)?

推荐答案

http://developer.apple.com/library /ios/documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/c/func/CGContextAddArcToPoint

x1 :用户空间坐标中第一条切线终点的x值。第一条切线从当前点绘制到(x1,y1)。

x1: The x-value, in user space coordinates, for the end point of the first tangent line. The first tangent line is drawn from the current point to (x1,y1).

y1 :y-用户空间坐标中的值,表示第一条切线的终点。第一条切线从当前点绘制到(x1,y1)。

y1: The y-value, in user space coordinates, for the end point of the first tangent line. The first tangent line is drawn from the current point to (x1,y1).

x2 :x-用户空间坐标中的值,用于第二条切线的终点。第二条切线从(x1,y1)到(x2,y2)。

x2: The x-value, in user space coordinates, for the end point of the second tangent line. The second tangent line is drawn from (x1,y1) to (x2,y2).

y2 :用户空间坐标中的y值,表示第二条切线的终点。第二条切线从(x1,y1)到(x2,y2)绘制。

y2: The y-value, in user space coordinates, for the end point of the second tangent line. The second tangent line is drawn from (x1,y1) to (x2,y2).

这篇关于使用CGContextAddArcToPoint()绘制弧时,(x1,y1)和(x2,y2)是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆