Unlock instant, AI-driven research and patent intelligence for your innovation.

Graphic display method and device for C language program

A graphic display, C language technology, applied in the computer field, can solve the problems of high learning cost and difficult graphical interface programming, and achieve the effect of reducing the difficulty

Active Publication Date: 2020-01-31
李富科
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Regardless of which of the above methods is used, developers need to master the use of these graphics libraries, and the learning cost is relatively large
Moreover, some of the necessary knowledge required to master these graphics libraries has exceeded the scope of C language, which makes it more difficult for beginners in C language to make graphical interface programs.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Graphic display method and device for C language program
  • Graphic display method and device for C language program
  • Graphic display method and device for C language program

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] This embodiment provides a graphic display method of a C language program.

[0027] figure 1 It is a flowchart of a graphic display method of a C language program in this embodiment, such as figure 1As shown, the method mainly includes the following steps S102-S106.

[0028] Step S102, using the graphic generation program written in C language to apply for a storage space corresponding to the size of the graphic to be drawn in the internal memory, and write the color information of each pixel of the graphic to be drawn in the storage space.

[0029] In this embodiment, although the user wants to display graphics in the process of writing the graphics generation program, he does not need to use a third-party graphics API or the graphics API of the operating system. He only needs to use the standard C language to call the C The language standard library and the inter-process communication function library complete the function of the graphics generation program.

[003...

Embodiment 2

[0056] This embodiment provides a graphic display device of a C language program, which can be used to implement the method provided in the first embodiment above.

[0057] image 3 A schematic structural diagram of a graphic display device of a C language program provided in this embodiment, such as image 3 As shown, the device mainly includes: a graphic generation module 301 and a graphic drawing module 303 .

[0058] The following mainly describes the functions of each module of the graphics display device of the C language program provided by this embodiment. For other related matters, please refer to the description of Embodiment 1, which will not be repeated here.

[0059] In this embodiment, the graphics generation module 301 is configured to apply for a storage space corresponding to the size of the graphics to be drawn in the memory, and write the color information of each pixel of the graphics to be drawn in the storage space, and the graphics to be drawn The attr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a graphic display method and a device for a C language program. The method comprises the steps that a graph generation program applies for a storage space corresponding to thesize of a to-be-drawn graph in a memory, color information of all pixels of the to-be-drawn graph is written into the storage space, and the graph generation program is compiled through a C language;the graph generation program transmits the attribute information of the graph to be drawn and the color information of each pixel written in the storage space to a graph drawing program, and the attribute information comprises the size information and the color depth information of the graph to be drawn; and the graph drawing program receives the attribute information and the color information ofeach pixel, and displays the corresponding graph on a graph interface of the graph drawing program according to the attribute information and the color information of each pixel. Through the method and the device, the difficulty of graphical interface programming by a C language beginner is reduced.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a method and device for displaying graphics of a C language program. Background technique [0002] C language is a basic and long-established computer programming language with a wide range of application scenarios. When people use C language to write programs, they often write the same or similar codes in order to achieve some of the same or similar functions. People package the codes into a software package for developers to use, and the software package is called a library (library). Among them, for some particularly commonly used functions, such as the case conversion of English characters, the search and splicing of English character strings, basic input and output, file reading and writing, etc., the American National Standards Institute (ANSI) will These particularly commonly used functions are standardized to form the ANSI C language standard library (The AN...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/34G06F8/38
CPCG06F8/34G06F8/38Y02D10/00
Inventor 李富科
Owner 李富科