CN115938264A - Display preprocessing method and system for SPI bus driving display screen - Google Patents

Display preprocessing method and system for SPI bus driving display screen Download PDF

Info

Publication number
CN115938264A
CN115938264A CN202211531107.XA CN202211531107A CN115938264A CN 115938264 A CN115938264 A CN 115938264A CN 202211531107 A CN202211531107 A CN 202211531107A CN 115938264 A CN115938264 A CN 115938264A
Authority
CN
China
Prior art keywords
display
picture
coordinate
text
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211531107.XA
Other languages
Chinese (zh)
Inventor
袁春
金鑫
熊兵周
何琪文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
709th Research Institute of CSSC
Original Assignee
709th Research Institute of CSSC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 709th Research Institute of CSSC filed Critical 709th Research Institute of CSSC
Priority to CN202211531107.XA priority Critical patent/CN115938264A/en
Publication of CN115938264A publication Critical patent/CN115938264A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The invention provides a display preprocessing method and a display preprocessing system for an SPI bus driving display screen, which belong to the field of display screen preprocessing, and the method comprises the following steps: initializing a display matrix by a default value; sequentially overlapping and covering the display matrix according to the display attribute set of the display screen to obtain a final covered display matrix; displaying on a display screen at one time according to a display matrix generated by superposition; the invention ensures that the content which needs to be displayed for a plurality of times originally only needs to be displayed once, thereby greatly improving the display efficiency.

Description

