IP Library Granted Patent US 6,847,362
Granted Patent B2
US 6,847,362 · App. 10/191,159 · Granted Jan 25, 2005

Fast line drawing method

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 6,847,362
App. No.
10/191,159
Granted
Jan 25, 2005
Kind
B2
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 (Δx and Δy) and the sum of error E are computed, the integer part of Δx over Δy 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 (Y+1) and (E−2Δx) respectively if E is non-negative, a span of pixels from (X,Y) to (X+Q−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.

Claims (12)

1. A fast line drawing method, comprising the steps of:

(a) receiving the coordinates of two end points as (x1,y1) and (x2,y2);

(b) assigning the coordinate (X,Y) of a current point as (x1,y1), computing the differences of x and y coordinates of the end points as Δx and Δy, assigning Q as the integer part of Δx over Δy, and assigning the initial sum of error E as −Δx, and two constants K 1 and K 2 as 2Δy and 2*Q*Δy;

(c) checking whether the x-coordinate of the current point (X) has reached the x-coordinate of the end point (x 2 );

(d) testing whether the value of E is non-negative;

(e) drawing a point at the current point if E is negative, updating the x-coordinate of the current point (X) and E by X+1 and E+K 1 respectively, and returning to step (c);

(f) updating the y-coordinate of the current point (Y) and E by (Y+1) and (E−2Δx) respectively if E is non-negative;

(g) checking whether the x-coordinate of the last of Q points (X+Q−1) is less than the x-coordinate of the end point (x 2 );

(h) drawing a span of pixels from (X,Y) to (X+Q−1,Y) if the x-coordinate of the last of Q points (X+Q−1) is less than the x-coordinate of the end point (x 2 );

(i) drawing a span of pixels from (X,Y) to (x 2 ,Y) if the x-coordinate of the last of Q points (X+Q−1) is not less than the x-coordinate of the end point (x 2 ); and

(j) updating the x-coordinate of the current point (X) and E by X+Q and E+K 2 respectively, and returning to step (c).

2. The method as claimed in claim 1 further terminating the line drawing if the x-coordinate of the current point reaches the x-coordinate of the end point (x 2 ).

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 7, 2012
From: SILICON INTEGRATED SYSTEMS CORP.
To: XIAHOU HOLDINGS, LLC
Reel/Frame 029088/0198 →