Line drawing using graphics processing

Computer graphics processing and selective visual display system – Computer graphics processing – Shape generating

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Reexamination Certificate

active

06297828

ABSTRACT:

BACKGROUND OF THE INVENTION
This invention relates to a graphics processing apparatus and method and, more particularly, to a graphics drawing apparatus and method for drawing lines.
In order to draw a straight line, which is given by logical coordinate values, on a display device, it is necessary to execute processing whereby the area which the straight line, which is calculated from the logical coordinates, occupies on the physical coordinate system of the display device is determined in accordance with a fixed rule. This processing shall be referred to as “line drawing processing” below.
In order to draw a straight line having width in conventional line drawing processing, the method employed involves creating a polygonal pen corresponding to the width of the line and extracting a pen step that conforms to the required line width and line slope, whereby a thickness commensurate with the line width can be expressed regardless of the angle defined by the slope of the straight line.
1. Polygonal pen and related data structure
A polygonal pen partitions a quadrant having a radius the same as that of a line thickness W in accordance with a suitable partitioning rule and adopts a vector from a certain vertex to the neighboring vertex as a drawing element (hereinafter a “pen step”). The pen step corresponding to the width of one line starts from a horizontal step and ends with a vertical step (see FIG.
1
).
Each pen step includes data comprising slope, direction from the center to the vertex and coordinates of the vertex. Each pen step possesses data in which these three values make up one set, and entries to all pen-step data are held sequentially from a line width of zero to a maximum line width.
Furthermore, an entry to a horizontal pen step and an entry to a vertical pen step are held in the form of a table in correspondence with each line width, and the necessary pen step of the line width is extracted by searching the table (see FIG.
3
).
2. Drawing processing utilizing polygonal pen How a straight line of line width “2” is drawn will be described in simple terms with reference to
FIGS. 1 and 2
.
(1) A polygonal pen conforming to the width of the straight line to be drawn is created.
(2) As shown in
FIG. 2
, a pen step having a slope nearest to the vertical with respect to the slope of a straight line connecting two points A and B is selected from the pen table shown in
FIG. 1
[the pen table created in (1) above].
(3) Since the pen having the vertex coordinates (1,−0.25) in
FIG. 1
is the nearest in this example, RTop is found by adding (1,−0.25) to the coordinates of A and LTop is found by subtracting (1,−0.25) from the coordinates of A.
(4) Auxiliary lines having the same slopes as the straight lines are extended from RTop and LTop, and the intersections of these auxiliary lines with the base line of a scanning line are adopted as the x coordinates of a contour line at this scanning line. One of these coordinates is found for each of the two auxiliary lines having RTop and LTop as their starting points. Thus, one set of x coordinates is obtained for one scanning line. The portion lying between these x coordinates is made black.
(5) This processing is executed, with regard to every scanning line, from the starting point (A) to the end point (B) to obtain the contour line of the entire straight line.
With this drawing method utilizing the polygonal pen, a straight line is not thickened only in a fixed direction at all times with regard to horizontal lines. The method is so contrived that a straight line is drawn with substantially the same width regardless of the angle as well.
Basically this processing is executed once with regard to a straight line but is executed repeatedly with regard to each line segment in case of a polygon or polygonal line. Further, in the case of a curve or ellipse, the shape is partitioning into very small segments, a polygonal approximation is performed and the above-described processing-is executed.
In a case where a special shape is being used at the end point of a straight line or at the connection between two straight lines, the coordinates of the respective contour lines are determined by utilizing the polygonal pen.
In selecting the optional pen step for the slope of a straight line using the conventional method described above, it is necessary to execute processing in which sequentially arrayed pen steps are extracted one at a time and it is determined whether each is suitable or not. Further, coordinates of a contour line are determined for every scanning line based upon the pen-step information. Consequently, numerical calculations are numerous and processing takes times. Furthermore, since the number of pen steps possessed by the polygonal pen increases in dependence upon the line width, creating the polygonal pen takes time when line width is great, namely in the case of a thick line.
In the drawing of graphics using line segments as structural elements, there are instances where, depending upon the figure of the original graphic, problems relating to shape do not arise even when all processing is not executed in its entirety. Rather, there are instances where processing speed is a bigger problem than shape. This is the case for straight lines having a high frequency of use.
Executing drawing processing indiscriminately with regard to such line segments using the above-described technique is inefficient.
The technique described above is effective for shaping a straight line having a large width and an arbitrary angle. However, in a case where line width is sufficiently small in comparison with the pixel (dot) size of the display device, there is almost no effect in terms of dealing with angles finely. On the contrary, the adverse effects of error due to coordinate calculations become conspicuous and there is the possibility that the original shape will become unrecognizable.
SUMMARY OF THE INVENTION
According, an object of the present invention is to provide a graphics processing apparatus and method whereby, rather than using a technique in which processing is applied indiscriminately to the line segments that construct a figure, the optimum processing stage is selected depending upon the drawing attributes (line width, slope of the line segment and shape, etc.) of the line segments per se and the particular figure in which the line segments are being used, thereby making it possible to execute efficient drawing of graphics.
According to the present invention, the foregoing object is attained by providing a graphics processing apparatus for drawing line segments in a bitmap memory using polygonal pen data, comprising first judging means for judging whether a line segment is horizontal or vertical, and second judging means for judging line width in a case where the first judging means has judged that a line segment of interest is neither a horizontal nor a vertical line segment, wherein in a case where the first judging means has judged that a line segment of interest is either a horizontal or a vertical line segment, the polygonal pen data for this line segment is not used and the positions of the line segment of interest on the right side and on the left side of each scanning line are decided based upon coordinates of the starting point and end point and the line width of the line segment, and in a case where the second judging means has judged that the line width is less than a predetermined line width, a horizontal or vertical pen step conforming to the slope of the line segment is employed, and in a case where the second judging means has judged that the line width is equal to or greater than the predetermined line width, plural stages of polygonal-pen data are employed and the positions of the line segment on the right side and on the left side are decided.
In another aspect of the present invention, the conventional technique continues to be used in case of ordinary drawing of a straight line but drawing of a straight line in which the minimum shape is preserved is made possible under condition

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Line drawing using graphics processing does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Line drawing using graphics processing, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Line drawing using graphics processing will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2611595

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.