Display preprocessing method and system for SPI bus driving display screen
Technical Field
The invention belongs to the field of display screen preprocessing, and particularly relates to a display preprocessing method and a display preprocessing system for an SPI (serial peripheral interface) bus driving display screen.
Background
In the display console equipment, the universal control panel adopts a display screen key array scheme driven by an SPI bus. In a display screen key array of the universal control panel, one SPI bus drives 5 displays, the display resolution of each display screen is 240 × 240, one or a combination of three types of display contents such as background colors, pictures and characters can be displayed, and the characters can be displayed in at most four groups. The user can set the display content of the display screen keys when the keys are pressed and lifted. In general, each display content of each type is displayed separately, for example, when a background color, a picture, and four groups of characters are displayed simultaneously on one display screen, 6 rendering operations are required. The display characteristics of the SPI bus-driven display screen determine that each display operation takes about several tens to one hundred milliseconds, and thus 6 display operations take several hundreds of milliseconds. When the display screen array of the general control panel is operated, if the key operation is too fast, the display refreshing speed of the display screen may not keep pace with the key operation, thereby affecting the use experience of users.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a display preprocessing method and a display preprocessing system for an SPI bus driving display screen, aiming at solving the problem of display efficiency of the display screen driven by the prior SPI bus when the display screen displays the combination of the display contents such as background color, pictures, characters and the like each time, if one display screen simultaneously displays the background color, the pictures and the characters, the display operation needs hundreds of milliseconds, and if the key operation is too fast, the display refreshing speed of the display screen can not follow the key operation, thereby influencing the use problem of users.
In order to achieve the above object, in one aspect, the present invention provides a display preprocessing method for an SPI bus driving display screen, comprising the steps of:
s1: initializing a display matrix; the display matrix provides display data for the display screen; displaying coordinate information of one-dimensional and two-dimensional corresponding pixel points of the matrix, and three-dimensional corresponding RGB values of 3 bytes of the pixel points;
s2: judging whether the validity field corresponding to the color display attribute in the display attribute set is TRUE, if so, setting the RGB values of all pixel points of the display matrix as the RGB values of the background color in the color display attribute, and otherwise, turning to S3;
s3: sequentially judging whether the validity fields corresponding to the display attributes of the pictures in the display attribute set are TRUE or not, if so, opening a picture file according to a picture index, and replacing RGB values in a rectangular range surrounded by (picture initial X coordinate, picture initial Y coordinate), (picture end X coordinate and picture end Y coordinate) in the display attributes of the corresponding pictures in a display matrix by pixel point RGB values in a construction range of (0, 0), (picture end X coordinate-picture initial X coordinate and picture end Y coordinate) in picture file data; if the 'validity' field is FALSE, go to S4;
s4, performing primary filtration; sequentially judging whether validity fields corresponding to the text display attributes in the display attribute set are TRUE or not, if so, obtaining a pixel lattice corresponding to each character according to the font and the font size, searching the position (text initial X coordinate and text initial Y coordinate) in the corresponding text display attributes from the display matrix, projecting the position of the pixel lattice into the display matrix, and replacing the RGB value of a pixel point at the corresponding position projected in the display matrix with the pixel point in the pixel lattice; if the validity field is FALSE, a program is adopted to call a display interface to display the display matrix;
the validity field is a field set according to actual display requirements.
Further preferably, the display screen displays a resolution of 240 × 240, displaying one or a combination of background color, picture and up to four sets of text types.
Further preferably, the picture display attributes include a picture start X coordinate, a picture start Y coordinate, a picture end X coordinate, a picture end Y coordinate, and a picture index; the point at the leftmost upper corner of the display screen is an origin, the X direction of an abscissa is from the origin to the right, and the Y direction of an ordinate is from the origin to the vertical direction; the picture index is expressed in decimal integers.
Further preferably, the text display attributes include font, font size, text start X coordinate, text start Y coordinate, foreground color and text content; the font supports black body, song body and regular body; the font size supports 6, resolution 16 × 16, 32 × 32, 48 × 48, 64 × 64, 80 × 80 and 96 × 96 respectively; the foreground color is character color and is expressed by 24-bit RGB value; the literal content is a character string coded by GB 2312; the point at the leftmost upper corner of the display screen is an origin, the X direction of an abscissa is from the origin to the right, and the Y direction of an ordinate is from the origin to the bottom; the picture index is expressed in decimal integers.
In another aspect, the present invention provides a display preprocessing system for an SPI bus driven display screen, comprising:
the display matrix initialization module is used for initializing a display matrix; the display matrix provides display data for a display screen, one dimension and two dimensions of the display matrix correspond to coordinate information of pixel points, and three dimensions of the display matrix correspond to RGB values of 3 bytes of the pixel points;
the color display attribute superposition module is used for judging whether the validity field corresponding to the color display attribute of the display attribute set is TRUE or not, and if so, setting the RGB values of all pixel points of the display matrix as the RGB values of the background color in the color display attribute; otherwise, driving the image display attribute superposition module;
the image display attribute superposition module is used for sequentially judging whether the validity fields corresponding to the image display attributes in the display attribute set are TRUE or not, if so, opening an image file according to an image index in the image display attributes, mapping a rectangular range surrounded by image display attributes (an image initial X coordinate, an image initial Y coordinate), an image ending X coordinate and an image ending Y coordinate) into a display matrix, and replacing RGB values in the mapping rectangular range in the display matrix by pixel point RGB values in a construction range of (0, 0), (an image ending X coordinate-an image initial X coordinate and an image ending Y coordinate-an image initial Y coordinate) in image file data, otherwise, driving the text display attribute superposition module;
the text display attribute superposition module is used for sequentially judging whether the effective fields corresponding to the text display attributes in the display attribute set are TRUE or not, if so, obtaining a pixel lattice corresponding to each character according to the font and the font size, searching the position (text initial X coordinate and text initial Y coordinate) in the corresponding text display attributes from the display matrix, projecting the position of the pixel lattice into the display matrix, and replacing the RGB value of the pixel point at the corresponding position projected in the display matrix with the pixel point in the pixel lattice; otherwise, calling a display interface by a program to display the display matrix;
the validity field is a field set according to actual display requirements.
Further preferably, the picture display attributes include a picture start X coordinate, a picture start Y coordinate, a picture end X coordinate, a picture end Y coordinate, and a picture index; the point at the leftmost upper corner of the display screen is an origin, the X direction of an abscissa is from the origin to the right, and the Y direction of an ordinate is from the origin to the vertical direction; the picture index is expressed in decimal integers.
Further preferably, the text display attributes include font, font size, text start X coordinate, text start Y coordinate, foreground color and text content; the font supports black body, song body and regular body; the font size supports 6, resolution 16 × 16, 32 × 32, 48 × 48, 64 × 64, 80 × 80 and 96 × 96 respectively; the foreground color is character color and is expressed by 24-bit RGB value; the text content is a character string encoded in GB 2312.
Further preferably, the display screen displays a resolution of 240 × 240, displaying one or a combination of background color, picture and up to four groups of text types.
In general, the above technical solution conceived by the present invention has the following advantages compared to the prior art
Has the advantages that:
the invention provides a display preprocessing method and a display preprocessing system for an SPI bus driving display screen, wherein a display matrix is constructed, a final display matrix is generated by combining and superposing the display matrices of display contents at each time, and only the final display matrix is sent for display.
Drawings
Fig. 1 is a flowchart of a display preprocessing method for driving a display screen by an SPI bus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
On one hand, the invention provides a display preprocessing method of an SPI bus driving display screen, which comprises the following steps:
s1: initializing a display matrix; the display matrix provides display data for the display screen; displaying coordinate information of one-dimensional and two-dimensional corresponding pixel points of the matrix, and three-dimensional corresponding RGB values of 3 bytes of the pixel points;
s2: judging whether the validity field corresponding to the color display attribute in the display attribute set is TRUE, if so, setting the RGB values of all pixel points of the display matrix as the RGB values of the background color in the color display attribute, and otherwise, turning to S3;
s3: sequentially judging whether the validity fields corresponding to the display attributes of the pictures in the display attribute set are TRUE or not, if so, opening a picture file according to a picture index, and replacing RGB values in a rectangular range surrounded by (picture initial X coordinate, picture initial Y coordinate), (picture end X coordinate and picture end Y coordinate) in the display attributes of the corresponding pictures in a display matrix by pixel point RGB values in a construction range of (0, 0), (picture end X coordinate-picture initial X coordinate and picture end Y coordinate) in picture file data; if the 'validity' field is FALSE, go to S4;
s4, performing primary filtration; sequentially judging whether validity fields corresponding to the text display attributes in the display attribute set are TRUE or not, if so, obtaining a pixel lattice corresponding to each character according to the font and the font size, searching the position (text initial X coordinate and text initial Y coordinate) in the corresponding text display attributes from the display matrix, projecting the position of the pixel lattice into the display matrix, and replacing the RGB value of a pixel point at the corresponding position projected in the display matrix with the pixel point in the pixel lattice; if the validity field is FALSE, a program is adopted to call a display interface to display the display matrix;
the validity field is a field set according to actual display requirements.
Further preferably, the display screen displays a resolution of 240 × 240, displaying one or a combination of background color, picture and up to four groups of text types.
Further preferably, the picture display attributes include a picture start X coordinate, a picture start Y coordinate, a picture end X coordinate, a picture end Y coordinate, and a picture index; the point at the leftmost upper corner of the display screen is an origin, the X direction of an abscissa is from the origin to the right, and the Y direction of an ordinate is from the origin to the vertical direction; the picture index is expressed in decimal integers.
Further preferably, the text display attributes include font, font size, text start X coordinate, text start Y coordinate, foreground color and text content; the font supports black body, song body and regular body; the font size supports 6, resolution 16 × 16, 32 × 32, 48 × 48, 64 × 64, 80 × 80, and 96 × 96, respectively; the foreground color is character color and is expressed by 24-bit RGB value; the literal content is a character string coded by GB 2312; the point at the leftmost upper corner of the display screen is an origin, the X direction of an abscissa is from the origin to the right, and the Y direction of an ordinate is from the origin to the bottom; the picture index is expressed in decimal integers.
In another aspect, the present invention provides a display preprocessing system for an SPI bus driven display screen, comprising:
the display matrix initialization module is used for initializing a display matrix; the display matrix provides display data for a display screen, one dimension and two dimensions of the display matrix correspond to coordinate information of pixel points, and three dimensions of the display matrix correspond to RGB values of 3 bytes of the pixel points;
the color display attribute superposition module is used for judging whether the validity field corresponding to the color display attribute of the display attribute set is TRUE or not, and if so, setting the RGB values of all pixel points of the display matrix as the RGB values of the background color in the color display attribute; otherwise, driving the image display attribute superposition module;
the picture display attribute superposition module is used for sequentially judging whether the validity fields corresponding to the picture display attributes in the display attribute set are TRUE or not, if so, opening a picture file according to a picture index in the picture display attributes, mapping a rectangular range surrounded by picture initial X coordinates, picture initial Y coordinates, picture ending X coordinates and picture ending Y coordinates in the picture display attributes into a display matrix, and replacing RGB values in the mapping rectangular range in the display matrix by pixel point RGB values in a construction range of (0, 0), (picture ending X coordinates-picture initial X coordinates, picture ending Y coordinates-picture initial Y coordinates) in picture file data, otherwise, driving the text display attribute superposition module;
the text display attribute superposition module is used for sequentially judging whether the effective fields corresponding to the text display attributes in the display attribute set are TRUE or not, if so, obtaining a pixel lattice corresponding to each character according to the font and the font size, searching the position (text initial X coordinate and text initial Y coordinate) in the corresponding text display attributes from the display matrix, projecting the position of the pixel lattice into the display matrix, and replacing the RGB values of the pixels at the corresponding positions projected in the display matrix with the pixels in the pixel lattice; otherwise, calling a display interface by a program to display the display matrix;
the validity field is a field set according to actual display requirements.
Further preferably, the picture display attributes include a picture start X coordinate, a picture start Y coordinate, a picture end X coordinate, a picture end Y coordinate, and a picture index; the point at the leftmost upper corner of the display screen is an origin, the X direction of an abscissa is from the origin to the right, and the Y direction of an ordinate is from the origin to the vertical direction; the picture index is expressed in decimal integers.
Further preferably, the text display attributes include a font, a font size, a text start X coordinate, a text start Y coordinate, a foreground color, and a text content; the font supports black body, song body and regular body; the font size supports 6, resolution 16 × 16, 32 × 32, 48 × 48, 64 × 64, 80 × 80 and 96 × 96 respectively; the foreground color is character color and is represented by 24-bit RGB value; the text content is a character string encoded in GB 2312.
Further preferably, the display screen displays a resolution of 240 × 240, displaying one or a combination of background color, picture and up to four groups of text types.
Examples
In this embodiment, the display preprocessing method is performed based on a small display screen with a resolution of 240 × 240, and the specific implementation manner is as follows:
1. displaying a set of attributes
As shown in table 1, a background color, BMP pictures, and characters are displayed on the display screen, which are respectively a color display attribute, a picture display attribute, and a text display attribute; the background color is represented by a 24-bit RGB value; the BMP picture supports 24-bit color and 16-bit color BMP pictures of RGB555 or RGB565, the picture resolution does not exceed the display resolution 240X 240 of the display screen, and the BMP pictures are numbered in integers and stored in a storage medium as file names. The characters are character strings coded by GB 2312. As shown in fig. 1, the 6 display attributes respectively correspond to an "validity" field, which indicates that the display attribute needs to be displayed for TRUE, and indicates that the display attribute does not need to be displayed for FALSE;
TABLE 1
Effectiveness of Color display properties
Effectiveness of Picture display attributes
Effectiveness of Text display attribute 0
Effectiveness of Text display attribute 1
Effectiveness of Text display Attribute 2
Effectiveness of Text display attribute 3
2. Picture display attributes
The picture display attributes describe the relevant attributes of the BMP picture that needs to be displayed on the display screen, and as shown in table 2, the picture display attributes include a picture start X coordinate, a picture start Y coordinate, a picture end X coordinate, a picture end Y coordinate, and a picture index; taking the upper left corner on the display screen as an origin, taking the upper left corner from the origin to the right as the X direction of an abscissa, and taking the upper left corner from the origin to the lower side as the Y direction of a ordinate; the picture indexes are expressed by decimal integers, and specific picture data are read from a storage medium by a quick superposition display algorithm in the superposition process;
TABLE 2
Starting X coordinate
Initial Y coordinate
Ending X coordinate
Ending Y coordinate
Picture indexing
3. Text display attributes
The text display attribute describes the relevant attribute of the GB2312 encoded string that needs to be displayed on the display screen, as shown in table 3; the text display attributes comprise fonts, word sizes, a text starting X coordinate, a text starting Y coordinate, a foreground color and text contents; the font supports black body, song body and regular body; the font size supports 6, resolution 16 × 16, 32 × 32, 48 × 48, 64 × 64, 80 × 80 and 96 × 96 respectively; the coordinate definition is the same as above; the foreground color is character color and is expressed by 24-bit RGB value; the text content is a character string coded by GB 2312;
TABLE 3
Character font
Word size
Starting X coordinate
Initial Y coordinate
Foreground color
Text content
4. Overlay display method
Usually, the display content of the display attribute set is completed on one display screen, if all the validity fields in the display attribute set are TRUE, 6 display operations are required to complete one complete display, namely, displaying a background color, a BMP picture and four groups of characters; the method comprises the steps that a rapid superposition display method is used, the display content of a display attribute set is completed on one display screen, and complete display can be completed only by 1 time of display operation no matter what the value of an effectiveness field in the display attribute set is;
the display matrix provides display data for a display screen, and is a three-dimensional array of 240 × 24 in program design, wherein one dimension corresponds to the coordinate information of the pixel points, and the three dimensions correspond to the RGB values of 3 bytes of the pixel points; the key of the rapid superposition display method is the superposition generation of a display matrix, and the superposition generation flow of the display matrix is shown in figure 1;
firstly, initializing a display matrix by a default value; then, sequentially overlapping and covering the display matrix according to the display attribute set of the display screen to obtain a final covered display matrix; finally, performing one-time display on the display screen according to the display matrix generated by superposition; the superposition generation flow of the display matrix is specifically as follows:
s1: initializing a display matrix by using a default value;
s2: judging whether the color display attribute validity field of the display attribute set is TRUE, if so, setting the RGB values of all pixel points of the display matrix as the RGB values of the background color, and if not, entering the next step;
s3: judging whether an image display attribute 'validity' field of a display attribute set is TRUE, if so, opening an image file according to an image index, and replacing RGB values in a rectangular range enclosed by coordinates (an image starting X coordinate, an image starting Y coordinate), (an image ending X coordinate and an image ending Y coordinate) in a display matrix with pixel point RGB values in a range of (0, 0), (an image ending X coordinate-an image starting X coordinate and an image ending Y coordinate-an image starting Y coordinate) in image file data; if the 'validity' field is FALSE, the next step is carried out;
s4: judging whether a text display attribute 0 validity field of a display attribute set is TRUE, if so, obtaining a pixel dot matrix corresponding to each character according to the character style and the character size, and replacing a pixel point RGB value existing in a pixel point in the pixel dot matrix with a pixel point RGB value at a corresponding position in a region starting from (a text initial X coordinate and a text initial Y coordinate) in a display matrix; if the validity field is FALSE, the next step is carried out;
s5: judging whether a text display attribute 1 'validity' field of a display attribute set is TRUE, if so, obtaining a pixel dot matrix corresponding to each character according to the character style and the character size, and replacing a pixel point RGB value existing in a pixel point in the pixel dot matrix with a pixel point RGB value at a corresponding position in a starting area (a text starting X coordinate and a text starting Y coordinate) in a display matrix; if the 'validity' field is FALSE, the next step is carried out;
s6: judging whether the text display attribute 2 'validity' field of the display attribute set is TRUE, if so, obtaining a pixel dot matrix corresponding to each character according to the character style and the character size, and replacing a pixel point RGB value existing in a pixel point in the pixel dot matrix with a pixel point RGB value at a corresponding position in an area starting from (a text initial X coordinate and a text initial Y coordinate) in the display matrix; if the validity field is FALSE, the next step is carried out;
s7: judging whether a text display attribute 3 validity field of a display attribute set is TRUE, if so, obtaining a pixel dot matrix corresponding to each character according to the character style and the character size, and replacing a pixel point RGB value existing in a pixel point in the pixel dot matrix with a pixel point RGB value at a corresponding position in an area starting from (a text initial X coordinate and a text initial Y coordinate) in a display matrix; if the validity field is FALSE, the next step is carried out;
s8: obtaining a display matrix to be displayed finally after the superposition through the steps; and then, calling a display interface by the program to display the display matrix, thereby realizing one-time display of all display attributes in the display attribute set of one display screen.
In summary, compared with the prior art, the invention has the following advantages:
the invention provides a display preprocessing method and a display preprocessing system for an SPI bus driving display screen, wherein a display matrix is constructed, a final display matrix is generated by combining and superposing the display matrices of display contents at each time, and only the final display matrix is sent for display.
It will be understood by those skilled in the art that the foregoing is only an exemplary embodiment of the present invention, and is not intended to limit the invention to the particular forms disclosed, since various modifications, substitutions and improvements within the spirit and scope of the invention are possible and within the scope of the appended claims.

