1. Field of the Invention
The field of the invention is that of graphical libraries providing graphical functions used for drawing symbologic images. One of the fields of favored application is the generation of symbologic images for the piloting of aircraft. These images are in particular used for navigation, piloting and management of critical systems, such as engine checks.
2. Description of the Prior Art
The graphical images are generated on matrix screens, such as, for example, liquid crystal displays. The generation of the graphical image is done in the following manner: a buffer-memory called a “frame-buffer” is filled with the various symbologies necessary for the image, these symbologies generated by a computer of symbols being assigned an order of priority; when all the symbologies have been created in the buffer-memory, its content is then dispatched to the display. These graphical images are generated in real time.
The graphical symbols are represented by a set of broken lines comprising a succession of adjacent elementary straight lines. When the line is thick, it is represented by a rectangular line body, the width of the rectangle being equal to the thickness of the line and the length of the rectangle to the length of the line. When a thick broken line is created on the basis of these elementary rectangles, discontinuities are obtained at the junction of two adjacent rectangles as indicated in
The object of the invention is to replace the rectangular elementary lines with lines having rounded ends so as to eliminate this problem.
More precisely, the invention is aimed at a method of graphical generation of a thick straight line, said line comprising a rectangular line body, the width of the rectangle being equal to the thickness of the line and the length of the rectangle to the length of the line, characterized in that the line body also comprises two half-disks centered on the sides of the rectangle of dimension equal to the thickness of the line, said half-disks having a diameter equal to this same thickness.
Its subject is also a method of graphical generation of a broken line comprising a succession of adjacent elementary straight lines of like thickness, each elementary line being represented by a rectangular line body, the width of the rectangle being equal to the common thickness and the length of the rectangle to the length of the elementary line, characterized in that each intersection of two adjacent successive lines making a nonzero angle between themselves is constructed in the following manner:
Advantageously, when the broken line is open, the line bodies situated at the free ends each comprise a half-disk having a diameter equal to the thickness of the broken line.
Advantageously, in a step of the method, each elementary line is decomposed into a central rectangle corresponding to the line body, the width of said rectangle being equal to the thickness of the line and the length of the rectangle to the length of the line and two peripheral rectangles situated on the sides of the central rectangle, the length of said rectangles being equal to the thickness of the line and their width being equal to half said length.
Also, the matrix space of the display is decomposed into angular sectors oriented with respect to a favored oriented axis of the matrix, the decomposition comprises 8 sectors, 4 first sectors corresponding to the favored axis of the matrix and to the axes oriented respectively at 90 degrees, 180 degrees and 270 degrees to this axis, 4 second sectors corresponding to the angular sectors situated between said first sectors.
Advantageously, the method comprises a step of determination of the bottom left, bottom right, top right and top left limit points of each rectangle making up each line as a function of the orientation of the line in the various angular sectors, the boundaries defining the pixels belonging to the rectangles making up the line obey defining rules dependent on the orientation of the line in the various angular sectors.
Finally, the color of each pixel of the line depends:
The invention will be better understood and other advantages will appear on reading the nonlimiting description which follows and by virtue of the appended figures among which:
In a general manner, for any broken line comprising a succession of adjacent elementary straight lines of like thickness, each elementary line is represented by a rectangular line body, the width of the rectangle being equal to the common thickness and the length of the rectangle to the length of the elementary line, each intersection of two adjacent successive lines making a nonzero angle between themselves is constructed in the following manner:
When the broken line is open, the line bodies situated at the free ends each comprise a half-disk having a diameter equal to the thickness of the broken line.
Any graphical image is composed of elementary pixels. The determination of the pixels of the line and their filling with the appropriate color must comply with three essential criteria:
By way of example, a method making it possible to correctly determine the pixels of the line according to the invention comprises the following steps:
The buffer-memory in which the colors of each pixel of the line to be drawn are stored is a matrix memory composed of R rows composed of N pixels P.
Step 1 consists in substituting for each half-disk a rectangle one of whose sides is merged with the base of the half-disk and whose width is equal to the radius of the half-disk. The line thus modeled comprises three rectangles as indicated in
Each point is referenced in a frame of reference (x, y) taken from the matrix of pixels as indicated in
Step 2 consists in tagging the orientation AB of the central axis defining the line. This orientation is obtained by means of the angle θ that the axis defining the straight line makes with the x axis of the frame of reference of the matrix as indicated in
Step 3 consists in putting in place a protocol for determining the pixels making up the limits of the elementary rectangles as a function of the angular sector occupied. Specifically, the points defining the limits of the various rectangles of the line do not correspond, save for exceptions, to pixel sites. It is necessary therefore to use laws making it possible to determine the pixels fixing the limits of the elementary rectangles. These laws obey four essential criteria:
These laws for determining the limit pixels match the real coordinates expressed in pixels of the limit points of the rectangles with corresponding integer coordinates of pixels belonging to the matrix. There exist 2 major possible types of laws
For example, if the coordinate of a point is 3.72, then the corresponding coordinate will be either 3 or 4.
These laws are applied differently according to two criteria:
Step 4 consists in determining bottom left, bottom right, top right and top left limit points of each rectangle as a function of the orientation of the line in said sectors. For reasons of ease of filling in the buffer-memory, the various pixels making up the line are successively filled with the calorimetric information row by row beginning with the bottom left point of the rectangle up to the top right point. The determination of these points is essential. It does not present any difficulty given that the rectangles are oriented. Here again, these points will depend on the type of sector to which the rectangles belong.
Step 5 consists in determining the left dLEFT and right dRIGHT increments making it possible to determine the extreme points of a row R+1 of pixels with respect to the preceding row R so as to completely fill the pixels of each row. A and B being the limit points of the central axis of the body of the line, if xA, yA denote the coordinates of the point A and xB, yB the coordinates of the point B, we readily determine that the increments dLEFT and dRIGHT equal either
or
according to the orientation of the rectangle. To determine the abscissae of the extreme points of a row with respect to the preceding row, it suffices to add the values δLEFT and δRIGHT to the abscissae of the extreme points of the preceding row, with:
As may be seen in
At the end of step 5, all the pixels contained inside the various rectangles making up a line are determined.
Step 6 consists in determining the color of the various pixels making up the line. The “antialiasing” procedure is used on the pixels retained. It consists in mixing for the pixels situated at the boundaries of the line the initial color of the line with the color of the background by applying a mixture law, function of a transparency law dependent on a transparency coefficient and initial colors of the line and the background. For the lines according to the invention, the transparency law depends:
When it is necessary to generate a broken line comprising several elementary lines, the preceding method comprises an additional step making it possible to manage the intersection of the consecutive lines. Each elementary line of the broken line comprises, as in the preceding case, a first rectangle which constitutes the body of the line, a second rectangle which encompasses the first half-disk, a third rectangle which encompasses the second half-disk. The point of intersection C of two lines is situated at the center of the sides of the rectangles constituting the body of the lines. To effect a correct intersection, it is necessary to determine the limit points of the intersection. These limit points are points of the rectangles of end of lines that are representative of the half-disks.
The second rectangle 31 is delimited by the following points:
The point of intersection of the two lines is also denoted by C. In the present case, only the pixels belonging to the zone 32 are filled, that is to say the zone limited by the points 105, 112 and C.
| Number | Date | Country | Kind |
|---|---|---|---|
| 04/04147 | Apr 2004 | FR | national |
The present Application is based on International Application No. PCT/EP2005/051043, filed on Mar. 9, 2005, which in turn corresponds to France application Ser. No. 04/04147 filed on Apr. 20, 2004, and priority is hereby claimed under 35 USC §119 based on these applications. Each of these applications are hereby incorporated by reference in their entirety into the present application.
| Filing Document | Filing Date | Country | Kind | 371c Date |
|---|---|---|---|---|
| PCT/EP05/51043 | 3/9/2005 | WO | 10/20/2006 |