CN106909283B - Canvas display control method and system - Google Patents

Canvas display control method and system Download PDF

Info

Publication number
CN106909283B
CN106909283B CN201710031678.XA CN201710031678A CN106909283B CN 106909283 B CN106909283 B CN 106909283B CN 201710031678 A CN201710031678 A CN 201710031678A CN 106909283 B CN106909283 B CN 106909283B
Authority
CN
China
Prior art keywords
image
canvas
cache
cache image
screen
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.)
Active
Application number
CN201710031678.XA
Other languages
Chinese (zh)
Other versions
CN106909283A (en
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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Publication of CN106909283A publication Critical patent/CN106909283A/en
Application granted granted Critical
Publication of CN106909283B publication Critical patent/CN106909283B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/80Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard

Abstract

The invention relates to a canvas display control method and a canvas display control system. And respectively acquiring coordinates to be displayed on the first cache image and the second cache image corresponding to the screen coordinates according to the canvas display operation instruction. And obtaining the color corresponding to the screen coordinate according to the colors of the positions corresponding to the to-be-displayed coordinates on the first cache image and the second cache image. And obtaining a superposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate, and outputting the superposed image to a screen for display. The part of the canvas preset area and the current display part of the canvas are obtained simultaneously for caching, the two cached images are synthesized and then displayed on the screen, the phenomenon that the user is influenced to watch due to blank in the process of controlling the canvas display is avoided, and the watching convenience is improved.

Description

Canvas display control method and system
Technical Field
The invention relates to the technical field of intelligent terminals, in particular to a canvas display control method and a canvas display control system.
Background
With the advent of the information-oriented society, the development of modern information display technology is promoted. Canvas-based drawing and composition tools are increasingly used, which draw, compose and display information using a canvas for viewing related information, such as electronic maps and slides. The observer can input instructions to control the zooming or the translation of the canvas so as to display the required content for viewing.
The conventional canvas display control method is to pan and zoom a currently rendered area when a user attempts to pan or zoom the canvas, and then render the area onto an interface for display. If the canvas exceeds the current screen display area, a blank area appears around the screen in the process of translation and zooming out, and the canvas is inconvenient for the user to view. The conventional canvas display control method has a disadvantage of low viewing convenience.
Disclosure of Invention
In view of the above, it is desirable to provide a canvas display control method and system with high viewing convenience.
A canvas display control method comprises the following steps:
when an input canvas display operation instruction is detected, acquiring a part of a canvas preset area and caching the canvas on a current display part of a screen to obtain a corresponding first cache image and a corresponding second cache image;
respectively acquiring coordinates to be displayed on the first cache image and the second cache image corresponding to screen coordinates according to the canvas display operation instruction;
obtaining the color corresponding to the screen coordinate according to the colors of the positions corresponding to the to-be-displayed coordinates on the first cache image and the second cache image;
and obtaining a superposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate, and outputting the superposed image to a screen for display.
A canvas display control system comprising:
the image caching module is used for acquiring a part of a preset region of the canvas and caching the currently displayed part of the canvas on a screen when an input canvas display operation instruction is detected, so as to obtain a corresponding first cache image and a corresponding second cache image;
the coordinate acquisition module is used for respectively acquiring coordinates to be displayed on the first cache image and the second cache image corresponding to the screen coordinates according to the canvas display operation instruction;
the color extraction module is used for obtaining the color corresponding to the screen coordinate according to the color of the position corresponding to the to-be-displayed coordinate on the first cache image and the second cache image;
and the image synthesis module is used for obtaining a superposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate and outputting the superposed image to a screen for display.
According to the canvas display control method and the canvas display control system, when an input canvas display operation instruction is detected, the part of the canvas preset area and the current display part of the canvas on the screen are obtained for caching, and the corresponding first cache image and the second cache image are obtained. And respectively acquiring coordinates to be displayed on the first cache image and the second cache image corresponding to the screen coordinates according to the canvas display operation instruction. And obtaining the color corresponding to the screen coordinate according to the colors of the positions corresponding to the to-be-displayed coordinates on the first cache image and the second cache image. And obtaining a superposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate, and outputting the superposed image to a screen for display. After the canvas display operation instruction is detected, the part of the canvas preset area and the current display part of the canvas on the screen are simultaneously obtained for caching, the two cached images are synthesized in combination with the canvas display operation instruction to obtain the superposed image which is displayed on the screen, the phenomenon that the user is influenced by the fact that the blank appears in the process of controlling the canvas display is avoided, and the viewing convenience is improved.
Drawings
FIG. 1 is a flow diagram of a canvas display control method in an embodiment;
FIG. 2 is a flowchart of a canvas display control method in another embodiment;
FIG. 3 is a block diagram of a canvas display control system in an embodiment;
FIG. 4 is a block diagram of a canvas display control system in another embodiment.
Detailed Description
In one embodiment, the canvas display control method is suitable for canvas display control in drawing and typesetting software. As shown in fig. 1, the above method comprises the following steps:
step S110: when an input canvas display operation instruction is detected, a part of a canvas preset area and a current display part of a screen are obtained to be cached, and a corresponding first cache image and a corresponding second cache image are obtained.
The canvas display operation instruction refers to an instruction for performing canvas display control, and a user can input the instruction through a mouse, a touch screen or other equipment. The specific type of the canvas display operation instruction is not unique, and may be an instruction for controlling the canvas to perform zoom display or an instruction for controlling the canvas to perform pan display.
When detecting the input canvas display operation instruction, recording the operation as the start, and caching the current display area of the screen and the part of the canvas preset area. The preset area can be selected according to actual conditions, the whole canvas can be used as the preset area, or part of the canvas can be used as the preset area, for example, one screen size is expanded from the current display area to the periphery, and the expanded area is used as the preset area. In addition, the operation is marked as the end when the canvas display operation instruction is detected to be ended, and all the operations of the user are marked as in-progress when the operation is in progress after the operation is started and before the operation is ended.
The specific mode for detecting the canvas display operation instruction is not unique, for example, when a mouse or a touch object is detected to be clicked on the canvas, the operation is recorded as the start of operation; it is also possible that when an animation plays that zooms or pans the canvas, the start time of the animation play is marked as start.
In one embodiment, after the part of the preset region of the canvas and the current display part of the canvas are acquired, the acquired part are cached in a memory of a display card, and a corresponding first cache image and a corresponding second cache image are acquired. The image is directly cached in the display memory, and the image synthesis is carried out by utilizing the hardware acceleration characteristic of the display card, so that the occupation of a memory and a Central Processing Unit (CPU) is saved.
In one embodiment, the step S110 of obtaining the portion of the preset region of the canvas and caching the currently displayed portion of the canvas on the screen to obtain the corresponding first cache image and the second cache image includes steps 112 and 114.
Step 112: and acquiring a part of the preset region of the canvas and caching the bitmap into a memory of the display card to obtain a first cache image.
Step 114: and acquiring the current display part of the canvas on the screen and caching the canvas in the memory of the display card to obtain a second cache image.
When the part of the preset region of the cache canvas reaches the memory of the display card, the bitmap cache with lower quality is used, so that the phenomenon that too much memory of the display card is occupied when the part needing caching is too large is avoided, and the performance of the display card is improved.
Step S120: and respectively acquiring coordinates to be displayed on the first cache image and the second cache image corresponding to the screen coordinates according to the canvas display operation instruction.
The corresponding relation between the screen coordinate and the coordinate of the two cache images after the movement can be determined according to the canvas display operation instruction, and the coordinate to be displayed corresponding to the screen coordinate on the two cache images can be found according to the corresponding relation. Taking a translation canvas as an example, the screen coordinates (X, Y) before the canvas is translated correspond to the coordinates (X, Y) of the first cache image, and if the canvas is horizontally moved to the left by h through the canvas display operation instruction, the screen coordinates (X, Y) after the movement correspond to the coordinates (X + h, Y) to be displayed of the first cache image. And similarly, the coordinates to be displayed on the second cache image corresponding to the screen coordinates can be obtained.
Step S130: and obtaining the color corresponding to the screen coordinate according to the colors of the positions corresponding to the to-be-displayed coordinates on the first cache image and the second cache image.
After the coordinates to be displayed on the first cache image and the second cache image are obtained, the color of the corresponding position can be directly extracted according to the coordinates to be displayed, and then the color of the screen coordinates is obtained through calculation. Specifically, the color includes a color value and a transparency, and according to the color value and the transparency of the position corresponding to the to-be-displayed coordinate, the color value and the transparency corresponding to the screen coordinate can be determined, so that the color of the screen coordinate is determined.
In one embodiment, step S130 includes steps 132 through 138.
Step 132: and judging whether the coordinates to be displayed on the first cache image and the second cache image exceed the image boundary of the corresponding cache image.
And respectively judging whether the coordinates to be displayed determined on the first cache image and the second cache image exceed the image boundary of the corresponding cache image, so that the subsequent steps can be correspondingly processed according to the judgment result.
Step 134: and when the coordinates to be displayed on the first cache image and the second cache image exceed the image boundary of the corresponding cache image, setting the corresponding screen coordinates to be transparent.
And if the coordinates to be displayed determined on the two cache images exceed the image boundary of the corresponding cache image, setting the corresponding screen coordinates as transparent colors.
Step 136: and when one image boundary which does not exceed the corresponding cache image exists in the to-be-displayed coordinates of the first cache image and the second cache image, acquiring the color of the position corresponding to the coordinates which do not exceed the image boundary of the corresponding cache image, and acquiring the color corresponding to the screen coordinates.
And if one to-be-displayed coordinate of the two cache images does not exceed the image boundary of the corresponding cache image, taking the color of the position corresponding to the to-be-displayed coordinate as the color of the corresponding screen coordinate.
Step 138: and when the to-be-displayed coordinates on the first cache image and the second cache image do not exceed the image boundaries of the corresponding cache images, overlapping the colors of the positions corresponding to the to-be-displayed coordinates on the first cache image and the second cache image to obtain the color corresponding to the screen coordinate.
And if the determined coordinates to be displayed on the two cache images do not exceed the corresponding image boundary, overlapping the colors of the positions of the two coordinates to be displayed to obtain the color of the corresponding screen coordinate. Specifically, in this embodiment, step 138 superimposes the second cache image onto the first cache image by using a transparency superimposing formula, and obtains a color corresponding to the screen coordinate, specifically:
transparency 1- (1-transparency 1) × (1-transparency 2)
Color value 2 transparency 1 color value 1 transparency 1
Wherein, color value 1 and transparency 1 are the color value and transparency of the corresponding position of the coordinate to be displayed on the first cache image respectively, and color value 2 and transparency 2 are the color value and transparency of the corresponding position of the coordinate to be displayed on the second cache image respectively. Therefore, the transparency and the color value of the screen coordinate can be respectively calculated, and the color of the screen coordinate is determined.
Specifically, in step S120 and step S130, the algorithm for calculating the coordinates to be displayed on the first buffer image and the second buffer image corresponding to the screen coordinates and obtaining the color of the corresponding screen coordinates according to the colors of the positions corresponding to the coordinates to be displayed on the first buffer image and the second buffer image is as follows:
Figure BDA0001211810280000051
Figure BDA0001211810280000061
Figure BDA0001211810280000071
wherein, the algorithm calculates the coordinates of the screen corresponding to the coordinates of the first cache image on the 1 st line, and calculates the coordinates of the screen corresponding to the coordinates of the second cache image on the 2 nd line. And then judging whether the calculated coordinates exceed the corresponding image boundaries or not, and correspondingly processing according to the judgment result to obtain the superposition color of the two cache images under the screen coordinates.
Step S140: and obtaining a superposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate, and outputting the superposed image to a screen for display.
Traversing each coordinate of the display area on the screen, calculating the color of each screen coordinate, and displaying the complete superposed image on the screen.
In steps S120 to S140, when the operation is in progress, the current display area and the preset area of the canvas are cached, and when the operation is performed, the two cached images are displayed in a composite manner. It can be understood that the combining and displaying operations in steps S120 to S140 may also be performed in a graphics card, and the combining efficiency is improved by using the powerful parallel computing capability of the graphics card.
According to the canvas display control method, after the canvas display operation instruction is detected, the part of the preset region of the canvas and the current display part of the canvas on the screen are simultaneously obtained for caching, and the two cached images are synthesized by combining the canvas display operation instruction to obtain the superposed image to be displayed on the screen, so that the phenomenon that the blank appears in the process of controlling the canvas display to influence the user to watch is avoided, and the watching convenience is improved. In the whole control process, the canvas is always and completely displayed for the user, and the definition is only switched in the surrounding partial area, so that the user can not feel the flicker feeling of the picture.
In one embodiment, as shown in FIG. 2, after the step S140, the canvas display controlling method may further include a step S150 and a step S160.
Step S150: whether the canvas display operation instruction is finished or not is detected.
When the canvas display operation instruction is detected to be finished, the operation is finished, whether the canvas display operation instruction is finished or not is judged, and the operation can be finished by releasing a mouse or moving the last touch point away from the canvas; or when an animation plays for zooming or translating the canvas, the end time of the animation plays is recorded as the operation end. When it is detected that the canvas display operation instruction is ended, step S160 is performed.
Step S160: and obtaining the image displayed by the curtain for caching to obtain a new second cache image.
And obtaining the currently displayed image of the curtain again for caching to obtain a new second cache image, and returning to the step S120. The method can be implemented by establishing a thread to cache the current display area part at random, and can be executed when the user operation and the rendering thread are idle or executed at any time. In this embodiment, step S160 is executed when the user operation and rendering thread are idle, so as to optimize resources.
In this embodiment, when the display control is performed on the canvas according to the canvas display operation instruction, the current display part of the canvas is acquired in real time to update the second cache image, so that the main area is always clear in the operation process of the user, and the display effect is improved.
In one embodiment, with continued reference to fig. 2, when the canvas display operation instruction ends, the canvas display control method further includes the step S170.
Step S170: and clearing the cached image. And when the operation is finished, the first cache image and the second cache image which are cached are cleared, so that the cache space is prevented from being occupied, the display control is conveniently carried out according to the user operation next time, and the operation is convenient.
In one embodiment, the canvas display control system is suitable for canvas display control in drawing and typesetting software. As shown in fig. 3, the system includes an image caching module 110, a coordinate acquisition module 120, a color extraction module 130, and an image composition module 140.
The image caching module 110 is configured to, when an input canvas display operation instruction is detected, obtain a portion of a canvas preset area and cache the canvas on a currently displayed portion of a screen to obtain a corresponding first cache image and a corresponding second cache image.
The canvas display operation instruction refers to an instruction for performing canvas display control, and a user can input the instruction through a mouse, a touch screen or other equipment. The specific type of the canvas display operation instruction is not unique, and the specific mode for detecting the canvas display operation instruction is not unique. The preset area can be selected according to actual conditions, the whole canvas can be used as the preset area, and part of the canvas can be used as the preset area.
In an embodiment, the image caching module 110 obtains a portion of the preset region of the canvas and caches the canvas in the memory of the display card after the currently displayed portion of the screen, so as to obtain a corresponding first cache image and a corresponding second cache image. The image is directly cached in the video memory, and the image synthesis is carried out by utilizing the hardware acceleration characteristic of the video card, so that the occupation of the memory and the CPU is saved.
In one embodiment, the image caching module 110 includes a first image caching unit and a second image caching unit.
The first image caching unit is used for acquiring a part of a canvas preset area and caching a bitmap into a memory of the display card when an input canvas display operation instruction is detected, so that a first caching image is obtained.
And the second image caching unit is used for acquiring the currently displayed part of the canvas on the screen and caching the canvas in the memory of the display card to obtain a second cached image when detecting the input canvas display operation instruction.
When the part of the preset region of the cache canvas reaches the memory of the display card, the bitmap cache with lower quality is used, so that the phenomenon that too much memory of the display card is occupied when the part needing caching is too large is avoided, and the performance of the display card is improved.
The coordinate obtaining module 120 is configured to obtain coordinates to be displayed on the first cache image and the second cache image corresponding to the screen coordinates according to the canvas display operation instruction.
The corresponding relation between the screen coordinate and the coordinate of the two cache images after the movement can be determined according to the canvas display operation instruction, and the coordinate to be displayed corresponding to the screen coordinate on the two cache images can be found according to the corresponding relation.
The color extraction module 130 is configured to obtain a color corresponding to the screen coordinate according to the color of the position corresponding to the to-be-displayed coordinate on the first cache image and the second cache image.
After the coordinates to be displayed on the first cache image and the second cache image are obtained, the color of the corresponding position can be directly extracted according to the coordinates to be displayed, and then the color of the screen coordinates is obtained through calculation. Specifically, the color includes a color value and a transparency, and according to the color value and the transparency of the position corresponding to the to-be-displayed coordinate, the color value and the transparency corresponding to the screen coordinate can be determined, so that the color of the screen coordinate is determined.
In one embodiment, the color extraction module 130 includes a coordinate determination unit, a first extraction unit, a second extraction unit, and a third extraction unit.
The coordinate judging unit is used for judging whether the coordinates to be displayed on the first cache image and the second cache image exceed the image boundary of the corresponding cache image.
The first extraction unit is used for setting the corresponding screen coordinate to be transparent when the to-be-displayed coordinate on the first cache image and the second cache image exceeds the image boundary of the corresponding cache image.
The second extraction unit is used for acquiring the color of the position corresponding to the coordinate which does not exceed the image boundary of the corresponding cache image when the image boundary which does not exceed the corresponding cache image exists in the to-be-displayed coordinates of the first cache image and the second cache image, and acquiring the color corresponding to the screen coordinate.
And the third extraction unit is used for superposing the colors of the positions corresponding to the coordinates to be displayed on the first cache image and the second cache image when the coordinates to be displayed on the first cache image and the second cache image do not exceed the image boundaries of the corresponding cache images, so as to obtain the color corresponding to the screen coordinates.
In this embodiment, the third extracting unit superimposes the second cache image onto the first cache image by using a transparency superimposing formula, and obtains a color corresponding to the screen coordinate, specifically:
transparency 1- (1-transparency 1) × (1-transparency 2)
Color value 2 transparency 1 color value 1 transparency 1
Wherein, color value 1 and transparency 1 are the color value and transparency of the corresponding position of the coordinate to be displayed on the first cache image respectively, and color value 2 and transparency 2 are the color value and transparency of the corresponding position of the coordinate to be displayed on the second cache image respectively. Therefore, the transparency and the color value of the screen coordinate can be respectively calculated, and the color of the screen coordinate is determined.
The image synthesis module 140 is configured to obtain a superimposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate, and output the superimposed image to the screen for display.
Traversing each coordinate of the display area on the screen, calculating the color of each screen coordinate, and displaying the complete superposed image on the screen.
The coordinate obtaining module 120, the color extracting module 130 and the image synthesizing module 140 buffer the current display area and the preset area of the canvas during operation, and synthesize and display the two buffered images during rendering. It can be understood that the synthesis display operation of the coordinate obtaining module 120, the color extracting module 130 and the image synthesizing module 140 may also be performed in a graphics card, and the synthesis efficiency is improved by using the powerful parallel computing capability of the graphics card.
According to the canvas display control system, after the canvas display operation instruction is detected, the part of the canvas preset area and the current display part of the canvas on the screen are simultaneously obtained for caching, the canvas display operation instruction is combined to synthesize two cached images to obtain the superposed image to be displayed on the screen, the phenomenon that the blank appears in the process of controlling the canvas display to influence the user to watch is avoided, and the watching convenience is improved. In the whole control process, the canvas is always and completely displayed for the user, and the definition is only switched in the surrounding partial area, so that the user can not feel the flicker feeling of the picture.
In one embodiment, as shown in FIG. 4, the canvas display control system further comprises an instruction detection module 150.
The instruction detection module 150 is configured to detect whether the canvas display operation instruction is finished after the image synthesis module 140 obtains a superimposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate and outputs the superimposed image to the screen for display; if not, the image displayed by the curtain is obtained for caching to obtain a new second cache image, and the coordinate obtaining module 120 is controlled to obtain the first cache image corresponding to the screen coordinate and the coordinate to be displayed on the second cache image respectively according to the canvas display operation instruction.
And recording the operation end when the canvas display operation instruction is detected to be ended, and judging whether the canvas display operation instruction is ended or not in a non-unique mode. The method can be implemented by establishing a thread to cache the current display area part at random, and can be executed when the user operation and the rendering thread are idle or executed at any time. In this embodiment, the instruction detection module 150 obtains an image displayed by the curtain for caching when the user operates and the rendering thread is idle, so as to optimize resources.
In this embodiment, when the display control is performed on the canvas according to the canvas display operation instruction, the current display part of the canvas is acquired in real time to update the second cache image, so that the main area is always clear in the operation process of the user, and the display effect is improved.
In one embodiment, with continued reference to FIG. 4, the canvas display control system further comprises a cache flush module 160.
The cache removal module 160 is configured to remove the cached image when the canvas display operation instruction ends. When the operation is finished, the first cache image and the second cache image which are cached are cleared, so that the cache space is prevented from being occupied, the display control can be conveniently carried out according to the user operation next time, and the operation is convenient.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A canvas display control method is characterized by comprising the following steps:
when an input canvas display operation instruction is detected, acquiring a canvas preset area for caching to obtain a first cache image, and acquiring the canvas for caching in a current display part of a screen to obtain a second cache image;
respectively acquiring coordinates to be displayed on the first cache image and the second cache image corresponding to screen coordinates according to the canvas display operation instruction;
obtaining the color corresponding to the screen coordinate according to the colors of the positions corresponding to the to-be-displayed coordinates on the first cache image and the second cache image;
and obtaining a superposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate, and outputting the superposed image to a screen for display.
2. The canvas display control method according to claim 1, wherein the step of obtaining the portion of the canvas preset area and the current display portion of the canvas on the screen for caching to obtain the corresponding first cache image and second cache image comprises the steps of:
acquiring a part of a preset region of a canvas and caching a bitmap in a memory of a display card to obtain a first cache image;
and acquiring the current display part of the canvas on the screen and caching the canvas in a memory of the display card to obtain a second cache image.
3. The canvas display control method according to claim 1, wherein the step of obtaining the color corresponding to the screen coordinate according to the color of the position corresponding to the to-be-displayed coordinate on the first cache image and the second cache image comprises the steps of:
judging whether the coordinates to be displayed on the first cache image and the second cache image exceed the image boundary of the corresponding cache image or not;
when the coordinates to be displayed on the first cache image and the second cache image exceed the image boundary of the corresponding cache image, setting the corresponding screen coordinates to be transparent;
when the coordinates to be displayed on the first cache image and the second cache image do not exceed the image boundary of the corresponding cache image, acquiring the color of the position corresponding to the coordinates which do not exceed the image boundary of the corresponding cache image, and acquiring the color corresponding to the screen coordinates;
when the to-be-displayed coordinates on the first cache image and the second cache image do not exceed the image boundaries of the corresponding cache images, overlapping the colors of the positions corresponding to the to-be-displayed coordinates on the first cache image and the second cache image to obtain the color corresponding to the screen coordinate.
4. The canvas display control method according to claim 2, wherein after the step of obtaining the superimposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate and outputting the superimposed image to a screen for display, the method further comprises the steps of:
detecting whether the canvas display operation instruction is finished or not;
and if not, acquiring the image displayed by the canvas for caching to obtain a new second cache image, and returning to the step of respectively acquiring the coordinates to be displayed on the first cache image and the second cache image corresponding to the screen coordinates according to the canvas display operation instruction.
5. The canvas display control method according to claim 4, further comprising a step of clearing the cached images when the canvas display operation instruction ends.
6. A canvas display control system, comprising:
the image caching module is used for acquiring a preset region of the canvas for caching to obtain a first cache image and acquiring the current display part of the canvas on a screen for caching to obtain a second cache image when an input canvas display operation instruction is detected;
the coordinate acquisition module is used for respectively acquiring coordinates to be displayed on the first cache image and the second cache image corresponding to the screen coordinates according to the canvas display operation instruction;
the color extraction module is used for obtaining the color corresponding to the screen coordinate according to the color of the position corresponding to the to-be-displayed coordinate on the first cache image and the second cache image;
and the image synthesis module is used for obtaining a superposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate and outputting the superposed image to a screen for display.
7. The canvas display control system according to claim 6, wherein the image caching module comprises:
the first image caching unit is used for acquiring a part of a canvas preset area and caching a bitmap into a memory of the display card to obtain a first cache image when an input canvas display operation instruction is detected;
and the second image caching unit is used for acquiring the currently displayed part of the canvas on the screen and caching the part into the memory of the display card to obtain a second cached image when an input canvas display operation instruction is detected.
8. The canvas display control system according to claim 6, wherein the color extraction module comprises:
the coordinate judging unit is used for judging whether the to-be-displayed coordinates on the first cache image and the second cache image exceed the image boundary of the corresponding cache image or not;
the first extraction unit is used for setting the corresponding screen coordinates to be transparent when the to-be-displayed coordinates on the first cache image and the second cache image exceed the image boundaries of the corresponding cache images;
the second extraction unit is used for acquiring the color of the position corresponding to the coordinate which does not exceed the image boundary of the corresponding cache image when the image boundary which does not exceed the corresponding cache image exists in the to-be-displayed coordinates on the first cache image and the second cache image, and acquiring the color corresponding to the screen coordinate;
and the third extraction unit is used for superposing the colors of the positions corresponding to the to-be-displayed coordinates on the first cache image and the second cache image to obtain the color corresponding to the screen coordinate when the to-be-displayed coordinates on the first cache image and the second cache image do not exceed the image boundary of the corresponding cache image.
9. The canvas display control system according to claim 7, further comprising an instruction detection module for detecting whether the canvas display operation instruction is finished or not after the image synthesis module obtains a superimposed image corresponding to the canvas display operation instruction according to the color of each screen coordinate and outputs the superimposed image to a screen for display; if not, the image displayed by the canvas is obtained for caching to obtain a new second cache image, and the coordinate obtaining module is controlled to obtain the coordinates to be displayed on the first cache image and the second cache image corresponding to the screen coordinates respectively according to the canvas display operation instruction.
10. The canvas display control system according to claim 9, further comprising a cache flush module for flushing a cached image when the canvas display operation instruction ends.
CN201710031678.XA 2016-11-01 2017-01-17 Canvas display control method and system Active CN106909283B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2016109372761 2016-11-01
CN201610937276 2016-11-01

Publications (2)

Publication Number Publication Date
CN106909283A CN106909283A (en) 2017-06-30
CN106909283B true CN106909283B (en) 2020-03-06

Family

ID=59206980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710031678.XA Active CN106909283B (en) 2016-11-01 2017-01-17 Canvas display control method and system

Country Status (1)

Country Link
CN (1) CN106909283B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108846875A (en) * 2018-04-26 2018-11-20 广州视源电子科技股份有限公司 Shape data treating method and apparatus
CN110930857B (en) * 2019-05-31 2022-04-15 上海华兴数字科技有限公司 Method and device for drawing scattered points
CN113407082B (en) * 2021-06-23 2023-09-12 青岛海信移动通信技术有限公司 Font color control method and related device applied to terminal equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IL134623A0 (en) * 2000-02-20 2001-04-30 Anysoft Ltd Method for constructing and storing a set of operations from commands intended for drawing pictures on the screen
EP1516303A2 (en) * 2002-06-20 2005-03-23 Alberto Baroncelli Vector graphics circuit accelerator for display systems
JP2005100176A (en) * 2003-09-25 2005-04-14 Sony Corp Image processor and its method
CN101593354B (en) * 2009-07-01 2013-04-10 上海可鲁系统软件有限公司 Method and device for redrawing two-dimension vector graphics
CN102012924B (en) * 2010-11-29 2013-07-03 深圳市融创天下科技股份有限公司 Map display method and system and mobile terminal
CN103268620A (en) * 2013-04-28 2013-08-28 华为技术有限公司 Graphic processing method, graphic processing device and terminal device
CN104077100B (en) * 2014-06-27 2017-04-12 广东威创视讯科技股份有限公司 Composite buffer area image display method and device
CN104793945B (en) * 2015-04-27 2018-03-13 深圳市美贝壳科技有限公司 The high-volume image display method and its device for preventing internal memory from overflowing

Also Published As

Publication number Publication date
CN106909283A (en) 2017-06-30

Similar Documents

Publication Publication Date Title
CN106909283B (en) Canvas display control method and system
WO2002031773A1 (en) Image processing apparatus, image processing method, record medium, computer program, and semiconductor device
US10347000B2 (en) Entity visualization method
JP5178961B2 (en) Image synthesizer
US20140016913A1 (en) Moving image generation device
US9001139B2 (en) Image processing device and image processing method
KR20150119621A (en) display apparatus and image composition method thereof
JP2009124510A (en) Display control apparatus and method thereof, program, and recording medium
JP6527641B2 (en) Image processing apparatus and superimposed image generation method
CN109389558B (en) Method and device for eliminating image edge saw teeth
US20120242693A1 (en) Image synthesis device and image synthesis program
CN114241168A (en) Display method, display device, and computer-readable storage medium
CN114913067A (en) Rendering method and device for dynamic resolution, electronic equipment and readable storage medium
JP6947939B2 (en) Image generator, image generation method and program
JP2009290485A (en) Image processor
JP7046506B2 (en) Information processing equipment, information processing methods and programs
CN107992256B (en) Window control method, device and system
JP4323910B2 (en) Image composition apparatus and method
JP2007142542A (en) Image display device
JP2023013538A (en) Image processing apparatus, image processing method, and program
JP7005338B2 (en) Information processing equipment and its control method and program
JP2005084088A (en) Image comparison display method and its device, and image comparison display program
JP2014106647A (en) Image processing apparatus, image processing method, and program
JP7370769B2 (en) Image processing device, image processing method and program
JP5761386B2 (en) Image processing apparatus, image processing method, and image processing program

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
GR01 Patent grant
GR01 Patent grant