Claims (8)

1. A display preprocessing method of an SPI bus driving display screen is characterized by comprising the following steps:
s1: initializing a display matrix; the display matrix provides display data for a display screen, one dimension and two dimension of the display matrix correspond to coordinate information of pixel points, and three dimensions correspond to RGB values of 3 bytes of the pixel points;
s2: judging whether the validity field corresponding to the color display attribute of the display attribute set is TRUE, if so, setting the RGB values of all pixel points of the display matrix as the RGB values of the background color in the color display attribute, and otherwise, turning to S3;
s3: sequentially judging whether validity fields corresponding to the display attributes of the pictures in the display attribute set are TRUE or not, if so, opening a picture file according to a picture index in the picture display attributes, mapping a rectangular range surrounded by picture display attributes (picture initial X coordinate, picture initial Y coordinate), (picture ending X coordinate, picture ending Y coordinate) into a display matrix, and replacing RGB values in the mapping rectangular range in the display matrix by pixel point RGB values in a range constructed by (0, 0), (picture ending X coordinate-picture initial X coordinate, picture ending Y coordinate-picture initial Y coordinate) in picture file data, otherwise, turning to S4;
s4: sequentially judging whether the effective fields corresponding to the text display attributes in the display attribute set are TRUE or not, if so, obtaining a pixel lattice corresponding to each word according to the font and the word size, searching the position (text initial X coordinate and text initial Y coordinate) in the corresponding text display attributes from the display matrix, projecting the position of the pixel lattice into the display matrix, and replacing the RGB values of the pixels at the corresponding positions projected in the display matrix with the pixels in the pixel lattice; otherwise, calling a display interface by a program to display the display matrix;
the validity field is a field set according to actual display requirements.
2. The display preprocessing method of claim 1, wherein the picture display attributes include a picture start X-coordinate, a picture start Y-coordinate, a picture end X-coordinate, a picture end Y-coordinate, and a picture index; the point at the leftmost upper corner of the display screen is an origin, the X direction of an abscissa is from the origin to the right, and the Y direction of an ordinate is from the origin to the vertical direction; the picture index is expressed in decimal integers.
3. The display pre-processing method of claim 2, wherein the text display properties include font, font size, text start X coordinate, text start Y coordinate, foreground color, and text content; the font supports black body, song body and regular body; the font size supports 6, resolution 16 × 16, 32 × 32, 48 × 48, 64 × 64, 80 × 80 and 96 × 96 respectively; the foreground color is character color and is expressed by 24-bit RGB value; the text content is a character string encoded in GB 2312.
4. A display preprocessing method as claimed in any of claims 1 to 3 wherein the display screen displays a resolution of 240 x 240, displaying a background color, a picture and one or a combination of up to four sets of text types.
5. The utility model provides a show preliminary processing system of SPI bus drive display screen which characterized in that includes:
the display matrix initialization module is used for initializing a display matrix; the display matrix provides display data for a display screen, one dimension and two dimensions of the display matrix correspond to coordinate information of pixel points, and three dimensions of the display matrix correspond to RGB values of 3 bytes of the pixel points;
the color display attribute superposition module is used for judging whether the validity field corresponding to the color display attribute of the display attribute set is TRUE or not, and if so, setting the RGB values of all pixel points of the display matrix as the RGB values of the background color in the color display attribute; otherwise, driving the image display attribute superposition module;
the picture display attribute superposition module is used for sequentially judging whether the validity fields corresponding to the picture display attributes in the display attribute set are TRUE or not, if so, opening a picture file according to a picture index in the picture display attributes, mapping a rectangular range surrounded by picture initial X coordinates, picture initial Y coordinates, picture ending X coordinates and picture ending Y coordinates in the picture display attributes into a display matrix, and replacing RGB values in the mapping rectangular range in the display matrix by pixel point RGB values in a construction range of (0, 0), (picture ending X coordinates-picture initial X coordinates, picture ending Y coordinates-picture initial Y coordinates) in picture file data, otherwise, driving the text display attribute superposition module;
the text display attribute superposition module is used for sequentially judging whether the effective fields corresponding to the text display attributes in the display attribute set are TRUE or not, if so, obtaining a pixel lattice corresponding to each character according to the font and the font size, searching the position (text initial X coordinate and text initial Y coordinate) in the corresponding text display attributes from the display matrix, projecting the position of the pixel lattice into the display matrix, and replacing the RGB value of the pixel point at the corresponding position projected in the display matrix with the pixel point in the pixel lattice; otherwise, calling a display interface by a program to display the display matrix;
the validity field is a field set according to actual display requirements.
6. The display preprocessing system of claim 5 wherein the picture display attributes include a picture start X coordinate, a picture start Y coordinate, a picture end X coordinate, a picture end Y coordinate, and a picture index; the point at the leftmost upper corner of the display screen is an origin, the X direction of an abscissa is from the origin to the right, and the Y direction of an ordinate is from the origin to the vertical direction; the picture index is expressed in decimal integers.
7. The display pre-processing system of claim 6, wherein the text display properties include font, font size, text start X coordinate, text start Y coordinate, foreground color, and text content; the font supports black body, song body and regular body; the font size supports 6, resolution 16 × 16, 32 × 32, 48 × 48, 64 × 64, 80 × 80 and 96 × 96 respectively; the foreground color is character color and is expressed by 24-bit RGB value; the text content is a character string encoded in GB 2312.
8. A display preprocessing system as claimed in any of claims 5 to 7 wherein the display screen displays a resolution of 240 x 240, displaying a background color, a picture and one or a combination of up to four sets of text types.
CN202211531107.XA 2022-12-01 2022-12-01 Display preprocessing method and system for SPI bus driving display screen Pending CN115938264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211531107.XA CN115938264A (en) 2022-12-01 2022-12-01 Display preprocessing method and system for SPI bus driving display screen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211531107.XA CN115938264A (en) 2022-12-01 2022-12-01 Display preprocessing method and system for SPI bus driving display screen

