-
公开(公告)号:US20030169258A1
公开(公告)日:2003-09-11
申请号:US10191159
申请日:2002-07-09
Applicant: Silicon Integrated Systems Corp.
Inventor: Chung-Yen Lu , Jo-Tan Yao
IPC: G06T011/20
CPC classification number: G06T11/203
Abstract: A fast line drawing method. First, the coordinates of two end points are received and a current point is assigned to one of the end points. The differences of x and y coordinates (nullx and nully) and the sum of error E are computed, the integer part of nullx over nully is denoted as Q. The current point is checked to determine whether it has reached the end point. If not and the value of E is negative, a point at the current point is drawn. The y-coordinate of the current point and E are updated by (Ynull1) and (Enull2nullx) respectively if E is non-negative, a span of pixels from (X,Y) to (XnullQ-1,Y) are drawn if the coordinate of last of Q points is less than the end point. Otherwise, a span of pixels from (X,Y) to (x2,Y) are drawn.
Abstract translation: 快速线条画法。 首先,接收两个端点的坐标,并将一个当前点分配给一个端点。 计算x和y坐标(DELTAx和DELTAy)的差异和误差E的总和,DELTAx的DELTAx的整数部分表示为Q.检查当前点以确定其是否已到达终点。 如果不是,并且E的值为负,则绘制当前点的点。 如果E是非负的,分别从(X,Y)到(X + Q-1)的像素的跨度,分别更新当前点和E的y坐标(Y + 1)和(E-2DELTAx) 如果Q点的最后坐标小于终点,则绘制Y)。 否则,绘制从(X,Y)到(x2,Y)的像素跨度。