Mouse pointer rendering method, device, electronic device and storage medium
By converting the mouse pointer lattice data in the cloud game server into a bitmap image and performing stroke processing, the problem of mouse operation delay and insufficient image distinction in cloud games is solved, and the display effect and control experience of the mouse pointer are improved.
Patent Information
- Application Number
- CN202111398550.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-23
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-11-23
AI Technical Summary
In cloud games, server-side rendering of mouse pointer images causes delays in mouse operations, and custom mouse images when rendered on the client side are difficult to distinguish from the background on different terminals, affecting the control experience.
Convert the mouse pointer lattice data in the cloud game server into a bitmap image, and perform stroke processing to generate the client mouse pointer image, ensuring that the image can be effectively distinguished from the background on terminals with different display characteristics.
It improves the display effect and control experience of mouse pointer images in cloud games, reduces mouse operation delays, and enhances the distinction between images and backgrounds.
Smart Images

Figure CN114125013B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud gaming technology, and in particular to a mouse pointer rendering method, a mouse pointer rendering device, an electronic device and a storage medium. Background Art
[0002] Cloud gaming is a new way of running games based on cloud computing. The technology was first proposed by Onlive. In 2018, with the participation of giants such as Google, Microsoft, Nvidia, and Sony, the popularity of cloud gaming continued to rise. In the cloud gaming mode, the rendering of the game screen is completed on the server side. The rendered game screen is encoded and streamed to the gamer's terminal via the network. On the client side, gamers no longer need high-end gaming equipment, but only basic video decoding capabilities to play games.
[0003] The mouse is the main input method for PC (Personal Computer) games. The implementation of mouse input for cloud games is related to the control experience of cloud games. Therefore, an important feature of mouse image display needs to be adapted to various types of clients and needs to have good distinction from the screen background for easy identification. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a mouse pointer rendering method, a mouse pointer rendering device, an electronic device and a storage medium that overcome the above problems or at least partially solve the above problems.
[0005] An embodiment of the present invention discloses a mouse pointer rendering method, which is applied to a cloud game client, wherein the cloud game client is connected to a cloud game server, and the method includes:
[0006] Receiving mouse pointer dot matrix data sent by the cloud game server;
[0007] Converting the mouse pointer dot matrix data into a bitmap image;
[0008] Performing stroke processing on the bitmap image to generate a client mouse pointer image;
[0009] The client mouse pointer image is displayed.
[0010] Optionally, the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask; the step of converting the mouse pointer dot matrix data into a bitmap image includes:
[0011] Reading an AND mask and an XOR mask of the first pixel;
[0012] According to a preset coding rule, the AND mask and the XOR mask are calculated to determine the pixel type of the first pixel;
[0013] The first pixel points are filled based on the pixel type to form a bitmap image.
[0014] Optionally, the pixel type includes an inverted color type, and the step of filling the first pixel point based on the pixel type to form a bitmap image includes:
[0015] Determine a first color corresponding to the inverted color type;
[0016] The first pixel point of the inverted color type is filled with the first color to form a bitmap image.
[0017] Optionally, the step of performing stroke processing on the bitmap image to generate a client mouse pointer image includes:
[0018] Traversing pixel types corresponding to the first pixel point;
[0019] When the pixel type is a preset type, determining a second pixel point adjacent to the first pixel point;
[0020] Performing stroke processing on the second pixel point to generate a stroke image;
[0021] The stroke image and the bitmap image are combined to generate a client mouse pointer image.
[0022] Optionally, the step of performing stroke processing on the second pixel point to generate a stroked image includes:
[0023] Determine whether the pixel type corresponding to the second pixel point is a transparent type;
[0024] If yes, fill the second pixel with a preset second color;
[0025] If not, fill the second pixel point with the initial color corresponding to the pixel type;
[0026] The second pixel points after filling are combined to generate a stroke image.
[0027] Optionally, the step of performing stroke processing on the second pixel point to generate a stroked image includes:
[0028] Determine a pixel width corresponding to the second pixel point;
[0029] The pixel width is adjusted to generate a stroke image.
[0030] A mouse pointer rendering method is applied to a cloud game server, wherein the cloud game server is connected to a cloud game client, and the method comprises:
[0031] Get the mouse pointer dot matrix data;
[0032] The mouse pointer dot matrix data is sent to the cloud game client; the cloud game client is used to convert the mouse pointer dot matrix data into a bitmap image, perform stroke processing on the bitmap image to generate a client mouse pointer image, and display the client mouse pointer image.
[0033] A mouse pointer rendering method is applied to a cloud game server, wherein the cloud game server is connected to a cloud game client, and the method comprises:
[0034] Get the mouse pointer dot matrix data;
[0035] Converting the mouse pointer dot matrix data into a bitmap image;
[0036] Performing stroke processing on the bitmap image to generate a client mouse pointer image;
[0037] The client mouse pointer image is sent to the cloud game client; the cloud game client is used to receive the client mouse pointer image and display the client mouse pointer image.
[0038] A mouse pointer rendering method is applied to a cloud game client, wherein the cloud game client is connected to a cloud game server, and the method comprises:
[0039] Receive a client mouse pointer image sent by the cloud game server; the client mouse pointer image is generated by the cloud game server by converting the mouse pointer dot matrix data into a bitmap image and performing stroke processing on the bitmap image.
[0040] The client mouse pointer image is displayed.
[0041] A mouse pointer rendering method is applied to a cloud gaming system, wherein the cloud gaming system includes a cloud gaming server and a cloud gaming client. The method includes:
[0042] The cloud game server obtains mouse pointer dot matrix data;
[0043] The cloud game server sends the mouse pointer dot matrix data to the cloud game client;
[0044] The cloud game client receives the mouse pointer dot matrix data sent by the cloud game server;
[0045] The cloud game client converts the mouse pointer dot matrix data into a bitmap image;
[0046] The cloud game client performs stroke processing on the bitmap image to generate a client mouse pointer image;
[0047] The cloud gaming client displays the client mouse pointer image.
[0048] A mouse pointer rendering method is applied to a cloud gaming system, wherein the cloud gaming system includes a cloud gaming server and a cloud gaming client. The method includes:
[0049] The cloud game server obtains mouse pointer dot matrix data;
[0050] The cloud game server converts the mouse pointer dot matrix data into a bitmap image;
[0051] The cloud game server performs stroke processing on the bitmap image to generate a client mouse pointer image;
[0052] The cloud game server sends the client mouse pointer image to the cloud game client;
[0053] The cloud game client receives the client mouse pointer image;
[0054] The cloud gaming client displays the client mouse pointer image.
[0055] The embodiment of the present invention further discloses a mouse pointer rendering device, which is applied to a cloud game client, and the cloud game client is connected to a cloud game server. The device includes:
[0056] A first receiving module, used to receive mouse pointer dot matrix data sent by the cloud game server;
[0057] A first conversion module, used for converting the mouse pointer dot matrix data into a bitmap image;
[0058] A first stroke module, used for performing stroke processing on the bitmap image to generate a client mouse pointer image;
[0059] The first display module is used to display the client mouse pointer image.
[0060] A mouse pointer rendering device is applied to a cloud game server, the cloud game server is connected to a cloud game client, and the device comprises:
[0061] The first acquisition module is used to acquire the mouse pointer dot matrix data;
[0062] The first sending module is used to send the mouse pointer dot matrix data to the cloud game client; the cloud game client is used to convert the mouse pointer dot matrix data into a pixel image, perform stroke processing on the bitmap image to generate a client mouse pointer image, and display the client mouse pointer image.
[0063] A mouse pointer rendering device is applied to a cloud game server, the cloud game server is connected to a cloud game client, and the device comprises:
[0064] The second acquisition module is used to acquire the mouse pointer dot matrix data;
[0065] A second conversion module, used for converting the mouse pointer dot matrix data into a bitmap image;
[0066] A second stroke module, used for performing stroke processing on the bitmap image to generate a client mouse pointer image;
[0067] The second sending module is used to send the client mouse pointer image to the cloud game client; the cloud game client is used to receive the client mouse pointer image and display the client mouse pointer image.
[0068] A mouse pointer rendering device is applied to a cloud game client, the cloud game client is connected to a cloud game server, and the device comprises:
[0069] The second receiving module is used to receive the client mouse pointer image sent by the cloud game server; the client mouse pointer image is generated by the cloud game server by converting the mouse pointer dot matrix data into a bitmap image and performing stroke processing on the bitmap image.
[0070] The second display module is used to display the client mouse pointer image.
[0071] A mouse pointer rendering device is applied to a cloud gaming system, wherein the cloud gaming system includes a cloud gaming server and a cloud gaming client, and the device includes:
[0072] A third acquisition module and a third sending module located in the cloud game server, a third receiving module, a third conversion module, a third stroke module and a third display module located in the cloud game client,
[0073] The third acquisition module is used to acquire mouse pointer dot matrix data;
[0074] The third sending module is used to send the mouse pointer dot matrix data to the cloud game client;
[0075] The third receiving module is used to receive the mouse pointer dot matrix data sent by the cloud game server;
[0076] The third conversion module is used to convert the mouse pointer dot matrix data into a bitmap image;
[0077] The third stroke module is used to perform stroke processing on the bitmap image to generate a client mouse pointer image;
[0078] The third display module is used to display the client mouse pointer image.
[0079] A mouse pointer rendering device is applied to a cloud gaming system, wherein the cloud gaming system includes a cloud gaming server and a cloud gaming client, and the device includes:
[0080] A fourth acquisition module, a fourth conversion module, a fourth stroke module and a fourth sending module located in the cloud game server, a fourth receiving module and a fourth display module located in the cloud game client,
[0081] The fourth acquisition module is used to acquire mouse pointer dot matrix data;
[0082] The fourth conversion module is used to convert the mouse pointer dot matrix data into a bitmap image;
[0083] The fourth stroke module is used to perform stroke processing on the bitmap image to generate a client mouse pointer image;
[0084] The fourth sending module is used to send the client mouse pointer image to the cloud game client;
[0085] The fourth receiving module is used to receive the client mouse pointer image;
[0086] The fourth display module is used to display the client mouse pointer image.
[0087] An embodiment of the present invention further discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the mouse pointer rendering method described above when executed by the processor.
[0088] The embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the mouse pointer rendering method described above are implemented.
[0089] The embodiments of the present invention include the following advantages:
[0090] The embodiment of the present invention converts the mouse pointer dot matrix data in the cloud game server into a bitmap image; the mouse pointer style can be determined, and then the bitmap image is stroked to highlight the edge of the mouse pointer to generate a client mouse pointer image; the client mouse pointer image can be displayed on terminals with different display characteristics, and the client mouse pointer image can be effectively distinguished from the background color when displayed, thereby improving the display effect of the mouse pointer image in the cloud game. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 It is a flowchart of the steps of a first embodiment of a mouse pointer rendering method of the present invention;
[0092] Figure 2 is a flowchart of the steps of a second embodiment of a mouse pointer rendering method of the present invention;
[0093] Figure 3 It is a schematic diagram of visualizing black and white mouse pointer image dot matrix data of the I-Beam system of the present invention;
[0094] Figure 4 It is a schematic diagram of a bitmap image of the present invention;
[0095] Figure 5 is a schematic diagram of a second pixel point of the present invention;
[0096] Figure 6 It is a schematic diagram of a stroke image of the present invention;
[0097] Figure 7 is a flowchart of the steps of Embodiment 3 of a mouse pointer rendering method of the present invention;
[0098] Figure 8 is a flowchart of the steps of a fourth embodiment of a mouse pointer rendering method of the present invention;
[0099] Fig. 9 is a flowchart of the steps of a fifth embodiment of a mouse pointer rendering method of the present invention;
[0100] Fig.10 is a flowchart of the steps of a sixth embodiment of a mouse pointer rendering method of the present invention;
[0101] Fig.11 is a flowchart of the steps of Embodiment 7 of a mouse pointer rendering method of the present invention;
[0102] Fig.12 It is a structural block diagram of a first embodiment of a mouse pointer rendering device of the present invention;
[0103] Fig.13 It is a structural block diagram of a second embodiment of a mouse pointer rendering device of the present invention;
[0104] Fig.14 It is a structural block diagram of a third embodiment of a mouse pointer rendering device of the present invention;
[0105] Fig.15 It is a structural block diagram of a fourth embodiment of a mouse pointer rendering device of the present invention;
[0106] Fig.16 It is a structural block diagram of a fifth embodiment of a mouse pointer rendering device of the present invention;
[0107] Fig.17 It is a structural block diagram of a sixth embodiment of a mouse pointer rendering device of the present invention;
[0108] Fig.18 is a structural block diagram of an electronic device provided by an embodiment of the present invention;
[0109] Fig.19 It is a structural block diagram of a storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0110] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0111] Currently, there are two ways to implement mouse rendering in cloud games. One is to complete the rendering on the server side, and the mouse pointer image is drawn on the game screen. The entire game screen is transmitted to the client through network streaming. This method is consistent with the native display. The other method is to put the mouse image rendering process on the client side and use the system native mouse to replace the cloud mouse display.
[0112] Among them, the disadvantage of server-side rendering is that the mouse image cannot achieve fast feedback when performing mouse operations because the network delay causes a large delay in the display of the mouse image.
[0113] When rendering the mouse pointer image on the client, you first need to obtain the mouse image data on the corresponding Windows (operating system) server. Windows mouse image data is divided into two types: system and custom. The system mouse image achieves four effects: white, black, transparent, and inverted, and then achieves the purpose of distinguishing from the background; the custom mouse image data is an ordinary color image that supports background transparency (supports Alpha channel).
[0114] The system mouse image data on the server side needs to cope with a variety of different client types, such as Windows (operating system), macOS (operating system), etc. The native mouse drawing methods of different clients are different. On the Windows client, the resource ID of the mouse image can be passed to the Windows client. The Windows client sets the mouse image resource ID to achieve the same mouse image display effect as the server. On other systems, because there is no corresponding Windows system feature, the usual implementation is to convert the Windows system mouse image into a custom mouse image for display. However, since the default system mouse image is only in black and white, the mouse image and the background may be indistinguishable in scenes where the background color is similar to the system mouse image color, making it difficult for gamers to quickly and accurately identify the mouse image.
[0115] Reference Figure 1 , shows a flowchart of the steps of a first embodiment of a mouse pointer rendering method of the present invention, the method is applied to a cloud game client, the cloud game client is connected to a cloud game server,
[0116] It should be noted that in the embodiment of the present invention, the cloud game client is a terminal device that game players can interact with when playing cloud games. When the game players play cloud games, the server connected to the cloud game client is the cloud game server. The cloud game client and the cloud game server can be devices under different operating systems, such as the cloud game client is a macOS system and the cloud game server is a Windows system. More specifically, the cloud game server can only be a Windows system.
[0117] The method may specifically include the following steps:
[0118] Step 101, receiving mouse pointer dot matrix data sent by the cloud game server;
[0119] When a game player performs cloud game operations on the cloud game client, the cloud game client receives the mouse pointer dot matrix data sent by the cloud game server in real time; wherein, the mouse pointer dot matrix data is data formed by the dot matrix corresponding to the system mouse image of the operating system of the cloud game server, and has a dedicated resource ID (Identity document) in the operating system of the cloud game server, which is a dot matrix described by bits.
[0120] Step 102, converting the mouse pointer dot matrix data into a bitmap image;
[0121] After receiving the mouse pointer dot matrix data, the mouse pointer dot matrix data is converted into a bitmap image with pixels, wherein the format of the bitmap image can be a format that supports an alpha channel so that the bitmap image can achieve a transparent effect, such as RGBA (Red, Green, Blue, Alpha, color space) bitmap, TIF (Tag Image File Format, tag image file format), PNG (Portable Network Graphics, portable network graphics), etc., which are not specifically limited in the embodiment of the present invention.
[0122] Step 103, performing stroke processing on the bitmap image to generate a client mouse pointer image;
[0123] After obtaining the bitmap image, determine the pixel points in the bitmap image that need to be stroked, perform stroke processing on them, render the edge of the mouse pointer, and generate a client mouse pointer image. In order to achieve the purpose of distinguishing the mouse pointer from the displayed background, the stroke processing can be performed using different colors, different pixel widths, and different line styles, which are not specifically limited in the embodiment of the present invention.
[0124] Step 104: display the client mouse pointer image.
[0125] After the mouse pointer is rendered, the generated client mouse pointer image is displayed on the display interface of the cloud game client, so that game players can see the client mouse pointer image to identify the mouse pointer.
[0126] The embodiment of the present invention converts the mouse pointer dot matrix data in the cloud game server into a bitmap image; the mouse pointer style can be determined, and then the bitmap image is stroked to highlight the edge of the mouse pointer to generate a client mouse pointer image; the client mouse pointer image can be displayed on terminals with different display characteristics, and the client mouse pointer image can be effectively distinguished from the background color when displayed, thereby improving the display effect of the mouse pointer image in the cloud game.
[0127] Reference Figure 2 , shows a flowchart of the steps of a second embodiment of a mouse pointer rendering method of the present invention, the method is applied to a cloud game client, the cloud game client is connected to a cloud game server, and the method specifically includes:
[0128] Step 201, receiving mouse pointer dot matrix data sent by the cloud game server; the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask;
[0129] The mouse pointer dot matrix data sent by the cloud game server is received in real time. The mouse pointer dot matrix data is the default mouse image of the cloud game server operating system. The mouse pointer dot matrix data can be obtained by the cloud game server from its own storage space through a preset data interface, or by the cloud game server from a database of a third-party server (such as a cloud server) connected to it through a preset data interface. The embodiment of the present invention does not specifically limit this. In addition, the operating system of the cloud game server is Windows, and the mouse pointer dot matrix data can be the dot matrix data corresponding to the black and white image of the Windows mouse pointer.
[0130] The acquired mouse pointer dot matrix data includes a plurality of first pixel points, such as the black and white mouse pointer image of the I-Beam system. For details, please refer to Figure 3 , shows the visualized I-Beam system black and white mouse pointer image dot matrix data, the corresponding mouse pointer dot matrix data is 32 bits wide and 64 bits high, and has 2048 first pixel points. It should be noted that the first pixel point is all the pixel points corresponding to the mouse pointer dot matrix data.
[0131] The first pixel has a corresponding AND mask and XOR mask; the two masks together provide two bits of definition information for the pixel, defining the specific type of the first pixel. The specific values of the AND mask and the XOR mask are only 0 and 1.
[0132] Step 202, reading the AND mask and XOR mask of the first pixel;
[0133] After determining that the mouse pointer dot matrix data is received, the AND mask and XOR mask corresponding to each first pixel are read one by one. Specifically, the reading can be performed by calling a preset API (Application Programming Interface).
[0134] Step 203, calculating the AND mask and the XOR mask according to a preset coding rule to determine the pixel type of the first pixel;
[0135] According to the preset coding rules corresponding to the AND mask and the XOR mask, the operation results of the AND mask and the XOR mask on the first pixel are calculated one by one to determine the pixel type of the first pixel. For example, according to the preset coding rule, the monochrome pointer coding rule, the specific coding rules are as follows:
[0136] With mask XOR Mask Operation results 0 0 Black Pixels 0 1 White Pixels 1 0 Pixel transparent (unchanged) 1 1 Pixel color inversion
[0137] When the operation result is a black pixel, the pixel type is a black type; when the operation result is a white pixel, the pixel type is a white type; when the operation result is a transparent pixel, the pixel type is determined to be a transparent type; when the operation result is a pixel color inversion, the pixel type is an inverted color type.
[0138] Step 204, filling the first pixel points based on the pixel type to form a bitmap image;
[0139] After determining the specific pixel type of each first pixel point, the first pixel point is filled, for example, by using a pixel color corresponding to the pixel type to form a bitmap image.
[0140] In an optional embodiment of the present invention, when the pixel type is a black type, the first pixel point is filled with black.
[0141] In an optional embodiment of the present invention, when the pixel type is a white type, the first pixel point is filled with white.
[0142] In an optional embodiment of the present invention, when the pixel type is a transparent type, the first pixel point is not filled.
[0143] In an optional embodiment of the present invention, the pixel type includes an inverted color type, and the step of filling the first pixel point based on the pixel type to form a bitmap image includes:
[0144] Sub-step S2041, determining a first color corresponding to the inverted color type;
[0145] First, determine that the color actually corresponding to the inverted color type is the first color, and the first color is a color that is significantly different from the original color of the first pixel point, such as when the original color of the first pixel point is black, the first color is white. Since the default mouse pointer image of the Windows system adopts black and white, the first color is usually black or white, but other colors are not limited to use.
[0146] Sub-step S2042: Fill the first pixel of the inverted color type with the first color to form a bitmap image.
[0147] After the first color is determined, the first pixel of the inverted color type is filled with the first color so that the first pixel has the first color, thereby forming a bitmap image. Figure 4 As shown, the first color corresponding to the inverted color type is black, and the first pixel point of the inverted color type is filled with black to form a bitmap image.
[0148] Step 205, performing stroke processing on the bitmap image to generate a client mouse pointer image;
[0149] Perform stroke processing on the bitmap image, render the edge of the mouse pointer, and generate a client mouse pointer image.
[0150] In a preferred embodiment of the present invention, the step of performing stroke processing on the bitmap image to generate a client mouse pointer image includes:
[0151] Step S2051, traversing the pixel types corresponding to the first pixel point;
[0152] The pixel type corresponding to each first pixel point is traversed by using a preset data traversal method; specifically, the traversal method may be performed by calling a callback function or by calling a data interface, which is not specifically limited in the embodiment of the present invention.
[0153] Sub-step S2052, when the pixel type is a preset type, determining a second pixel point adjacent to the first pixel point;
[0154] When the pixel type is a preset type, multiple pixel points adjacent to the first pixel of the preset type are determined as the second pixel point, that is, the second pixel point is the first pixel point adjacent to the first pixel of the preset type. It should be noted that the second pixel point is multiple pixel points next to the first pixel point, specifically, the second pixel point can be 8 pixel points next to the first pixel point, such as Figure 5 As shown, the first pixel point, up, down, left, right, upper left corner, upper right corner, lower left corner, and lower right corner, a total of 8 pixel points are located at the second pixel point.
[0155] The preset type may be one of the pixel types corresponding to the first pixel point that needs to be distinguished from the background color and stroked, such as a black type. Specifically, when the pixel type is black, the eight pixel points adjacent to the first pixel point of the black type are determined as the second pixel point.
[0156] Sub-step S2053, performing a stroke process on the second pixel point to generate a stroke image;
[0157] A specific stroke process is performed on the second pixel point to generate a stroke image.
[0158] In an optional embodiment of the present invention, the step of performing stroke processing on the second pixel point to generate a stroke image includes:
[0159] Sub-step S20531, determining whether the pixel type corresponding to the second pixel point is a transparent type;
[0160] After determining the second pixel point, the second pixel point can be further traversed to determine its corresponding pixel type and judge whether the pixel type is a transparent type. Specifically, the judgment can be made by reading the AND mask value and the XOR mask value.
[0161] Sub-step S20532: if yes, fill the second pixel with a preset second color;
[0162] If the pixel type corresponding to the second pixel point is a transparent type, such as when the AND mask value is 1 and the XOR mask value is 0, the preset second color is used to fill the second pixel point, where the preset second color can be a color value different from the first color and has a significantly different color, including but not limited to white and black.
[0163] Sub-step S20533: if not, fill the second pixel point with the initial color corresponding to the pixel type;
[0164] If the pixel type corresponding to the second pixel is not a transparent type, such as when the mask value is 0 or the mask value is 1 and the XOR mask value is 1, the initial color corresponding to the pixel type is used to fill the second pixel; if the pixel type is black, the initial color corresponding to the black type - black is used to fill the second pixel.
[0165] Sub-step S20534, combining the filled second pixel points to generate a stroked image.
[0166] Arrange all filled second pixel points according to their original positions in the bitmap image to generate a stroke image.
[0167] You can refer to Figure 6 , set the pixel type of the second pixel to a transparent type, the second color corresponding to the transparent type is white, fill the second pixel points with white, and arrange them according to their original positions in the bitmap image to generate a white stroke image.
[0168] In a preferred embodiment of the present invention, the step of performing stroke processing on the second pixel point to generate a stroked image includes:
[0169] Sub-step S20535, determining the pixel width corresponding to the second pixel point;
[0170] Determine the pixel width actually corresponding to the second pixel point.
[0171] Sub-step S20536, adjusting the pixel width to generate a stroked image.
[0172] The pixel width is adjusted so that the remaining first pixel points have obvious visual differences, such as increasing the pixel width. The adjusted pixel width is used as the pixel width of the second pixel to generate a stroke image.
[0173] Step S2054: combining the stroke image and the bitmap image to generate a client mouse pointer image.
[0174] After obtaining the stroke image, the stroke image is superimposed on the corresponding pixel position on the bitmap image to generate a client mouse pointer image.
[0175] Step 206: Display the client mouse pointer image.
[0176] The client mouse pointer image is then processed visually and displayed on the client.
[0177] The embodiment of the present invention converts the mouse pointer dot matrix data in the cloud game server into a bitmap image; the mouse pointer style can be determined, and then the bitmap image is stroked to highlight the edge of the mouse pointer to generate a client mouse pointer image; the client mouse pointer image can be displayed on terminals with different display characteristics, and the client mouse pointer image can be effectively distinguished from the background color when displayed, thereby improving the display effect of the mouse pointer image in the cloud game.
[0178] Reference Figure 7 , shows a flowchart of the steps of a third embodiment of a mouse pointer rendering method of the present invention, a mouse pointer rendering method, applied to a cloud game server, the cloud game server is connected to a cloud game client, the method specifically includes:
[0179] Step 301, obtaining mouse pointer dot matrix data;
[0180] The cloud game server obtains the mouse pointer dot matrix data from the memory space by calling the system API.
[0181] Step 302, sending the mouse pointer dot matrix data to the cloud game client; the cloud game client is used to convert the mouse pointer dot matrix data into a bitmap image, perform stroke processing on the bitmap image to generate a client mouse pointer image, and display the client mouse pointer image.
[0182] The cloud game server sends the acquired mouse pointer dot matrix data to the cloud game client. The cloud game client converts the mouse pointer dot matrix data into a bitmap image, performs stroke processing to generate a client mouse pointer image that can be displayed by the cloud game client, and displays the client mouse pointer image.
[0183] Reference Figure 8 , shows a flowchart of the steps of a fourth embodiment of a mouse pointer rendering method of the present invention, which is applied to a cloud game server, and the cloud game server is connected to a cloud game client. The method includes:
[0184] Step 401, obtaining mouse pointer dot matrix data;
[0185] The cloud game server obtains the mouse pointer dot matrix data stored in itself.
[0186] Step 402, converting the mouse pointer dot matrix data into a bitmap image;
[0187] The cloud game server converts the mouse pointer dot matrix data into a bitmap image with pixels. Preferably, the bitmap image can be an RGBA bitmap.
[0188] In an optional embodiment of the present invention, the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask; the step of converting the mouse pointer dot matrix data into a bitmap image includes:
[0189] Reading an AND mask and an XOR mask of the first pixel;
[0190] The AND mask and XOR mask of each first pixel in the mouse pointer dot matrix data in the cloud game server area.
[0191] According to a preset coding rule, the AND mask and the XOR mask are calculated to determine the pixel type of the first pixel;
[0192] According to the encoding rule of the AND mask and the XOR mask in Windows, the encoding results of the AND mask and the XOR mask are calculated, and the pixel type of the first pixel is determined by the encoding results.
[0193] The first pixel points are filled based on the pixel type to form a bitmap image.
[0194] The first pixel points are filled according to the pixel type. For example, when the pixel type is determined to be black, the first pixel points are filled with black. After all the first pixel points are filled, a bitmap image is formed.
[0195] In an optional embodiment of the present invention, the pixel type includes an inverted color type, and the step of filling the first pixel point based on the pixel type to form a bitmap image includes:
[0196] Determine a first color corresponding to the inverted color type;
[0197] It should be noted that the pixel type may include an inverted color type, and the first pixel point of the inverted color type is a pixel point that is clearly distinguishable from the background color. Therefore, it is necessary to determine the first color corresponding to the inverted color type, and the first color includes but is not limited to black and white; those skilled in the art can choose according to actual conditions, and the embodiments of the present invention do not limit this.
[0198] The first pixel point of the inverted color type is filled with the first color to form a bitmap image.
[0199] The first pixel point of the inverted color type is filled with the determined first color to form a bitmap image.
[0200] Step 403, performing stroke processing on the bitmap image to generate a client mouse pointer image;
[0201] After the bitmap image is determined, the edge of the bitmap image is stroked so that the bitmap image forms a clear outline on the background, thereby generating a client mouse pointer image.
[0202] In an optional embodiment of the present invention, the step of performing stroke processing on the bitmap image to generate a client mouse pointer image includes:
[0203] Traversing pixel types corresponding to the first pixel point;
[0204] Before the stroke process, the pixel types corresponding to the first pixel point may be traversed to search for the first pixel point having the target pixel type.
[0205] When the pixel type is a preset type, determining a second pixel point adjacent to the first pixel point;
[0206] When the pixel type of a first pixel is a preset type, a second pixel adjacent to the first pixel is determined. Preferably, eight adjacent pixels surrounding the first pixel are determined as the second pixel.
[0207] Performing stroke processing on the second pixel point to generate a stroke image;
[0208] Perform stroke processing on the first pixel to generate a stroke image.
[0209] The stroke image and the bitmap image are combined to generate a client mouse pointer image.
[0210] Add a stroke image based on the bitmap image, and combine it according to the position of the pixels to generate the client mouse pointer image.
[0211] In an optional embodiment of the present invention, the step of performing stroke processing on the second pixel point to generate a stroke image includes:
[0212] Determine whether the pixel type corresponding to the second pixel point is a transparent type;
[0213] In practical applications, when the pixel type is transparent, there is no obvious difference between the pixel point and the background color, and the edge of the bitmap image cannot be highlighted. Therefore, it can be first determined whether the pixel type corresponding to the second pixel point is transparent.
[0214] If yes, fill the second pixel with a preset second color;
[0215] When the pixel type corresponding to the second pixel is transparent, the second pixel is filled with a preset second color. It should be noted that the second color may be the same as the first color or different from the first color, which is not specifically limited in the embodiment of the present invention.
[0216] If not, fill the second pixel point with the initial color corresponding to the pixel type;
[0217] When the pixel type corresponding to the second pixel point is not a transparent type, the second pixel point is filled with the initial color corresponding to the pixel type without being filled with the second color.
[0218] The second pixel points after filling are combined to generate a stroke image.
[0219] The filled second pixel points are combined according to the positions of the pixel points to generate a stroked image.
[0220] In an optional embodiment of the present invention, the step of performing stroke processing on the second pixel point to generate a stroke image includes:
[0221] Determine a pixel width corresponding to the second pixel point;
[0222] For the stroke processing, the pixel width may also be processed, specifically, the pixel width corresponding to the second pixel point. For this purpose, the pixel width corresponding to the second pixel point is determined.
[0223] The pixel width is adjusted to generate a stroke image.
[0224] The pixel width is adjusted, such as increasing or decreasing the pixel width, to generate a stroke image.
[0225] Step 404, sending the client mouse pointer image to the cloud game client; the cloud game client is used to receive the client mouse pointer image and display the client mouse pointer image.
[0226] After the cloud game server generates the client mouse pointer image, the cloud game server sends the client mouse pointer image to the cloud game client, and the cloud game client receives the client mouse pointer image and can display it.
[0227] Reference Fig. 9, shows a flowchart of the steps of a fifth embodiment of a mouse pointer rendering method of the present invention, which is applied to a cloud game client, and the cloud game client is connected to a cloud game server. The method includes:
[0228] Step 501, receiving a client mouse pointer image sent by the cloud game server; the client mouse pointer image is generated by the cloud game server by converting the mouse pointer dot matrix data into a bitmap image and performing stroke processing on the bitmap image.
[0229] The cloud game server reads its own mouse pointer dot matrix data, converts it into a bitmap image, and performs stroke processing on the bitmap image to generate the client mouse pointer image, which will be sent to the cloud game server.
[0230] The cloud gaming client receives the client mouse pointer image.
[0231] Step 502: Display the client mouse pointer image.
[0232] After receiving, the client mouse pointer image is displayed.
[0233] Reference Fig.10 , shows a flowchart of the steps of a sixth embodiment of a mouse pointer rendering method of the present invention, a mouse pointer rendering method, applied to a cloud gaming system, the cloud gaming system comprising a cloud gaming server and a cloud gaming client, the method comprising:
[0234] Step 601, the cloud game server obtains mouse pointer dot matrix data;
[0235] Step 602, the cloud game server sends the mouse pointer dot matrix data to the cloud game client;
[0236] Step 603, the cloud game client receives the mouse pointer dot matrix data sent by the cloud game server;
[0237] Step 604, the cloud game client converts the mouse pointer dot matrix data into a bitmap image;
[0238] In an optional embodiment of the present invention, the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask; the step of converting the mouse pointer dot matrix data into a bitmap image includes:
[0239] Reading an AND mask and an XOR mask of the first pixel;
[0240] According to a preset coding rule, the AND mask and the XOR mask are calculated to determine the pixel type of the first pixel;
[0241] The first pixel points are filled based on the pixel type to form a bitmap image.
[0242] In an optional embodiment of the present invention, the pixel type includes an inverted color type, and the step of filling the first pixel point based on the pixel type to form a bitmap image includes:
[0243] Determine a first color corresponding to the inverted color type;
[0244] The first pixel point of the inverted color type is filled with the first color to form a bitmap image.
[0245] Step 605: the cloud game client performs stroke processing on the bitmap image to generate a client mouse pointer image;
[0246] In an optional embodiment of the present invention, the step of performing stroke processing on the bitmap image to generate a client mouse pointer image includes:
[0247] Traversing pixel types corresponding to the first pixel point;
[0248] When the pixel type is a preset type, determining a second pixel point adjacent to the first pixel point;
[0249] Performing stroke processing on the second pixel point to generate a stroke image;
[0250] The stroke image and the bitmap image are combined to generate a client mouse pointer image.
[0251] In an optional embodiment of the present invention, the step of performing stroke processing on the second pixel point to generate a stroke image includes:
[0252] Determine whether the pixel type corresponding to the second pixel point is a transparent type;
[0253] If yes, fill the second pixel with a preset second color;
[0254] If not, fill the second pixel point with the initial color corresponding to the pixel type;
[0255] The second pixel points after filling are combined to generate a stroke image.
[0256] In a preferred embodiment of the present invention, the step of performing stroke processing on the second pixel point to generate a stroked image includes:
[0257] Determine a pixel width corresponding to the second pixel point;
[0258] The pixel width is adjusted to generate a stroke image.
[0259] Step 606: The cloud gaming client displays the client mouse pointer image.
[0260] Reference Fig.11 , shows a flowchart of the steps of Embodiment 7 of a mouse pointer rendering method of the present invention, which is applied to a cloud gaming system, wherein the cloud gaming system includes a cloud gaming server and a cloud gaming client, and the method includes:
[0261] Step 701, the cloud game server obtains mouse pointer dot matrix data;
[0262] Step 702, the cloud game server converts the mouse pointer dot matrix data into a bitmap image;
[0263] In an optional embodiment of the present invention, the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask; the step of converting the mouse pointer dot matrix data into a bitmap image includes:
[0264] Reading an AND mask and an XOR mask of the first pixel;
[0265] According to a preset coding rule, the AND mask and the XOR mask are calculated to determine the pixel type of the first pixel;
[0266] The first pixel points are filled based on the pixel type to form a bitmap image.
[0267] In an optional embodiment of the present invention, the pixel type includes an inverted color type, and the step of filling the first pixel point based on the pixel type to form a bitmap image includes:
[0268] Determine a first color corresponding to the inverted color type;
[0269] The first pixel point of the inverted color type is filled with the first color to form a bitmap image.
[0270] Step 703: the cloud game server performs stroke processing on the bitmap image to generate a client mouse pointer image;
[0271] In an optional embodiment of the present invention, the step of performing stroke processing on the second pixel point to generate a stroke image includes:
[0272] Determine whether the pixel type corresponding to the second pixel point is a transparent type;
[0273] If yes, fill the second pixel with a preset second color;
[0274] If not, fill the second pixel point with the initial color corresponding to the pixel type;
[0275] The second pixel points after filling are combined to generate a stroke image.
[0276] In a preferred embodiment of the present invention, the step of performing stroke processing on the second pixel point to generate a stroked image includes:
[0277] Determine a pixel width corresponding to the second pixel point;
[0278] The pixel width is adjusted to generate a stroke image.
[0279] Step 704, the cloud game server sends the client mouse pointer image to the cloud game client;
[0280] Step 705, the cloud game client receives the client mouse pointer image;
[0281] Step 706: The cloud gaming client displays the client mouse pointer image.
[0282] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0283] Reference Fig.12 , shows a structural block diagram of a first embodiment of a mouse pointer rendering device of the present invention, which is applied to a cloud game client, and the cloud game client is connected to a cloud game server. The device may specifically include the following modules:
[0284] The first receiving module 801 is used to receive the mouse pointer dot matrix data sent by the cloud game server;
[0285] A first conversion module 802, used for converting the mouse pointer dot matrix data into a bitmap image;
[0286] The first stroke module 803 is used to perform stroke processing on the bitmap image to generate a client mouse pointer image;
[0287] The first display module 804 is used to display the client mouse pointer image.
[0288] In an optional embodiment of the present invention, the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask; the first conversion module 802 includes:
[0289] A first reading submodule, used for reading an AND mask and an XOR mask of the first pixel;
[0290] A first calculation submodule, used to calculate the AND mask and the XOR mask according to a preset encoding rule, and determine the pixel type of the first pixel;
[0291] The first filling submodule is used to fill the first pixel points based on the pixel type to form a bitmap image.
[0292] In an optional embodiment of the present invention, the pixel type includes an inverted color type, and the first filling submodule includes:
[0293] A first inverse color determination unit, used to determine a first color corresponding to the inverse color type;
[0294] The first filling unit fills the first pixel points of the inverted color type with the first color to form a bitmap image.
[0295] In an optional embodiment of the present invention, the first stroke module 803 includes:
[0296] A first traversal submodule, used to traverse the pixel types corresponding to the first pixel point;
[0297] A second pixel point determination submodule, used for determining a second pixel point adjacent to the first pixel point when the pixel type is a preset type;
[0298] A first stroke submodule, used for performing stroke processing on the second pixel point to generate a stroke image;
[0299] The first combining submodule is used to combine the stroke image and the bitmap image to generate a client mouse pointer image.
[0300] In an optional embodiment of the present invention, the first stroke submodule includes:
[0301] A first judging unit, configured to judge whether the pixel type corresponding to the second pixel point is a transparent type;
[0302] A first filling unit, configured to fill the second pixel point with a preset second color if yes;
[0303] a second filling unit, configured to fill the second pixel point with an initial color corresponding to the pixel type if no;
[0304] The first combining unit is used to combine the filled second pixel points to generate a stroke image.
[0305] In an optional embodiment of the present invention, the first stroke submodule includes:
[0306] A first pixel width determining subunit, used to determine a pixel width corresponding to the second pixel point;
[0307] The first adjustment unit is used to adjust the pixel width to generate a stroke image.
[0308] Reference Fig.13 , shows a structural block diagram of a second embodiment of a mouse pointer rendering device of the present invention, which is applied to a cloud game server, the cloud game server is connected to a cloud game client, and the device includes:
[0309] The first acquisition module 901 is used to acquire mouse pointer dot matrix data;
[0310] The first sending module 902 is used to send the mouse pointer dot matrix data to the cloud game client; the cloud game client is used to convert the mouse pointer dot matrix data into a pixel image, stroke the bitmap image to generate a client mouse pointer image, and display the client mouse pointer image.
[0311] Reference Fig.14 , shows a structural block diagram of a third embodiment of a mouse pointer rendering device of the present invention, which is applied to a cloud game server, the cloud game server is connected to a cloud game client, and the device includes:
[0312] The second acquisition module 1001 is used to acquire mouse pointer dot matrix data;
[0313] The second conversion module 1002 is used to convert the mouse pointer dot matrix data into a bitmap image;
[0314] The second stroke module 1003 is used to perform stroke processing on the bitmap image to generate a client mouse pointer image;
[0315] The second sending module 1004 is used to send the client mouse pointer image to the cloud game client; the cloud game client is used to receive the client mouse pointer image and display the client mouse pointer image.
[0316] In an optional embodiment of the present invention, the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask; the second conversion module 1002 includes:
[0317] A second reading submodule, used for reading an AND mask and an XOR mask of the first pixel;
[0318] A second calculation submodule, used to calculate the AND mask and the XOR mask according to a preset encoding rule, and determine the pixel type of the first pixel;
[0319] The second filling submodule is used to fill the first pixel points based on the pixel type to form a bitmap image.
[0320] In an optional embodiment of the present invention, the pixel type includes an inverted color type, and the second filling submodule includes:
[0321] A second inverse color determination unit, used to determine a first color corresponding to the inverse color type;
[0322] The second filling unit fills the first pixel points of the inverted color type with the first color to form a bitmap image.
[0323] In an optional embodiment of the present invention, the second stroke module 1003 includes:
[0324] A second traversal submodule, used to traverse the pixel types corresponding to the first pixel point;
[0325] A second pixel point determination submodule, configured to determine a second pixel point adjacent to the first pixel point when the pixel type is a preset type;
[0326] A second stroke submodule, used for performing stroke processing on the second pixel point to generate a stroke image;
[0327] The second combining submodule is used to combine the stroke image and the bitmap image to generate a client mouse pointer image.
[0328] In an optional embodiment of the present invention, the second stroke submodule includes:
[0329] A second judging unit, used to judge whether the pixel type corresponding to the second pixel point is a transparent type;
[0330] a third filling unit, configured to fill the second pixel point with a preset second color if yes;
[0331] A fourth filling unit, configured to fill the second pixel point with an initial color corresponding to the pixel type if no;
[0332] The second combining unit is used to combine the filled second pixel points to generate a stroke image.
[0333] In an optional embodiment of the present invention, the second stroke submodule includes:
[0334] A second pixel width determining subunit, used to determine a pixel width corresponding to the second pixel point;
[0335] The second adjustment unit is used to adjust the pixel width to generate a stroke image.
[0336] Reference Fig.15 , shows a structural block diagram of a fourth embodiment of a mouse pointer rendering device of the present invention, which is applied to a cloud game client, the cloud game client is connected to a cloud game server, and the device includes:
[0337] The second receiving module 1101 is used to receive a client mouse pointer image sent by the cloud game server; the client mouse pointer image is generated by the cloud game server by converting the mouse pointer dot matrix data into a bitmap image and performing stroke processing on the bitmap image.
[0338] The second display module 1102 is used to display the client mouse pointer image.
[0339] Reference Fig.16 , shows a structural block diagram of a fifth embodiment of a mouse pointer rendering device of the present invention, which is applied to a cloud gaming system, wherein the cloud gaming system includes a cloud gaming server and a cloud gaming client, and the device includes:
[0340] The third acquisition module 1201 and the third sending module 1202 located in the cloud game server, the third receiving module 1203, the third conversion module 1204, the third stroke 1205 and the third display module 1206 located in the cloud game client,
[0341] The third acquisition module 1201 is used to acquire mouse pointer dot matrix data;
[0342] The third sending module 1202 is used to send the mouse pointer dot matrix data to the cloud game client;
[0343] The third receiving module 1203 is used to receive the mouse pointer dot matrix data sent by the cloud game server;
[0344] The third conversion module 1204 is used to convert the mouse pointer dot matrix data into a bitmap image;
[0345] The third stroke module 1205 is used to perform stroke processing on the bitmap image to generate a client mouse pointer image;
[0346] The third display module 1206 is used to display the client mouse pointer image.
[0347] In an optional embodiment of the present invention, the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask; the third conversion module 1204 includes:
[0348] A third reading submodule, used for reading the AND mask and XOR mask of the first pixel;
[0349] A third calculation submodule, used to calculate the AND mask and the XOR mask according to a preset encoding rule, and determine the pixel type of the first pixel;
[0350] The third filling submodule is used to fill the first pixel points based on the pixel type to form a bitmap image.
[0351] In an optional embodiment of the present invention, the pixel type includes an inverted color type, and the third filling submodule includes:
[0352] A third inverse color determination unit, configured to determine a first color corresponding to the inverse color type;
[0353] The third filling unit fills the first pixel point of the inverted color type with the first color to form a bitmap image.
[0354] In an optional embodiment of the present invention, the third stroke module 1205 includes:
[0355] A third traversal submodule, used to traverse the pixel types corresponding to the first pixel point;
[0356] A second pixel point determination submodule, configured to determine a second pixel point adjacent to the first pixel point when the pixel type is a preset type;
[0357] A third stroke submodule, used for performing stroke processing on the second pixel point to generate a stroke image;
[0358] The third combining submodule is used to combine the stroke image and the bitmap image to generate a client mouse pointer image.
[0359] In an optional embodiment of the present invention, the third stroke submodule includes:
[0360] A third judging unit, used to judge whether the pixel type corresponding to the second pixel point is a transparent type;
[0361] A fifth filling unit, configured to fill the second pixel point with a preset second color if yes;
[0362] A sixth filling unit, configured to fill the second pixel point with an initial color corresponding to the pixel type if no;
[0363] The third combining unit is used to combine the filled second pixel points to generate a stroke image.
[0364] In an optional embodiment of the present invention, the third stroke submodule includes:
[0365] A third pixel width determining subunit, used to determine a pixel width corresponding to the second pixel point;
[0366] The third adjustment unit is used to adjust the pixel width to generate a stroke image.
[0367] Reference Fig.17 , shows a structural block diagram of a sixth embodiment of a mouse pointer rendering device of the present invention, which is applied to a cloud gaming system, wherein the cloud gaming system includes a cloud gaming server and a cloud gaming client, and the device includes:
[0368] The fourth acquisition module 1301, the fourth conversion module 1302, the fourth stroke module 1303 and the fourth sending module 1304 located in the cloud game server, the fourth receiving module 1305 and the fourth display module 1306 located in the cloud game client,
[0369] The fourth acquisition module 1301 is used to acquire mouse pointer dot matrix data;
[0370] The fourth conversion module 1302 is used to convert the mouse pointer dot matrix data into a bitmap image;
[0371] The fourth stroke module 1303 is used to perform stroke processing on the bitmap image to generate a client mouse pointer image;
[0372] The fourth sending module 1304 is used to send the client mouse pointer image to the cloud game client;
[0373] The fourth receiving module 1305 is used to receive the client mouse pointer image;
[0374] The fourth display module 1306 is used to display the client mouse pointer image.
[0375] In an optional embodiment of the present invention, the mouse pointer dot matrix data includes a plurality of first pixel points, and the first pixel points have an AND mask and an XOR mask; the fourth conversion module 1302 includes:
[0376] A fourth reading submodule, used for reading an AND mask and an XOR mask of the first pixel;
[0377] a fourth calculation submodule, configured to calculate the AND mask and the XOR mask according to a preset coding rule, and determine a pixel type of the first pixel;
[0378] The fourth filling submodule is used to fill the first pixel points based on the pixel type to form a bitmap image.
[0379] In an optional embodiment of the present invention, the pixel type includes an inverted color type, and the third filling submodule includes:
[0380] a fourth inverse color determination unit, configured to determine a first color corresponding to the inverse color type;
[0381] The fourth filling unit fills the first pixel of the inverted color type with the first color to form a bitmap image.
[0382] In an optional embodiment of the present invention, the third stroke module 1205 includes:
[0383] A fourth traversal submodule, used to traverse the pixel types corresponding to the first pixel point;
[0384] A second pixel point determination submodule, configured to determine a second pixel point adjacent to the first pixel point when the pixel type is a preset type;
[0385] A fourth stroke submodule, used for performing stroke processing on the second pixel point to generate a stroke image;
[0386] The fourth combining submodule is used to combine the stroke image and the bitmap image to generate a client mouse pointer image.
[0387] In an optional embodiment of the present invention, the fourth stroke submodule includes:
[0388] a fourth determination unit, configured to determine whether a pixel type corresponding to the second pixel point is a transparent type;
[0389] A seventh filling unit, configured to fill the second pixel point with a preset second color if yes;
[0390] An eighth filling unit, configured to fill the second pixel point with an initial color corresponding to the pixel type if no;
[0391] The fourth combining unit is used to combine the filled fourth pixel points to generate a stroke image.
[0392] In an optional embodiment of the present invention, the fourth stroke submodule includes:
[0393] a fourth pixel width determining subunit, configured to determine a pixel width corresponding to the second pixel point;
[0394] The fourth adjustment unit is used to adjust the pixel width to generate a stroke image.
[0395] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0396] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0397] An embodiment of the present invention further provides an electronic device, including:
[0398] Processor 1801 and storage medium 1802, the storage medium 1802 stores machine-readable instructions executable by the processor 1801, and when the electronic device is running, the processor 1801 executes the machine-readable instructions to perform the method as described in any one of the embodiments of the present invention. The specific implementation method and technical effect are similar to those of the method embodiment, and will not be repeated here.
[0399] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium 1901 stores a computer program, and the computer program is executed by a processor to execute the method as described in any one of the embodiments of the present invention. The specific implementation method and technical effect are similar to those of the method embodiment, and will not be repeated here.
[0400] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0401] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0402] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0403] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0404] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0405] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0406] The mouse pointer rendering method, device, electronic device and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A mouse pointer rendering method, characterized in that: Applied to a cloud game client, the cloud game client is connected to a cloud game server, and the method includes: Receive mouse pointer dot matrix data sent by the cloud game server; the mouse pointer dot matrix data is data formed by a dot matrix corresponding to a system mouse image of an operating system of the cloud game server; the dot matrix is described by bits; the mouse pointer dot matrix data includes a plurality of first pixel points; Converting the mouse pointer dot matrix data into a bitmap image; the bitmap image is used to represent the mouse pointer style; Performing stroke processing on the bitmap image to generate a client mouse pointer image, wherein the stroke processing is performed on a second pixel point adjacent to the first pixel point, and the first pixel point and the second pixel point are filled with different colors; The client mouse pointer image is displayed.
2. The method according to claim 1, characterized in that The first pixel point has an AND mask and an XOR mask; the step of converting the mouse pointer dot matrix data into a bitmap image comprises: Reading an AND mask and an XOR mask of the first pixel; According to a preset coding rule, the AND mask and the XOR mask are calculated to determine the pixel type of the first pixel; The first pixel points are filled based on the pixel type to form a bitmap image.
3. The method according to claim 2, characterized in that The pixel type includes an inverted color type, and the step of filling the first pixel point based on the pixel type to form a bitmap image includes: Determine a first color corresponding to the inverted color type; The first pixel point of the inverted color type is filled with the first color to form a bitmap image.
4. The method according to claim 2 or 3, characterized in that: The step of performing stroke processing on the bitmap image to generate a client mouse pointer image comprises: Traversing pixel types corresponding to the first pixel point; When the pixel type is a preset type, determining a second pixel point adjacent to the first pixel point; Performing stroke processing on the second pixel point to generate a stroke image; The stroke image and the bitmap image are combined to generate a client mouse pointer image.
5. The method according to claim 4, characterized in that The step of performing stroke processing on the second pixel point to generate a stroke image comprises: Determine whether the pixel type corresponding to the second pixel point is a transparent type; If yes, fill the second pixel with a preset second color; If not, fill the second pixel point with the initial color corresponding to the pixel type; The second pixel points after filling are combined to generate a stroke image.
6. The method according to claim 4, characterized in that The step of performing stroke processing on the second pixel point to generate a stroke image comprises: Determine a pixel width corresponding to the second pixel point; The pixel width is adjusted to generate a stroke image.
7. A mouse pointer rendering method, characterized in that: Applied to a cloud gaming server, the cloud gaming server is connected to a cloud gaming client, the method comprising: Obtaining mouse pointer dot matrix data; the mouse pointer dot matrix data is data formed by a dot matrix corresponding to a system mouse image of an operating system of the cloud game server; the dot matrix is described by bits; the mouse pointer dot matrix data includes a plurality of first pixel points; The mouse pointer dot matrix data is sent to the cloud game client; the cloud game client is used to convert the mouse pointer dot matrix data into a bitmap image, and the bitmap image is used to represent the mouse pointer style; the bitmap image is stroked to generate a client mouse pointer image, and the client mouse pointer image is displayed; the stroke processing is performed on a second pixel point adjacent to the first pixel point, and the first pixel point and the second pixel point are filled with different colors.
8. A mouse pointer rendering method, characterized in that: Applied to a cloud gaming server, the cloud gaming server is connected to a cloud gaming client, the method comprising: Obtaining mouse pointer dot matrix data; the mouse pointer dot matrix data is data formed by a dot matrix corresponding to a system mouse image of an operating system of the cloud game server; the dot matrix is described by bits; the mouse pointer dot matrix data includes a plurality of first pixel points; Converting the mouse pointer dot matrix data into a bitmap image; the bitmap image is used to represent the mouse pointer style; Performing stroke processing on the bitmap image to generate a client mouse pointer image, wherein the stroke processing is performed on a second pixel point adjacent to the first pixel point, and the first pixel point and the second pixel point are filled with different colors; The client mouse pointer image is sent to the cloud game client; the cloud game client is used to receive the client mouse pointer image and display the client mouse pointer image.
9. A mouse pointer rendering method, characterized in that: Applied to a cloud game client, the cloud game client is connected to a cloud game server, and the method includes: Receive a client mouse pointer image sent by the cloud game server; the client mouse pointer image is generated by the cloud game server by converting mouse pointer dot matrix data into a bitmap image, and the bitmap image is used to represent the mouse pointer style; the bitmap image is generated by performing stroke processing on the bitmap image; the mouse pointer dot matrix data is data formed by a dot matrix corresponding to the system mouse image of the operating system of the cloud game server; the dot matrix is described by bits; the mouse pointer dot matrix data includes a plurality of first pixel points; the stroke processing is performed on a second pixel point adjacent to the first pixel point, and the first pixel point and the second pixel point are filled with different colors; The client mouse pointer image is displayed.
10. A mouse pointer rendering method, characterized in that: Applied to a cloud gaming system, the cloud gaming system comprising a cloud gaming server and a cloud gaming client, the method comprising: The cloud game server obtains mouse pointer dot matrix data; the mouse pointer dot matrix data is data formed by a dot matrix corresponding to a system mouse image of an operating system of the cloud game server; the dot matrix is described by bits; The cloud game server sends the mouse pointer dot matrix data to the cloud game client; The cloud game client receives the mouse pointer dot matrix data sent by the cloud game server; the mouse pointer dot matrix data includes a plurality of first pixel points; The cloud game client converts the mouse pointer dot matrix data into a bitmap image; the bitmap image is used to represent the mouse pointer style; The cloud game client performs stroke processing on the bitmap image to generate a client mouse pointer image, wherein the stroke processing is performed on a second pixel point adjacent to the first pixel point, and the first pixel point and the second pixel point are filled with different colors; The cloud gaming client displays the client mouse pointer image.
11. A mouse pointer rendering method, characterized in that: Applied to a cloud gaming system, the cloud gaming system comprising a cloud gaming server and a cloud gaming client, the method comprising: The cloud game server obtains mouse pointer dot matrix data; the mouse pointer dot matrix data is data formed by a dot matrix corresponding to a system mouse image of an operating system of the cloud game server; the dot matrix is described by bits; the mouse pointer dot matrix data includes a plurality of first pixel points; The cloud game server converts the mouse pointer dot matrix data into a bitmap image; the bitmap image is used to represent the mouse pointer style; The cloud game server performs stroke processing on the bitmap image to generate a client mouse pointer image; The cloud game server sends the client mouse pointer image to the cloud game client, and the stroke processing is performed on a second pixel point adjacent to the first pixel point, and the first pixel point and the second pixel point are filled with different colors; The cloud game client receives the client mouse pointer image; The cloud gaming client displays the client mouse pointer image.
12. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the mouse pointer rendering method according to any one of claims 1 to 11 when executed by the processor.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the mouse pointer rendering method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Peripheral data transmission method and system for cloud game
CN111569417A
Cursor display method and device and medium
CN113082703A
Mouse processing method and device based on remote cloud desktop, storage medium and equipment
CN113625923A