Publications (1)

Publication Number Publication Date
CN115938264A true CN115938264A (en) 2023-04-07

Family

ID=86557035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211531107.XA Pending CN115938264A (en) 2022-12-01 2022-12-01 Display preprocessing method and system for SPI bus driving display screen

Country Status (1)

Country Link
CN (1) CN115938264A (en)

Similar Documents

Publication Publication Date Title
CA1236940A (en) Monochromatic representation of color images
US4529978A (en) Method and apparatus for generating graphic and textual images on a raster scan display
CN111915705B (en) Picture visual editing method, device, equipment and medium
JPS63271290A (en) Character pattern generation system
CN107103225A (en) A kind of method for generating graphical verification code
EP1709506B1 (en) Iteratively solving constraints in a font-hinting language
CN115938264A (en) Display preprocessing method and system for SPI bus driving display screen
CA1200025A (en) Graphic and textual image generator for a raster scan display
CN106709973A (en) MCU and FPGA chip-based electronic seal generation and display method
JPH03179873A (en) Picture processing method
CN113741835B (en) Trotting horse lamp effect realization method and trotting horse lamp effect realization device
US20130063475A1 (en) System and method for text rendering
CN209765496U (en) Chip for man-machine interface of intelligent device
CN110852037B (en) Picture word stock calling method
JPS6395590A (en) Hand-written character recognition device
US6225989B1 (en) Matrix character generation system
KR100691501B1 (en) Conversion method of outline font to bitmap image using snap hinting and stem hinting technic and computer readable media storing the software in which the conversion method is implemented
JPH06175639A (en) Method and device for character generation
JPH0366157B2 (en)
CN112258375A (en) Method and system for filling specific text information into associated image boundary
JPS5855973A (en) Compression of graphic japanese character
CN117234654A (en) Method, device, equipment and storage medium for customizing chart colors
JPH0610447Y2 (en) Image processing device
CN115509254A (en) Unmanned aerial vehicle formation matrix rolling caption calculation light effect method, system and application
JP2835056B2 (en) High quality character pattern generation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination