WO2018219140A1 - Electronic device, content display method and content display apparatus therefor, and storage medium - Google Patents

Electronic device, content display method and content display apparatus therefor, and storage medium Download PDF

Info

Publication number
WO2018219140A1
WO2018219140A1 PCT/CN2018/086853 CN2018086853W WO2018219140A1 WO 2018219140 A1 WO2018219140 A1 WO 2018219140A1 CN 2018086853 W CN2018086853 W CN 2018086853W WO 2018219140 A1 WO2018219140 A1 WO 2018219140A1
Authority
WO
WIPO (PCT)
Prior art keywords
bitmap
display
content
rendered
display screen
Prior art date
Application number
PCT/CN2018/086853
Other languages
French (fr)
Chinese (zh)
Inventor
张银利
Original Assignee
广州阿里巴巴文学信息技术有限公司
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 广州阿里巴巴文学信息技术有限公司 filed Critical 广州阿里巴巴文学信息技术有限公司
Publication of WO2018219140A1 publication Critical patent/WO2018219140A1/en

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/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels

Definitions

  • the present invention relates to the field of display technologies, and in particular, to an electronic device and a content display method and apparatus thereof, and a non-transitory machine readable storage medium.
  • the electronic product is set to: for these personalized settings and settings changes, obtain the display screen size of the electronic product, create a new bitmap based on the display screen size to typeset and render needs Display the content and show it to the user.
  • the downside of this scenario is that each time you change these settings, you need to create a new bitmap and destroy the in-place map. If the in-situ map is not destroyed in time, frequent operations will bring memory overflow problems, which will bring bad experience to users experiencing electronic products.
  • An object of the present invention is to provide a content display method and apparatus for an electronic device, so as to improve the utilization of the bitmap, reduce memory consumption, and improve the user experience of using the electronic product.
  • a content display method of an electronic device has two display modes, that is, a horizontal display mode and a vertical display mode, and the method may include: a bitmap creation step, Creating a basic bitmap required for the electronic device to render the page based on the size of the display screen, the basic bitmap corresponding to one of a horizontal display mode and a vertical display mode of the display screen; and a setting step of receiving the user's personality on the display screen
  • the setting, the personalization setting includes a display mode of the display screen; the layout rendering step, in response to the user's personalized setting of the display screen, typesetting and rendering the content to be displayed on the basic bitmap to obtain a rendered bitmap, wherein
  • the display mode of the personalized setting is different from the display mode corresponding to the basic bitmap, the content to be displayed is typeset by rotating 90° clockwise or counterclockwise; and the displaying step is to display the rendered bitmap on the display screen.
  • the content to be displayed is typeset and rendered on the basic bitmap, and the content to be displayed is personalized to the user in a manner desired by the user, thereby improving the user experience.
  • the typesetting rendering step may further include: in response to receiving the user's new personalized setting of the display screen, erasing the display content on the previous rendered bitmap to restore the basic bitmap to be based on the new personalized setting, Typography and rendering of the content that needs to be displayed on the basic bitmap to get a rendered bitmap.
  • the presenting step may further include: panning the rotated rendered bitmap to a position on the display screen suitable for its display.
  • the content that needs to be displayed can be completely displayed to the user in an appropriate position, thereby ensuring the user's experience.
  • the personalized setting of the display screen by the user further includes a size of the content display area and a predetermined position relative to the display screen, and a partial bitmap defined by the size of the content display area of the basic bitmap in the typesetting rendering step
  • the content to be displayed is typeset and rendered to obtain a rendered bitmap, and some of the bitmaps are typeset and rendered to be partially rendered bitmaps.
  • the presenting step further includes: capturing a partial rendered bitmap in the rendered bitmap according to the size of the content display area to display the partially rendered bitmap at a predetermined position on the display screen.
  • the display content can be presented in a manner desired by the user based on the scale setting of the content display area on the display screen.
  • a content display device of an electronic device has two display modes, that is, a horizontal display mode and a vertical display mode
  • the device may include: bitmap creation. a module for creating a basic bitmap required for an electronic device to render a page based on a size of the display screen, the basic bitmap corresponding to one of a horizontal display mode and a vertical display mode of the display screen; and a setting module for receiving Personalization of the display screen by the user, the personalization setting includes the display mode of the display screen; the layout rendering module is configured to perform typography and rendering on the basic bitmap on the basic bitmap in response to the user's personalized setting of the display screen.
  • a rendered bitmap wherein when the display mode of the personalized setting is different from the display mode corresponding to the basic bitmap, the content to be displayed is typeset by rotating 90 degrees clockwise or counterclockwise; and the display module, Used to display rendered bitmaps on the display screen, where the display mode and basic bitmap are personalized Display mode is not the same, rendering the bitmap layout in the opposite direction to the rotation of the rendering process 90 °.
  • the typesetting rendering module is further configured to: in response to receiving a new personalized setting of the display screen by the user, erasing the display content on the previous rendered bitmap to restore the basic bitmap to be based on the new personalized setting To typeset and render the content to be displayed on the basic bitmap to get the rendered bitmap.
  • the presentation module is further operable to: translate the rotated rendered bitmap to a position on the display screen suitable for its display.
  • the user's personalized setting of the display screen further includes a size of the content display area and a predetermined position thereof relative to the display screen
  • the typesetting rendering module is on a partial bitmap defined by the size of the content display area of the basic bitmap
  • the content to be displayed is typeset and rendered to obtain a rendered bitmap
  • some of the bitmaps are partially rendered by the typesetting and rendering
  • the display module is further configured to: perform partial rendering in the rendered bitmap according to the size of the content display area.
  • an electronic device comprising: a display screen; a processor; and a memory having stored thereon executable code for causing the processor to execute the above when the executable code is executed by the processor The content display method of the electronic device.
  • a non-transitory machine readable storage medium having stored thereon executable code for causing a processor to execute the above-described electronic when the executable code is executed by a processor of the electronic device The content display method of the device.
  • the basic bitmap can be created for the display mode of the display screen of the electronic device, and in response to the user's personalized setting of the display screen, the content to be displayed is typeset and rendered on the basic bitmap to enhance the bitmap. Utilization to reduce memory consumption and improve the experience of electronic devices.
  • FIG. 1 shows a schematic block diagram of an electronic device in accordance with an embodiment of the present invention.
  • FIG. 2 shows a schematic flow chart of a content display method according to an embodiment of the invention.
  • FIG. 3 shows a schematic flow chart of a content display method according to another embodiment of the present invention.
  • FIG. 4 shows a schematic flow chart of a content display method according to still another embodiment of the present invention.
  • FIG. 5 shows a schematic block diagram of a content display device in accordance with an embodiment of the present invention.
  • Fig. 6 shows an application example according to the present invention.
  • the present invention provides an electronic device and a content display method and apparatus thereof.
  • the technical solutions of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.
  • FIG. 1 shows a schematic block diagram of an electronic device in accordance with an embodiment of the present invention.
  • the electronic device of the present invention may include a display screen, a processor, and a memory.
  • the display screen has dimensions (only two-dimensional dimensions are considered herein), respectively a height dimension corresponding to the height and a width dimension corresponding to the width, and the values of the two dimensions may be the same or different.
  • the display mode of the display screen may include a landscape display mode and a portrait display mode depending on the difference in the size values and the manner of presentation to the user.
  • the value of the height dimension is smaller than the value of the width dimension
  • the value of the height dimension is larger than the value of the width dimension.
  • the display mode of the display screen of some electronic devices is the vertical display mode
  • the display mode of the display screen of some electronic devices is the horizontal display mode
  • the user can
  • the setting of the display screen can be changed manually or automatically as needed, and the processor of the electronic device can correctly display the content to be displayed to the user in response to the change of the display mode.
  • Executable code can be stored on the memory, and the processor can execute the executable code.
  • the processor is caused to execute the content display method of the electronic device according to the present invention.
  • FIG. 2 shows a schematic flow chart of a content display method according to an embodiment of the invention.
  • step S210 bitmap creation step
  • a basic bitmap required for the electronic device to render the page is created, wherein the basic bitmap may correspond to the horizontal display mode of the display screen or The vertical screen displays any of the modes.
  • the display screen of the electronic device can have a conventional display mode, such as a vertical screen display of a smartphone, a landscape display of a notebook computer, etc., and a conventional display mode corresponds to the size of the display screen.
  • a conventional display mode such as a vertical screen display of a smartphone, a landscape display of a notebook computer, etc.
  • the basic bitmap may be created according to the size of the display screen such that the basic bitmap corresponds to a normal display mode of the display screen (one of a landscape display mode and a vertical display mode of the display screen).
  • the height dimension value of the display screen is greater than the width dimension value
  • the width dimension of the screen is displayed as the width value of the basic bitmap to display the height dimension of the screen as the height value of the basic bitmap.
  • the basic bitmap corresponds to the vertical screen display mode of the display screen. For example, when the size of the display screen is 1080*1920 (width*height), the size of the basic bitmap is also 1080*1920.
  • the height value of the display screen is smaller than the width size value, and the width dimension of the screen is displayed as the width value of the basic bitmap to display the height dimension of the screen as the height value of the basic bitmap.
  • the basic bitmap corresponds to the landscape display mode of the display screen. For example, when the size of the display screen is 1920*1080 (width*height), the size of the basic bitmap is also 1920*1080.
  • the size of the basic bitmap coincides with the size of the display screen so that the basic bitmap matches the display screen, and the content on the basic bitmap can be correctly and completely displayed on the display screen.
  • step S220 (setting step) the user's personalized setting of the display screen is received, and the personalized setting includes setting of the display mode of the display screen.
  • the user may refer to the manufacturer of the electronic device or the user of the electronic device.
  • the personalization setting may be a setting of a normal display mode of the display screen, for example, a horizontal screen display of the computer, a vertical screen display of the smart phone, etc., or a display mode of the display screen after the user changes the personalized setting (with basic The display mode of the display screen with different display modes corresponding to the bitmap.
  • the personalization setting may be input or selected by the user, or may be automatically determined by the electronic device in response to the user's operation on the electronic device. For example, the user manually rotates the electronic device, and the electronic device automatically determines the display mode of the display screen.
  • step S230 in response to the user's personalized setting of the display screen, the content to be displayed is typeset and rendered on the basic bitmap to obtain a rendered bitmap.
  • the displayed content may include, but is not limited to, a combination of one or more of text, images, and images.
  • the display mode of the personalized setting is the same as the display mode corresponding to the basic bitmap, for example, the display mode corresponding to the basic bitmap is a vertical screen display, and the display mode of the personalized setting is also a vertical screen display. At this point, you can type and render the content you want to display directly on the basic bitmap to get the rendered bitmap.
  • the display mode of the personalized setting is different from the display mode corresponding to the basic bitmap
  • the display mode corresponding to the basic bitmap is a vertical screen display
  • the display mode of the personalized setting is a horizontal display (or, corresponding to the basic bitmap)
  • the display mode is a horizontal screen display
  • the display mode of the personalized setting is a vertical screen display.
  • the content to be displayed is typeset and rendered on the basic bitmap by rotating 90° clockwise or counterclockwise.
  • the direction of rotation of the clockwise or counterclockwise rotation may be determined according to the direction of rotation of the display mode of the personalized setting with respect to the display mode of the basic bitmap.
  • the normal display mode of the mobile phone is a vertical screen display, and the upper and lower edges thereof are determined.
  • the rotation direction of the layout rendering corresponds to the smoothing
  • the hour hand is also counterclockwise to match the orientation of the layout rendering to the display mode of the display screen.
  • step S240 (presentation step) the rendered bitmap is displayed on the display screen.
  • the rendered bitmap is displayed directly on the display screen.
  • the rendered bitmap is rotated by 90° in the opposite direction to the layout rendering step.
  • the rotation direction of the rendered bitmap is rotated 90° counterclockwise; when the layout rendering direction in the layout rendering step is rotated 90° counterclockwise, rendering The direction of rotation of the bitmap is 90° clockwise.
  • the display content on the rendered bitmap can be displayed in a display manner that matches the display mode of the display screen.
  • the sequence may be unfixed, that is, the setting step of step S220 may be performed first, and then the bitmap creation step of step S210 may be performed.
  • the present disclosure also proposes a scheme for enabling a bitmap to be reused, so that when the new personalization setting is different from the display mode of the previous personalized setting, the basic bitmap is reused to improve the utilization of the bitmap. Reduce memory consumption and improve user experience.
  • FIG. 3 shows a schematic flow chart of a content display method according to another embodiment of the present invention.
  • step S310 based on the size of the display screen, a basic bitmap required for the electronic device to render the page is created, and the basic bitmap corresponds to one of a landscape display mode and a vertical display mode of the display screen.
  • step S320 the user's current personalized setting of the display screen is received, wherein the current personalized setting includes a display mode of the display screen, the current personalized setting is a new personalized setting, and the display mode of the previous personalized setting is not the same.
  • step S330 in response to the current personalized setting, it is determined whether there is display content on the basic bitmap.
  • step S330 If the result of the determination in step S330 is YES, that is, there is content to be displayed on the basic bitmap, the process proceeds to step S340; if the result of the determination is no, that is, the display content does not exist on the basic bitmap, the process proceeds directly to step S350.
  • step S340 in response to the current personalization setting, the display content on the previous rendered bitmap is erased to restore the basic bitmap in order to reuse the basic bitmap, and then proceeds to step S350.
  • the content to be displayed is typeset and rendered on the base bitmap to obtain a rendered bitmap.
  • the display mode corresponding to the current personalization setting may be a display mode different from the display mode corresponding to the basic bitmap, or may be the same display mode as the display mode of the basic bitmap.
  • the display mode of the current personalized setting is the same as the display mode corresponding to the basic bitmap
  • the content to be displayed is directly typeset and rendered on the basic bitmap to obtain a rendered bitmap.
  • the display mode of the current personalized setting is different from the display mode corresponding to the basic bitmap
  • the content to be displayed is typeset and rendered by clockwise or counterclockwise rotation by 90° to obtain Render a bitmap.
  • step S360 the rendered bitmap is displayed on the display screen.
  • the rendered bitmap is displayed directly on the display screen.
  • the rendered bitmap is rotated by 90° in the opposite direction to the layout rendering step, so that the display mode corresponding to the rendered bitmap and the current personalized setting are The display mode is the same.
  • step S320 When the user browses the rendered bitmap and the display content on the display screen, if the personalization of the display screen is changed, it is also possible to return to step S320 to re-create for the changed new personalized setting.
  • the user performs typography and rendering to get a new rendered bitmap.
  • the content that needs to be displayed can be displayed in the same manner as the personalized display mode, reducing memory problems and improving the user experience.
  • the display mode of the new personalized setting may be the same as or different from the display mode of the previous personalized setting. Different situations may cause different results. Therefore, in the above method flow, the judging step can also be added to accurately determine the display manner of the display content based on the new personalized setting.
  • FIG. 4 is a schematic flow chart showing a content display method according to still another embodiment of the present invention, in which the above-described judging step is shown.
  • bitmap creation step of step S410 and the setting step of step S420 are performed in the same manner as step S310 and step S320 shown in Fig. 3, respectively.
  • step S430 in response to receiving the personalized setting of the display screen by the user, it is determined whether the display mode of the current personalized setting is the same as the display mode of the previous personalized setting. If the result of the determination is yes, that is, the display mode of the current personalized setting is the same as the display mode of the previous personalized setting, proceed to step S440; if the result of the determination is no, that is, the display mode of the current personalized setting and the previous personality If the display mode of the setting is different, the process proceeds to step S450.
  • step S440 the content to be displayed is displayed on the display screen in the original (previous) display mode. If the content that needs to be displayed currently is the same as the original (previous) display content, the original display content can be directly displayed. If the content currently needed to be displayed is different from the original (previous) display content, the display content on the original rendered bitmap may be erased, and then the content currently required to be displayed is typeset on the basic bitmap based on the original (previous) display mode.
  • step S450 it is judged whether or not the display content exists on the basic bitmap. If the result of the determination is YES, that is, the display content exists on the basic bitmap, the process proceeds to step S460; if the result of the determination is no, that is, the display content does not exist on the basic bitmap, the process proceeds directly to step S470.
  • step S460 in response to receiving the user's new (current) personalization setting for the display screen, the display content on the previous rendered bitmap is erased to restore the basic bitmap, and then proceeds to step S470.
  • step S470 it is determined whether the display mode of the current personalized setting is the same as the display mode corresponding to the basic bitmap. If the result of the determination is yes, that is, the display mode of the current personalized setting is the same as the display mode of the basic bitmap, the process proceeds to step S480; if the result of the determination is no, the display mode of the current personalized setting and the display of the basic bitmap are displayed. If the mode is different, the process proceeds to step S485.
  • step S480 the layout and rendering are performed directly on the basic bitmap, and a rendered bitmap for the current personalized setting is obtained.
  • step S490 the above rendered bitmap is displayed on the display screen.
  • step S485 based on the new personalized setting, the content to be displayed is typeset and rendered in a clockwise or counterclockwise rotation by 90°.
  • step S495 the rendered bitmap is rotated by 90° in the opposite direction of rotation in step S485, after which the rendered bitmap is displayed on the display screen.
  • step S490 and step S495 when the user makes a change to the personalized setting in the process of browsing the rendered bitmap and the display content thereon, it is also possible to return to step S420 to re-receive the new personalization.
  • the position of the rendered bitmap is different depending on the rotation point (for example, the center position of the rendered bitmap, the vertices of the rendered bitmap, etc.), the position of the rendered bitmap does not match the display screen during the presentation.
  • the display content presented on the display screen may not be complete or incorrect. Therefore, it is also possible to translate the rotated rendered bitmap to a position on the display screen suitable for its display for display.
  • the content display area of the bitmap may be displayed in full screen on the display screen or may not be displayed in full screen.
  • the position on the display screen suitable for rendering the bitmap display is different.
  • the rendered bitmap can be translated horizontally or vertically in the same plane as the display screen, and the translated distance can be determined based on the position suitable for its display to ensure that the rendered bitmap can be translated to a position suitable for its display.
  • the rendered bitmap can be correctly displayed at the appropriate position of the display screen, thereby ensuring the user's experience.
  • the content to be displayed is displayed at the content display area of the display screen, and the content display area may be displayed all on the display screen or partially.
  • the user's personalized settings for the display screen may also include the size of the content display area and its predetermined position relative to the display screen.
  • the size of the content display area may be a predetermined size smaller than or equal to the size of the display screen (the size of the basic bitmap is equal to the normal size of the display screen). For example, if the normal display mode is a vertical screen display, the size of the basic bitmap is assumed to be 1080*1920 (width*height). If the notification bar is also displayed on the display screen and the height of the notification bar is 48, the content is The display area has a width of 1080 and a height of 1920-48, which is 1872. Similarly, when changing to the horizontal display and there is a notification bar (for example, the height of the notification bar is 48), the content display area has a width of 1920 and a height of 1080-48, that is, 1032. The width and/or height of the content display area may each be less than or equal to the corresponding size of the display screen.
  • the predetermined location of the content display area relative to the display screen may be any location suitable for presenting content that needs to be displayed.
  • the content display area coincides with the width of the display screen, and the bottom edge overlaps with the bottom edge of the display screen.
  • the user can modify the size and location of the content display area by personalization to meet the individual needs of the user.
  • the received personalized setting of the display screen by the user may also include the size of the content display area and its predetermined position relative to the display screen. setting.
  • the content to be displayed may be typeset and rendered on a partial bitmap defined by the size of the content display area of the basic bitmap.
  • a rendered bitmap where part of the bitmap is typographically rendered and rendered into a partially rendered bitmap.
  • the corresponding partial bitmap data may also be collected based on the size of the content display area to obtain a partially rendered bitmap that can be displayed at a predetermined position of the display screen.
  • a partially rendered bitmap is displayed at a predetermined location of the display screen, such as a center or other designated location.
  • the content display method of the present invention has been described in detail with reference to Figs.
  • the content display method described above may be implemented by a content display device.
  • FIG. 5 shows a schematic block diagram of a content display device in accordance with an embodiment of the present invention.
  • the functional modules of the content display device 500 may be implemented by hardware, software, or a combination of hardware and software that implements the principles of the present invention.
  • Those skilled in the art will appreciate that the functional blocks depicted in FIG. 5 can be combined or divided into sub-modules to implement the principles of the above described invention. Accordingly, the description herein may support any possible combination, or division, or a further definition of the functional modules described herein.
  • the content display device 500 shown in FIG. 5 can be used to implement the content display method shown in FIG. 2-4. Only the function modules that the content display device 500 can have and the operations that can be performed by the function modules are briefly described. For details of the reference, refer to the description above with reference to FIG. 2-4, and details are not described herein again.
  • the content display device 500 of the present invention may include a bitmap creation module 510, a setting module 520, a layout rendering module 530, and a presentation module 540.
  • the bitmap creation module 510 can be configured to create a basic bitmap required for the electronic device to render the page based on the size of the display screen, the basic bitmap corresponding to any one of a landscape display mode or a vertical display mode of the display screen.
  • the setting module 520 can be configured to receive a personalized setting of the display screen by the user, and the personalized setting includes a display mode of the display screen.
  • the typesetting rendering module 530 can be configured to typeset and render the content to be displayed on the basic bitmap in response to the user's personalized setting of the display screen to obtain a rendered bitmap, wherein when the display mode and the basic setting are personalized When the display mode corresponding to the bitmap is different, the content to be displayed is typeset by rotating 90° clockwise or counterclockwise.
  • the presentation module 540 can be configured to display a rendered bitmap on the display screen, wherein when the display mode of the personalized setting is different from the display mode of the basic bitmap, the bitmap is rendered in a direction opposite to the rotation direction during the layout rendering process. Rotate 90°.
  • the layout rendering module 530 can also respond to receiving To the user's new (current) personalization of the display screen, erasing the display on the previous rendered bitmap to restore the base bitmap so that it needs to be displayed on the basic bitmap based on the new personalized settings.
  • the content is typeset and rendered to get a rendered bitmap of the current personalization settings.
  • the display module 540 can also translate the rotated rendered bitmap to a position on the display screen suitable for its display.
  • the layout rendering module 530 may also be on the partial bitmap defined by the size of the content display area of the basic bitmap. Typography and rendering of the content to be displayed to obtain a rendered bitmap, and some bitmaps are partially rendered bitmaps after being typeset and rendered.
  • the presentation module can also intercept a portion of the rendered bitmap on the rendered bitmap based on the size of the content display area to present a partially rendered bitmap at a predetermined location on the display screen.
  • the display screen of the smartphone is simply shown in Figure 6 (ignoring the phone border).
  • the normal display mode of the mobile phone is vertical screen display. Assume that the basic bitmap has been created, the size of the basic bitmap is the same as the size of the display screen (edge overlap), and the display content exists on the basic bitmap. The normal text direction is shown in Figure 6. The 610 is shown. It is assumed that the user changes the display mode of the personalization-display screen when browsing the existing display content, and the size of the content display area is the same as the size of the display screen (the size of the basic bitmap), and the specific content display process is as follows:
  • the user changes the personalization setting while browsing the display content, for example, changing the display mode of the display screen to the horizontal display of the counterclockwise.
  • the processor of the smartphone responds to the new personalized settings of the received user and determines whether the new personalized setting is the same as the display mode of the previous personalized setting, whether there is display content on the basic bitmap, new The display mode of the personalized setting is the same as the display mode corresponding to the basic bitmap.
  • the layout in response to the user's change of the display mode of the display screen, the layout can be re-formatted on the basic bitmap in a manner desired by the user to display the content that needs to be displayed, improve the utilization of the bitmap, and improve the user experience.
  • the method according to the invention can also be implemented as a computer program comprising computer program code instructions for performing the various steps defined above in the above method of the invention.
  • the method according to the invention may also be embodied as a computer program product comprising a computer readable medium on which is stored a computer for performing the above-described functions defined in the above method of the invention program.
  • the present invention may also be embodied as a non-transitory machine readable storage medium having stored thereon executable code that, when executed by a processor of an electronic device, causes the processor to execute The above content display method of the invention.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions.
  • the functions noted in the blocks may also occur in a different order than the ones in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or operation. Or it can be implemented by a combination of dedicated hardware and computer instructions.

Abstract

Disclosed are an electronic device, a content display method and a content display apparatus therefor, and a storage medium. The method comprises: creating a basic bitmap on the basis of the size of a display screen, and in response to a personalized setting made by a user on the display screen, typesetting and rendering content needing to be displayed on the basic bitmap so as to obtain a rendered bitmap which can be displayed on the display screen. When the user changes the personalized setting, the display content on the previous rendered bitmap is erased to recover the basic bitmap so as to perform typesetting and rendering reusing the basic bitmap. Thus, the utilization of a bitmap is improved, and the memory consumption is reduced, improving the experience of a user on the electronic device.

Description

电子设备及其内容显示方法、装置和存储介质Electronic device and content display method, device and storage medium thereof 技术领域Technical field
本发明涉及显示技术领域,特别涉及一种电子设备及其内容显示方法、装置和一种非暂时性机器可读存储介质。The present invention relates to the field of display technologies, and in particular, to an electronic device and a content display method and apparatus thereof, and a non-transitory machine readable storage medium.
背景技术Background technique
目前,市面上的电子产品,尤其是大屏幕的电子产品,例如大屏智能手机、平板电脑等,绝大多数都支持竖屏、横屏、全屏等个性化设置。At present, most of the electronic products on the market, especially large-screen electronic products, such as large-screen smart phones, tablet computers, etc., support vertical screen, horizontal screen, full screen and other personalized settings.
为提高用户使用体验,现有方案中,电子产品被设定为:针对这些个性化设置以及设置的更改,获取电子产品的显示屏幕尺寸,基于显示屏幕尺寸创建新的位图来排版并渲染需要显示的内容,并向用户展示。此方案的缺点是,在每次更改这些设置后,都需要创建新的位图、销毁原位图。如果没有及时销毁原位图,频繁的操作会带来内存溢出的问题,为用户体验电子产品带来不好的体验效果。In order to improve the user experience, in the existing solution, the electronic product is set to: for these personalized settings and settings changes, obtain the display screen size of the electronic product, create a new bitmap based on the display screen size to typeset and render needs Display the content and show it to the user. The downside of this scenario is that each time you change these settings, you need to create a new bitmap and destroy the in-place map. If the in-situ map is not destroyed in time, frequent operations will bring memory overflow problems, which will bring bad experience to users experiencing electronic products.
因此,仍然需要一种能够解决上述问题的电子设备的内容显示方案。Therefore, there is still a need for a content display scheme of an electronic device capable of solving the above problems.
发明内容Summary of the invention
本发明的目的是提供一种电子设备的内容显示方法及装置,以便于提升位图的利用率,减少内存消耗,提升用户对电子产品的使用体验。An object of the present invention is to provide a content display method and apparatus for an electronic device, so as to improve the utilization of the bitmap, reduce memory consumption, and improve the user experience of using the electronic product.
根据本发明的一个方面,提供了一种电子设备的内容显示方法,电子设备的显示屏幕具有两种显示模式,即横屏显示模式和竖屏显示模式,该方法可以包括:位图创建步骤,基于显示屏幕的尺寸,创建电子设备渲染页面所需要的基本位图,基本位图对应于显示屏幕的横屏显示模式和竖屏显示模式中的一种;设置步骤,接收用户对显示屏幕的个性化设置,个性化设置包括显示屏幕的显示模式;排版渲染步骤,响应于用户对显示屏幕的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图,其中,当个性化设置的显示模式与基本位图对应的显示模式不 同时,以顺时针或逆时针旋转90°的方式对需要显示的内容进行排版;以及展示步骤,在显示屏幕上展示渲染位图,其中,当个性化设置的显示模式与基本位图的显示模式不同时,将渲染位图以与排版渲染步骤中相反的方向旋转90°。According to an aspect of the present invention, a content display method of an electronic device is provided. The display screen of the electronic device has two display modes, that is, a horizontal display mode and a vertical display mode, and the method may include: a bitmap creation step, Creating a basic bitmap required for the electronic device to render the page based on the size of the display screen, the basic bitmap corresponding to one of a horizontal display mode and a vertical display mode of the display screen; and a setting step of receiving the user's personality on the display screen The setting, the personalization setting includes a display mode of the display screen; the layout rendering step, in response to the user's personalized setting of the display screen, typesetting and rendering the content to be displayed on the basic bitmap to obtain a rendered bitmap, wherein When the display mode of the personalized setting is different from the display mode corresponding to the basic bitmap, the content to be displayed is typeset by rotating 90° clockwise or counterclockwise; and the displaying step is to display the rendered bitmap on the display screen. , wherein when the display mode of the personalized setting is different from the display mode of the basic bitmap, Rendering the bitmap layout in the opposite direction to the rotation of the rendering step 90 °.
由此,基于显示屏幕的显示模式,在基本位图上对需要显示的内容进行排版和渲染,以用户期望的方式向用户个性化展示需要显示的内容,提升用户体验。Thereby, based on the display mode of the display screen, the content to be displayed is typeset and rendered on the basic bitmap, and the content to be displayed is personalized to the user in a manner desired by the user, thereby improving the user experience.
优选地,排版渲染步骤还可以包括:响应于接收到用户对显示屏幕新的个性化设置,擦除先前的渲染位图上的显示内容,以恢复基本位图,以便基于新的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图。Preferably, the typesetting rendering step may further include: in response to receiving the user's new personalized setting of the display screen, erasing the display content on the previous rendered bitmap to restore the basic bitmap to be based on the new personalized setting, Typography and rendering of the content that needs to be displayed on the basic bitmap to get a rendered bitmap.
由此,基于用户对显示屏幕的个性化设置,无需创建新的位图,而在同一基本位图上进行个性化排版和渲染,极大地提升位图的利用率,以避免不断的创建位图和销毁位图对电子产品带来的内存溢出的问题。Therefore, based on the user's personalized setting of the display screen, it is not necessary to create a new bitmap, but personalized layout and rendering on the same basic bitmap, greatly improving the utilization of the bitmap to avoid continuous creation of bitmaps. And the problem of memory overflow caused by destroying bitmaps on electronic products.
优选地,展示步骤还可以包括:将旋转后的渲染位图平移到显示屏幕上适于其显示的位置。Preferably, the presenting step may further include: panning the rotated rendered bitmap to a position on the display screen suitable for its display.
由此,可以在适当的位置完整地向用户展示需要显示的内容,保障用户的体验效果。Thereby, the content that needs to be displayed can be completely displayed to the user in an appropriate position, thereby ensuring the user's experience.
优选地,用户对显示屏幕的个性化设置还包括内容显示区域的尺寸及其相对于显示屏幕的预定位置,在排版渲染步骤中,在基本位图的由内容显示区域的尺寸限定的部分位图上,对需要显示的内容进行排版和渲染,以得到渲染位图,其中部分位图经过排版和渲染后成为部分渲染位图。展示步骤还包括:根据内容显示区域的尺寸在渲染位图中截取部分渲染位图,以在显示屏幕上预定位置处展示部分渲染位图。Preferably, the personalized setting of the display screen by the user further includes a size of the content display area and a predetermined position relative to the display screen, and a partial bitmap defined by the size of the content display area of the basic bitmap in the typesetting rendering step On the top, the content to be displayed is typeset and rendered to obtain a rendered bitmap, and some of the bitmaps are typeset and rendered to be partially rendered bitmaps. The presenting step further includes: capturing a partial rendered bitmap in the rendered bitmap according to the size of the content display area to display the partially rendered bitmap at a predetermined position on the display screen.
由此,可以基于内容显示区域在显示屏幕上的比例设置,以用户期望的方式展示显示内容。Thereby, the display content can be presented in a manner desired by the user based on the scale setting of the content display area on the display screen.
根据本发明的另一方面,还提供了一种电子设备的内容显示装置,电子设备的显示屏幕具有两种显示模式,即横屏显示模式和竖屏显示模式,该装置可以包括:位图创建模块,用于基于显示屏幕的尺寸,创建电子设备渲染页面所需要的基本位图,基本位图对应于显示屏幕的横屏显示模式 和竖屏显示模式中的一种;设置模块,用于接收用户对显示屏幕的个性化设置,个性化设置包括显示屏幕的显示模式;排版渲染模块,用于响应于用户对显示屏幕的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图,其中,当个性化设置的显示模式与基本位图对应的显示模式不同时,以顺时针或逆时针旋转90°的方式对需要显示的内容进行排版;以及展示模块,用于在显示屏幕上展示渲染位图,其中,当个性化设置的显示模式与基本位图的显示模式不同时,将渲染位图以与排版渲染过程中相反的方向旋转90°。According to another aspect of the present invention, a content display device of an electronic device is provided. The display screen of the electronic device has two display modes, that is, a horizontal display mode and a vertical display mode, and the device may include: bitmap creation. a module for creating a basic bitmap required for an electronic device to render a page based on a size of the display screen, the basic bitmap corresponding to one of a horizontal display mode and a vertical display mode of the display screen; and a setting module for receiving Personalization of the display screen by the user, the personalization setting includes the display mode of the display screen; the layout rendering module is configured to perform typography and rendering on the basic bitmap on the basic bitmap in response to the user's personalized setting of the display screen. To obtain a rendered bitmap, wherein when the display mode of the personalized setting is different from the display mode corresponding to the basic bitmap, the content to be displayed is typeset by rotating 90 degrees clockwise or counterclockwise; and the display module, Used to display rendered bitmaps on the display screen, where the display mode and basic bitmap are personalized Display mode is not the same, rendering the bitmap layout in the opposite direction to the rotation of the rendering process 90 °.
优选地,排版渲染模块还可以用于:响应于接收到用户对显示屏幕新的个性化设置,擦除先前的渲染位图上的显示内容,以恢复基本位图,以便基于新的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图。Preferably, the typesetting rendering module is further configured to: in response to receiving a new personalized setting of the display screen by the user, erasing the display content on the previous rendered bitmap to restore the basic bitmap to be based on the new personalized setting To typeset and render the content to be displayed on the basic bitmap to get the rendered bitmap.
优选地,展示模块还可以用于:将旋转后的渲染位图平移到显示屏幕上适于其显示的位置。Preferably, the presentation module is further operable to: translate the rotated rendered bitmap to a position on the display screen suitable for its display.
优选地,用户对显示屏幕的个性化设置还包括内容显示区域的尺寸及其相对于显示屏幕的预定位置,排版渲染模块在基本位图的由内容显示区域的尺寸限定的部分位图上,对需要显示的内容进行排版和渲染,以得到渲染位图,其中部分位图经过排版和渲染后成为部分渲染位图,展示模块还用于:根据内容显示区域的尺寸在渲染位图中截取部分渲染位图,以在显示屏幕上预定位置处展示部分渲染位图。Preferably, the user's personalized setting of the display screen further includes a size of the content display area and a predetermined position thereof relative to the display screen, and the typesetting rendering module is on a partial bitmap defined by the size of the content display area of the basic bitmap, The content to be displayed is typeset and rendered to obtain a rendered bitmap, and some of the bitmaps are partially rendered by the typesetting and rendering, and the display module is further configured to: perform partial rendering in the rendered bitmap according to the size of the content display area. A bitmap that displays a partially rendered bitmap at a predetermined location on the display screen.
根据本发明的又一方面,还提供了一种电子设备,包括:显示屏幕;处理器;以及存储器,其上存储有可执行代码,当可执行代码被处理器执行时,使处理器执行上述的电子设备的内容显示方法。According to still another aspect of the present invention, there is provided an electronic device comprising: a display screen; a processor; and a memory having stored thereon executable code for causing the processor to execute the above when the executable code is executed by the processor The content display method of the electronic device.
根据本发明的又一方面,还提供了一种非暂时性机器可读存储介质,其上存储有可执行代码,当可执行代码被电子设备的处理器执行时,使处理器执行上述的电子设备的内容显示方法。According to still another aspect of the present invention, there is also provided a non-transitory machine readable storage medium having stored thereon executable code for causing a processor to execute the above-described electronic when the executable code is executed by a processor of the electronic device The content display method of the device.
通过本发明,能够针对电子设备的显示屏幕的显示模式创建基本位图,并响应于用户对显示屏幕的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以提升位图的利用率,以减少内存的消耗,提升电子设备的体验效果。Through the invention, the basic bitmap can be created for the display mode of the display screen of the electronic device, and in response to the user's personalized setting of the display screen, the content to be displayed is typeset and rendered on the basic bitmap to enhance the bitmap. Utilization to reduce memory consumption and improve the experience of electronic devices.
附图说明DRAWINGS
通过结合附图对本公开示例性实施方式进行更详细的描述,本公开的上述以及其它目的、特征和优势将变得更加明显,其中,在本公开示例性实施方式中,相同的参考标号通常代表相同部件。The above and other objects, features, and advantages of the present invention will become more apparent from the aspects of the embodiments of the invention. The same parts.
图1示出了根据本发明一实施例的电子设备的示意性框图。FIG. 1 shows a schematic block diagram of an electronic device in accordance with an embodiment of the present invention.
图2示出了根据本发明一实施例的内容显示方法的示意性流程图。FIG. 2 shows a schematic flow chart of a content display method according to an embodiment of the invention.
图3示出了根据本发明另一实施例的内容显示方法的示意性流程图。FIG. 3 shows a schematic flow chart of a content display method according to another embodiment of the present invention.
图4示出了根据本发明又一实施例的内容显示方法的示意性流程图。FIG. 4 shows a schematic flow chart of a content display method according to still another embodiment of the present invention.
图5示出了根据本发明一实施例的内容显示装置的示意性框图。FIG. 5 shows a schematic block diagram of a content display device in accordance with an embodiment of the present invention.
图6示出了根据本发明的一个应用例。Fig. 6 shows an application example according to the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的优选实施方式。虽然附图中显示了本公开的优选实施方式,然而应该理解,可以以各种形式实现本公开而不应被这里阐述的实施方式所限制。相反,提供这些实施方式是为了使本公开更加透彻和完整,并且能够将本公开的范围完整地传达给本领域的技术人员。Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiment of the present invention has been shown in the drawings, it is understood that Rather, these embodiments are provided so that this disclosure will be thorough and complete.
如前所述,为提升位图的利用率,并减少内存的消耗,提升用户对电子设备的体验效果,本发明提出一种电子设备及其内容显示方法及装置。以下将结合附图及实施例详细描述本发明的技术方案。As described above, in order to improve the utilization of the bitmap and reduce the memory consumption and improve the user experience of the electronic device, the present invention provides an electronic device and a content display method and apparatus thereof. The technical solutions of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.
图1示出了根据本发明一实施例的电子设备的示意性框图。FIG. 1 shows a schematic block diagram of an electronic device in accordance with an embodiment of the present invention.
如图1所示,本发明的电子设备可以包括显示屏幕、处理器和存储器。As shown in FIG. 1, the electronic device of the present invention may include a display screen, a processor, and a memory.
显示屏幕具有尺寸(本文中仅考虑二维尺寸),分别为对应于高度的高度尺寸和对应于宽度的宽度尺寸,这两个尺寸的数值可以相同也可以不同。The display screen has dimensions (only two-dimensional dimensions are considered herein), respectively a height dimension corresponding to the height and a width dimension corresponding to the width, and the values of the two dimensions may be the same or different.
根据尺寸数值的不同以及向用户展示的方式不同,显示屏幕的显示模式可以包括横屏显示模式和竖屏显示模式。其中,横屏显示模式时,高度尺寸的数值小于宽度尺寸的数值,竖屏显示模式时,高度尺寸的数值大于宽度尺寸的数值。The display mode of the display screen may include a landscape display mode and a portrait display mode depending on the difference in the size values and the manner of presentation to the user. Among them, when the horizontal screen display mode, the value of the height dimension is smaller than the value of the width dimension, and in the vertical screen display mode, the value of the height dimension is larger than the value of the width dimension.
有的电子设备(例如智能手机、平板电脑等)的显示屏幕的常规显示模式为竖屏显示模式,有的电子设备(例如笔记本电脑)的显示屏幕的常规显示模式为横屏显示模式,用户可以根据需要手动或自动进行设置以更改显示屏幕的显示模式,电子设备的处理器可以响应于显示模式的更改,正确地向用户展示需要显示的内容。The display mode of the display screen of some electronic devices (such as smart phones, tablets, etc.) is the vertical display mode, and the display mode of the display screen of some electronic devices (such as a notebook computer) is the horizontal display mode, and the user can The setting of the display screen can be changed manually or automatically as needed, and the processor of the electronic device can correctly display the content to be displayed to the user in response to the change of the display mode.
存储器上可以存储有可执行代码,处理器可以执行该可执行代码。当可执行代码被处理器执行时,使处理器执行根据本发明的电子设备的内容显示方法。Executable code can be stored on the memory, and the processor can execute the executable code. When the executable code is executed by the processor, the processor is caused to execute the content display method of the electronic device according to the present invention.
如下将结合附图2-4及实施例详细描述本发明的内容显示方法。The content display method of the present invention will be described in detail below with reference to FIGS. 2-4 and the embodiments.
图2示出了根据本发明一实施例的内容显示方法的示意性流程图。FIG. 2 shows a schematic flow chart of a content display method according to an embodiment of the invention.
如图2所示,在步骤S210(位图创建步骤),基于显示屏幕的尺寸,创建电子设备渲染页面所需要的基本位图,其中,基本位图可以对应于显示屏幕的横屏显示模式或竖屏显示模式中的任意一种。As shown in FIG. 2, in step S210 (bitmap creation step), based on the size of the display screen, a basic bitmap required for the electronic device to render the page is created, wherein the basic bitmap may correspond to the horizontal display mode of the display screen or The vertical screen displays any of the modes.
如前所述,电子设备的显示屏幕可以具有常规的显示模式,例如智能手机的竖屏显示、笔记本电脑的横屏显示等,常规的显示模式对应于显示屏幕的尺寸。As previously mentioned, the display screen of the electronic device can have a conventional display mode, such as a vertical screen display of a smartphone, a landscape display of a notebook computer, etc., and a conventional display mode corresponds to the size of the display screen.
基本位图可以是根据显示屏幕的尺寸创建的,以使基本位图对应于显示屏幕的常规显示模式(显示屏幕的横屏显示模式和竖屏显示模式中的一种)。The basic bitmap may be created according to the size of the display screen such that the basic bitmap corresponds to a normal display mode of the display screen (one of a landscape display mode and a vertical display mode of the display screen).
在常规显示模式为竖屏显示模式时,显示屏幕的高度尺寸数值大于宽度尺寸数值,以显示屏幕的宽度尺寸作为基本位图的宽度数值,以显示屏幕的高度尺寸作为基本位图的高度数值,以使基本位图对应于显示屏幕的竖屏显示模式。例如,在显示屏幕的尺寸为1080*1920(宽度*高度)时,基本位图的尺寸也为1080*1920。When the normal display mode is the portrait display mode, the height dimension value of the display screen is greater than the width dimension value, and the width dimension of the screen is displayed as the width value of the basic bitmap to display the height dimension of the screen as the height value of the basic bitmap. So that the basic bitmap corresponds to the vertical screen display mode of the display screen. For example, when the size of the display screen is 1080*1920 (width*height), the size of the basic bitmap is also 1080*1920.
在常规显示模式为横屏显示模式时,显示屏幕的高度尺寸数值小于宽度尺寸数值,以显示屏幕的宽度尺寸作为基本位图的宽度数值,以显示屏幕的高度尺寸作为基本位图的高度数值,以使基本位图对应于显示屏幕的横屏显示模式。例如,在显示屏幕的尺寸为1920*1080(宽度*高度)时,基本位图的尺寸也为1920*1080。When the normal display mode is the horizontal display mode, the height value of the display screen is smaller than the width size value, and the width dimension of the screen is displayed as the width value of the basic bitmap to display the height dimension of the screen as the height value of the basic bitmap. So that the basic bitmap corresponds to the landscape display mode of the display screen. For example, when the size of the display screen is 1920*1080 (width*height), the size of the basic bitmap is also 1920*1080.
由此,基本位图的尺寸与显示屏幕的尺寸一致,以使得基本位图与显 示屏幕相匹配,基本位图上的内容能够在显示屏幕上正确、完整地显示。Thus, the size of the basic bitmap coincides with the size of the display screen so that the basic bitmap matches the display screen, and the content on the basic bitmap can be correctly and completely displayed on the display screen.
在步骤S220(设置步骤),接收用户对显示屏幕的个性化设置,个性化设置包括对显示屏幕的显示模式的设置。In step S220 (setting step), the user's personalized setting of the display screen is received, and the personalized setting includes setting of the display mode of the display screen.
用户可以是指电子设备的制造者,也可以是电子设备的使用者。个性化设置可以是对显示屏幕的常规显示模式的设置,例如,电脑的横屏显示、智能手机的竖屏显示等等;也可以是用户更改个性化设置后的显示屏幕的显示模式(与基本位图对应的显示模式不同的显示屏幕的显示模式)。The user may refer to the manufacturer of the electronic device or the user of the electronic device. The personalization setting may be a setting of a normal display mode of the display screen, for example, a horizontal screen display of the computer, a vertical screen display of the smart phone, etc., or a display mode of the display screen after the user changes the personalized setting (with basic The display mode of the display screen with different display modes corresponding to the bitmap.
个性化设置可以是用户输入或选择的,也可以是电子设备响应于用户对电子设备的操作自动确定的,例如,用户手动旋转电子设备,电子设备自动确定显示屏幕的显示模式。The personalization setting may be input or selected by the user, or may be automatically determined by the electronic device in response to the user's operation on the electronic device. For example, the user manually rotates the electronic device, and the electronic device automatically determines the display mode of the display screen.
在步骤S230(排版渲染步骤),响应于用户对显示屏幕的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图。In step S230 (typesetting rendering step), in response to the user's personalized setting of the display screen, the content to be displayed is typeset and rendered on the basic bitmap to obtain a rendered bitmap.
显示的内容可以包括但不限于是文字、图像、影像中的一项或多项的组合。The displayed content may include, but is not limited to, a combination of one or more of text, images, and images.
当个性化设置的显示模式与基本位图对应的显示模式相同时,例如,基本位图对应的显示模式为竖屏显示,个性化设置的显示模式也为竖屏显示。此时,可直接在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图。When the display mode of the personalized setting is the same as the display mode corresponding to the basic bitmap, for example, the display mode corresponding to the basic bitmap is a vertical screen display, and the display mode of the personalized setting is also a vertical screen display. At this point, you can type and render the content you want to display directly on the basic bitmap to get the rendered bitmap.
当个性化设置的显示模式与基本位图对应的显示模式不同时,例如,基本位图对应的显示模式为竖屏显示,个性化设置的显示模式为横屏显示(或者,基本位图对应的显示模式为横屏显示,个性化设置的显示模式为竖屏显示)。此时,以顺时针或逆时针旋转90°的方式在基本位图上对需要显示的内容进行排版和渲染。When the display mode of the personalized setting is different from the display mode corresponding to the basic bitmap, for example, the display mode corresponding to the basic bitmap is a vertical screen display, and the display mode of the personalized setting is a horizontal display (or, corresponding to the basic bitmap) The display mode is a horizontal screen display, and the display mode of the personalized setting is a vertical screen display). At this time, the content to be displayed is typeset and rendered on the basic bitmap by rotating 90° clockwise or counterclockwise.
顺时针还是逆时针旋转的旋转方向可以是根据个性化设置的显示模式相对于基本位图的显示模式的旋转方向确定的。例如,手机的常规显示模式为竖屏显示,其上下边缘是确定的,当其旋转为横屏显示时,有两种旋转方法,根据相应的旋转方法,确定排版渲染的旋转方向分别对应于顺时针还是逆时针,以使排版渲染的方向与显示屏幕的显示模式相匹配。The direction of rotation of the clockwise or counterclockwise rotation may be determined according to the direction of rotation of the display mode of the personalized setting with respect to the display mode of the basic bitmap. For example, the normal display mode of the mobile phone is a vertical screen display, and the upper and lower edges thereof are determined. When it is rotated to the horizontal screen display, there are two rotation methods, and according to the corresponding rotation method, it is determined that the rotation direction of the layout rendering corresponds to the smoothing The hour hand is also counterclockwise to match the orientation of the layout rendering to the display mode of the display screen.
在步骤S240(展示步骤),在显示屏幕上展示渲染位图。At step S240 (presentation step), the rendered bitmap is displayed on the display screen.
当个性化设置的显示模式与基本位图的显示模式相同时,直接在显示 屏幕上展示渲染位图。When the display mode of the personalized setting is the same as the display mode of the basic bitmap, the rendered bitmap is displayed directly on the display screen.
当个性化设置的显示模式与基本位图的显示模式不同时,将渲染位图以与排版渲染步骤中相反的方向旋转90°。例如,当排版渲染步骤中的排版渲染方向是顺时针旋转90°时,渲染位图的旋转方向为逆时针旋转90°;当排版渲染步骤中的排版渲染方向是逆时针旋转90°时,渲染位图的旋转方向为顺时针旋转90°。When the display mode of the personalized setting is different from the display mode of the basic bitmap, the rendered bitmap is rotated by 90° in the opposite direction to the layout rendering step. For example, when the layout rendering direction in the layout rendering step is rotated 90° clockwise, the rotation direction of the rendered bitmap is rotated 90° counterclockwise; when the layout rendering direction in the layout rendering step is rotated 90° counterclockwise, rendering The direction of rotation of the bitmap is 90° clockwise.
由此,以使得渲染位图上的显示内容能够以与显示屏幕的显示模式相匹配的显示方式进行展示。Thus, the display content on the rendered bitmap can be displayed in a display manner that matches the display mode of the display screen.
应当理解,上述方法的步骤,特别是步骤S210和步骤S220,其顺序可以是不固定的,即也可以先执行步骤S220的设置步骤,再执行步骤S210的位图创建步骤。It should be understood that the steps of the above method, in particular, the steps S210 and S220, the sequence may be unfixed, that is, the setting step of step S220 may be performed first, and then the bitmap creation step of step S210 may be performed.
另外,考虑到用户可以多次更改显示屏幕的个性化设置,如果电子设备在每次接收到新的个性化设置后都重新构建位图、销毁原位图,则会带来内存溢出的问题。因此,本公开还提出使位图能够被重复利用的方案,以便于在新的个性化设置与先前的个性化设置的显示模式不相同时,重复利用基本位图,以提高位图的利用率,减少内存消耗,提升用户体验。In addition, considering that the user can change the personalized setting of the display screen multiple times, if the electronic device reconstructs the bitmap and destroys the in-situ image each time a new personalized setting is received, there is a problem of memory overflow. Therefore, the present disclosure also proposes a scheme for enabling a bitmap to be reused, so that when the new personalization setting is different from the display mode of the previous personalized setting, the basic bitmap is reused to improve the utilization of the bitmap. Reduce memory consumption and improve user experience.
图3示出了根据本发明另一实施例的内容显示方法的示意性流程图。FIG. 3 shows a schematic flow chart of a content display method according to another embodiment of the present invention.
如图3所示,在步骤S310,基于显示屏幕的尺寸,创建电子设备渲染页面所需要的基本位图,基本位图对应于显示屏幕的横屏显示模式和竖屏显示模式中的一种。As shown in FIG. 3, in step S310, based on the size of the display screen, a basic bitmap required for the electronic device to render the page is created, and the basic bitmap corresponds to one of a landscape display mode and a vertical display mode of the display screen.
在步骤S320,接收用户当前对显示屏幕的个性化设置,其中,当前的个性化设置包括显示屏幕的显示模式,当前个性化设置为新的个性化设置,与先前的个性化设置的显示模式不相同。In step S320, the user's current personalized setting of the display screen is received, wherein the current personalized setting includes a display mode of the display screen, the current personalized setting is a new personalized setting, and the display mode of the previous personalized setting is not the same.
在步骤S330,响应于当前的个性化设置,判断基本位图上是否存在显示内容。In step S330, in response to the current personalized setting, it is determined whether there is display content on the basic bitmap.
若步骤S330中判断结果为是,即基本位图上存在需要显示的内容,则进入步骤S340;若判断结果为否,即基本位图上不存在显示内容,则直接进入步骤S350。If the result of the determination in step S330 is YES, that is, there is content to be displayed on the basic bitmap, the process proceeds to step S340; if the result of the determination is no, that is, the display content does not exist on the basic bitmap, the process proceeds directly to step S350.
在步骤S340,响应于当前的个性化设置,擦除先前的渲染位图上的显示内容,以恢复基本位图,以便于重复利用该基本位图,然后再进入步骤 S350。In step S340, in response to the current personalization setting, the display content on the previous rendered bitmap is erased to restore the basic bitmap in order to reuse the basic bitmap, and then proceeds to step S350.
在步骤350,响应于当前的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图。At step 350, in response to the current personalization settings, the content to be displayed is typeset and rendered on the base bitmap to obtain a rendered bitmap.
这里,当前的个性化设置所对应的显示模式可以是与基本位图对应的显示模式不同的显示模式,也可以是与基本位图的显示模式相同的的显示模式。Here, the display mode corresponding to the current personalization setting may be a display mode different from the display mode corresponding to the basic bitmap, or may be the same display mode as the display mode of the basic bitmap.
当前的个性化设置的显示模式与基本位图对应的显示模式相同时,直接在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图。When the display mode of the current personalized setting is the same as the display mode corresponding to the basic bitmap, the content to be displayed is directly typeset and rendered on the basic bitmap to obtain a rendered bitmap.
当前的个性化设置的显示模式与基本位图对应的显示模式不同时,响应于当前的个性化设置,以顺时针或逆时针旋转90°的方式对需要显示的内容进行排版和渲染,以得到渲染位图。When the display mode of the current personalized setting is different from the display mode corresponding to the basic bitmap, in response to the current personalized setting, the content to be displayed is typeset and rendered by clockwise or counterclockwise rotation by 90° to obtain Render a bitmap.
在步骤S360,在显示屏幕上展示渲染位图。At step S360, the rendered bitmap is displayed on the display screen.
当前的个性化设置的显示模式与基本位图对应的显示模式相同时,直接在显示屏幕上展示渲染位图。When the display mode of the current personalized setting is the same as the display mode corresponding to the basic bitmap, the rendered bitmap is displayed directly on the display screen.
当前的个性化设置的显示模式与基本位图对应的显示模式不同时,将渲染位图以与排版渲染步骤中相反的方向旋转90°,以使渲染位图对应的显示模式与当前个性化设置的显示模式相同。When the display mode of the current personalized setting is different from the display mode corresponding to the basic bitmap, the rendered bitmap is rotated by 90° in the opposite direction to the layout rendering step, so that the display mode corresponding to the rendered bitmap and the current personalized setting are The display mode is the same.
当用户在显示屏幕上浏览渲染位图及其上的显示内容时,如果对显示屏幕的个性化设置进行了更改,则还可以返回步骤S320,以针对更改后的新的个性化设置,重新为用户进行排版和渲染以得到新的渲染位图。When the user browses the rendered bitmap and the display content on the display screen, if the personalization of the display screen is changed, it is also possible to return to step S320 to re-create for the changed new personalized setting. The user performs typography and rendering to get a new rendered bitmap.
由此,基于基本位图,需要显示的内容能够以与个性化设置的显示模式相同的方式进行展示,减少内存问题,同时提高用户的体验效果。Thus, based on the basic bitmap, the content that needs to be displayed can be displayed in the same manner as the personalized display mode, reducing memory problems and improving the user experience.
另外,如上面参考图2和图3所述,在实际应用中,用户进行个性化设置操作之后,新的个性化设置的显示模式可能与先前的个性化设置的显示模式相同,也可以不相同,不同的情况可能引起不同的展示结果。因此在上述的方法流程中,还可以增加判断步骤,以便于基于新的个性化设置准确确定显示内容的展示方式。In addition, as described above with reference to FIG. 2 and FIG. 3, in a practical application, after the user performs the personalization setting operation, the display mode of the new personalized setting may be the same as or different from the display mode of the previous personalized setting. Different situations may cause different results. Therefore, in the above method flow, the judging step can also be added to accurately determine the display manner of the display content based on the new personalized setting.
图4示出了根据本发明又一实施例的内容显示方法的示意性流程图,其中示出了上述判断步骤。4 is a schematic flow chart showing a content display method according to still another embodiment of the present invention, in which the above-described judging step is shown.
如图4所示,分别以与图3所示的步骤S310和步骤S320相同的方式 执行在步骤S410的位图创建步骤和步骤S420的设置步骤。As shown in Fig. 4, the bitmap creation step of step S410 and the setting step of step S420 are performed in the same manner as step S310 and step S320 shown in Fig. 3, respectively.
在步骤S430中,响应于接收到用户对显示屏幕的个性化设置,判断当前的个性化设置的显示模式与先前的个性化设置的显示模式是否相同。若判断结果为是,即当前的个性化设置的显示模式与先前的个性化设置的显示模式相同,则进入步骤S440;若判断结果为否,即当前的个性化设置的显示模式与先前的个性化设置的显示模式不同,则进入步骤S450。In step S430, in response to receiving the personalized setting of the display screen by the user, it is determined whether the display mode of the current personalized setting is the same as the display mode of the previous personalized setting. If the result of the determination is yes, that is, the display mode of the current personalized setting is the same as the display mode of the previous personalized setting, proceed to step S440; if the result of the determination is no, that is, the display mode of the current personalized setting and the previous personality If the display mode of the setting is different, the process proceeds to step S450.
在步骤S440,继续按原(先前)显示模式在显示屏幕上展示需要显示的内容。若当前需要显示的内容与原(先前)显示内容相同,则可以直接展示原显示内容。若当前需要显示的内容与原(先前)显示内容不相同,则可以擦除原渲染位图上的显示内容,再基于原(先前)显示模式在基本位图上排版渲染当前需要显示的内容。In step S440, the content to be displayed is displayed on the display screen in the original (previous) display mode. If the content that needs to be displayed currently is the same as the original (previous) display content, the original display content can be directly displayed. If the content currently needed to be displayed is different from the original (previous) display content, the display content on the original rendered bitmap may be erased, and then the content currently required to be displayed is typeset on the basic bitmap based on the original (previous) display mode.
在步骤S450,判断基本位图上是否存在显示内容。若判断结果为是,即基本位图上存在显示内容,则进入步骤S460;若判断结果否,即基本位图上不存在显示内容,则直接进入步骤S470。At step S450, it is judged whether or not the display content exists on the basic bitmap. If the result of the determination is YES, that is, the display content exists on the basic bitmap, the process proceeds to step S460; if the result of the determination is no, that is, the display content does not exist on the basic bitmap, the process proceeds directly to step S470.
在步骤S460,响应于接收到用户对显示屏幕新的(当前的)个性化设置,擦除先前的渲染位图上的显示内容,以恢复基本位图,然后再进入步骤S470。In step S460, in response to receiving the user's new (current) personalization setting for the display screen, the display content on the previous rendered bitmap is erased to restore the basic bitmap, and then proceeds to step S470.
在步骤S470中,判断当前的个性化设置的显示模式与基本位图对应的显示模式是否相同。若判断结果为是,即当前的个性化设置的显示模式与基本位图的显示模式相同,则进入步骤S480;若判断结果为否,即当前的个性化设置的显示模式与基本位图的显示模式不同,则进入步骤S485。In step S470, it is determined whether the display mode of the current personalized setting is the same as the display mode corresponding to the basic bitmap. If the result of the determination is yes, that is, the display mode of the current personalized setting is the same as the display mode of the basic bitmap, the process proceeds to step S480; if the result of the determination is no, the display mode of the current personalized setting and the display of the basic bitmap are displayed. If the mode is different, the process proceeds to step S485.
在步骤S480,直接在基本位图上进行排版和渲染,得到针对当前个性化设置的渲染位图。In step S480, the layout and rendering are performed directly on the basic bitmap, and a rendered bitmap for the current personalized setting is obtained.
在步骤S490,在显示屏幕上展示上述渲染位图。At step S490, the above rendered bitmap is displayed on the display screen.
在步骤S485,基于新的个性化设置,以顺时针或逆时针旋转90°的方式对需要显示的内容进行排版和渲染。In step S485, based on the new personalized setting, the content to be displayed is typeset and rendered in a clockwise or counterclockwise rotation by 90°.
在步骤S495,将渲染位图以与步骤S485中相反的旋转方向旋转90°,之后在显示屏幕上展示渲染位图。In step S495, the rendered bitmap is rotated by 90° in the opposite direction of rotation in step S485, after which the rendered bitmap is displayed on the display screen.
在步骤S490和步骤S495中,当用户在浏览渲染位图及其上的显示内容的过程中,对个性化设置做出了更改,则还可以返回步骤S420中,以 便于重新接收新的个性化设置,以对应于新的个性化设置的显示模式向用户展示需要显示的内容,以提高位图的利用率,减少内存的消耗。In step S490 and step S495, when the user makes a change to the personalized setting in the process of browsing the rendered bitmap and the display content thereon, it is also possible to return to step S420 to re-receive the new personalization. Set to display the content that needs to be displayed to the user in a display mode corresponding to the new personalized setting to improve the utilization of the bitmap and reduce the memory consumption.
由于在展示过程中,基于不同的旋转点(例如,渲染位图的中心位置、渲染位图的顶角等)旋转得到的渲染位图的位置不同,渲染位图的位置与显示屏幕不匹配,呈现在显示屏幕上的显示内容可能不完全或不正确。因此,还可以将旋转后的渲染位图平移到显示屏幕上适于其显示的位置,以便于展示。Since the position of the rendered bitmap is different depending on the rotation point (for example, the center position of the rendered bitmap, the vertices of the rendered bitmap, etc.), the position of the rendered bitmap does not match the display screen during the presentation. The display content presented on the display screen may not be complete or incorrect. Therefore, it is also possible to translate the rotated rendered bitmap to a position on the display screen suitable for its display for display.
位图的内容显示区域在显示屏幕上可以是全屏显示,也可以非全屏显示。针对不同的显示状态(全屏显示或非全屏显示),显示屏幕上适于渲染位图显示的位置不同。The content display area of the bitmap may be displayed in full screen on the display screen or may not be displayed in full screen. For different display states (full screen display or non-full screen display), the position on the display screen suitable for rendering the bitmap display is different.
全屏显示的情况下,可以平移渲染位图使旋转后渲染位图的边缘与显示屏幕的边缘相匹配。非全屏显示的情况下,可以平移渲染位图使旋转后渲染位图的显示内容在显示屏幕的中心位置或指定其它位置展示。其中,渲染位图可以在与显示屏幕相同的平面内横向或纵向平移,平移的距离可以基于适于其显示的位置确定,以确保渲染位图能够平移至适于其显示的位置。In the case of full screen display, you can pan render the bitmap so that the edges of the rendered bitmap after rotation match the edges of the display screen. In the case of non-full-screen display, you can pan render the bitmap so that the display content of the rotated rendered bitmap is displayed at the center of the display screen or at a specified other location. Wherein, the rendered bitmap can be translated horizontally or vertically in the same plane as the display screen, and the translated distance can be determined based on the position suitable for its display to ensure that the rendered bitmap can be translated to a position suitable for its display.
由此,渲染位图能够在显示屏幕的合适位置正确显示,保障了用户的体验效果。Thereby, the rendered bitmap can be correctly displayed at the appropriate position of the display screen, thereby ensuring the user's experience.
如前所述,在显示屏幕的内容显示区域处显示需要显示的内容,内容显示区域可以在显示屏幕上全部显示,也可以部分显示。因此,用户对显示屏幕的个性化设置还可以包括内容显示区域的尺寸及其相对于显示屏幕的预定位置。As described above, the content to be displayed is displayed at the content display area of the display screen, and the content display area may be displayed all on the display screen or partially. Thus, the user's personalized settings for the display screen may also include the size of the content display area and its predetermined position relative to the display screen.
内容显示区域的尺寸可以是小于或等于显示屏幕的尺寸(基本位图的尺寸等于显示屏幕的常规尺寸)的预定尺寸。例如,常规显示模式为竖屏显示的智能手机,假设其基本位图的尺寸为1080*1920(宽度*高度),如果在显示屏幕上还显示通知栏,且通知栏的高度是48,则内容显示区域的宽度为1080,高度为1920-48,即1872。同理,当更改为横屏显示且存在通知栏(例如通知栏的高度为48)时,内容显示区域的宽度为1920,高度为1080-48,即1032。内容显示区域的宽度和/或高度均可以小于或等于显示屏幕的对应尺寸。The size of the content display area may be a predetermined size smaller than or equal to the size of the display screen (the size of the basic bitmap is equal to the normal size of the display screen). For example, if the normal display mode is a vertical screen display, the size of the basic bitmap is assumed to be 1080*1920 (width*height). If the notification bar is also displayed on the display screen and the height of the notification bar is 48, the content is The display area has a width of 1080 and a height of 1920-48, which is 1872. Similarly, when changing to the horizontal display and there is a notification bar (for example, the height of the notification bar is 48), the content display area has a width of 1920 and a height of 1080-48, that is, 1032. The width and/or height of the content display area may each be less than or equal to the corresponding size of the display screen.
内容显示区域相对于显示屏幕的预定位置可以是适于展示需要显示的内容的任意位置。例如,内容显示区域与显示屏幕的宽度一致,且底部边缘与显示屏幕的底部边缘重叠。用户可以通过个性化设置修改内容显示区域的尺寸及其位置,以满足用户的个性化需求。The predetermined location of the content display area relative to the display screen may be any location suitable for presenting content that needs to be displayed. For example, the content display area coincides with the width of the display screen, and the bottom edge overlaps with the bottom edge of the display screen. The user can modify the size and location of the content display area by personalization to meet the individual needs of the user.
相应地,在设置步骤(例如步骤S220、步骤S320和步骤S420等)中,接收到的用户对显示屏幕的个性化设置,也可以包括对内容显示区域的尺寸及其相对于显示屏幕的预定位置的设置。Correspondingly, in the setting step (for example, step S220, step S320, step S420, etc.), the received personalized setting of the display screen by the user may also include the size of the content display area and its predetermined position relative to the display screen. setting.
在排版渲染步骤(例如步骤S230、步骤S350、步骤S480和步骤S485等)中,可以在基本位图的由内容显示区域的尺寸限定的部分位图上,对需要显示的内容进行排版和渲染,以得到渲染位图,其中,部分位图经过排版和渲染后成为部分渲染位图。或者,也可以基于内容显示区域的尺寸,采集相应的部分位图数据,得到能够在显示屏幕的预定位置展示的部分渲染位图。In the typesetting rendering step (for example, step S230, step S350, step S480, and step S485, etc.), the content to be displayed may be typeset and rendered on a partial bitmap defined by the size of the content display area of the basic bitmap. To get a rendered bitmap, where part of the bitmap is typographically rendered and rendered into a partially rendered bitmap. Alternatively, the corresponding partial bitmap data may also be collected based on the size of the content display area to obtain a partially rendered bitmap that can be displayed at a predetermined position of the display screen.
在展示步骤(例如步骤S240、步骤S360、步骤S490和步骤S495等)中,在显示屏幕的预定位置,例如中心或其它指定位置处展示部分渲染位图。In the presentation step (e.g., step S240, step S360, step S490, and step S495, etc.), a partially rendered bitmap is displayed at a predetermined location of the display screen, such as a center or other designated location.
至此,结合图2-4详细描述了本发明的内容显示方法。上述的内容显示方法可以是由一种内容显示装置实现的。Heretofore, the content display method of the present invention has been described in detail with reference to Figs. The content display method described above may be implemented by a content display device.
图5示出了根据本发明一实施例的内容显示装置的示意性框图。其中,内容显示装置500的功能模块可以由实现本发明原理的硬件、软件或硬件和软件的结合来实现。本领域的技术人员可以理解的是,图5所描述的功能模块可以组合起来或者划分成子模块,从而实现上述发明的原理。因此,本文的描述可以支持对本文描述的功能模块的任何可能的组合、或者划分、或者更近一步的限定。FIG. 5 shows a schematic block diagram of a content display device in accordance with an embodiment of the present invention. The functional modules of the content display device 500 may be implemented by hardware, software, or a combination of hardware and software that implements the principles of the present invention. Those skilled in the art will appreciate that the functional blocks depicted in FIG. 5 can be combined or divided into sub-modules to implement the principles of the above described invention. Accordingly, the description herein may support any possible combination, or division, or a further definition of the functional modules described herein.
图5所示的内容显示装置500可以用来实现图2-4所示的内容显示方法,下面仅就内容显示装置500可以具有的功能模块以及各功能模块可以执行的操作做简要说明,对于其中涉及的细节部分可以参见上文结合图2-4的描述,在此不再赘述。The content display device 500 shown in FIG. 5 can be used to implement the content display method shown in FIG. 2-4. Only the function modules that the content display device 500 can have and the operations that can be performed by the function modules are briefly described. For details of the reference, refer to the description above with reference to FIG. 2-4, and details are not described herein again.
如图5所示,本发明的内容显示装置500可以包括位图创建模块510、设置模块520、排版渲染模块530和展示模块540。As shown in FIG. 5, the content display device 500 of the present invention may include a bitmap creation module 510, a setting module 520, a layout rendering module 530, and a presentation module 540.
位图创建模块510可以用于基于显示屏幕的尺寸,创建电子设备渲染页面所需要的基本位图,基本位图对应于显示屏幕的横屏显示模式或竖屏显示模式中的任意一种。The bitmap creation module 510 can be configured to create a basic bitmap required for the electronic device to render the page based on the size of the display screen, the basic bitmap corresponding to any one of a landscape display mode or a vertical display mode of the display screen.
设置模块520可以用于接收用户对显示屏幕的个性化设置,个性化设置包括显示屏幕的显示模式。The setting module 520 can be configured to receive a personalized setting of the display screen by the user, and the personalized setting includes a display mode of the display screen.
排版渲染模块530可以用于响应于用户对显示屏幕的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图,其中,当个性化设置的显示模式与基本位图对应的显示模式不同时,以顺时针或逆时针旋转90°的方式对需要显示的内容进行排版。The typesetting rendering module 530 can be configured to typeset and render the content to be displayed on the basic bitmap in response to the user's personalized setting of the display screen to obtain a rendered bitmap, wherein when the display mode and the basic setting are personalized When the display mode corresponding to the bitmap is different, the content to be displayed is typeset by rotating 90° clockwise or counterclockwise.
展示模块540可以用于在显示屏幕上展示渲染位图,其中,当个性化设置的显示模式与基本位图的显示模式不同时,将渲染位图以与排版渲染过程中的旋转方向相反的方向旋转90°。The presentation module 540 can be configured to display a rendered bitmap on the display screen, wherein when the display mode of the personalized setting is different from the display mode of the basic bitmap, the bitmap is rendered in a direction opposite to the rotation direction during the layout rendering process. Rotate 90°.
当用户对显示屏幕的个性化设置进行更改,使当前的个性化设置的显示模式与先前个性化设置的显示模式不同,并且基本位图上存在显示内容时,排版渲染模块530还可以响应于接收到用户对显示屏幕新的(当前的)个性化设置,擦除先前的渲染位图上的显示内容,以恢复基本位图,以便基于新的个性化设置,在基本位图上对需要显示的内容进行排版和渲染,以得到针对当前个性化设置的渲染位图。When the user changes the personalized setting of the display screen so that the display mode of the current personalized setting is different from the display mode of the previous personalized setting, and the display content exists on the basic bitmap, the layout rendering module 530 can also respond to receiving To the user's new (current) personalization of the display screen, erasing the display on the previous rendered bitmap to restore the base bitmap so that it needs to be displayed on the basic bitmap based on the new personalized settings. The content is typeset and rendered to get a rendered bitmap of the current personalization settings.
当个性化设置的显示模式与基本位图对应的显示模式不同时,展示模块540还可以将旋转后的渲染位图平移到显示屏幕上适于其显示的位置。When the display mode of the personalized setting is different from the display mode corresponding to the basic bitmap, the display module 540 can also translate the rotated rendered bitmap to a position on the display screen suitable for its display.
当用户对显示屏幕的个性化设置还包括内容显示区域的尺寸及其相对于显示屏幕的预定位置时,排版渲染模块530还可以在基本位图的由内容显示区域的尺寸限定的部分位图上,对需要显示的内容进行排版和渲染,以得到渲染位图,部分位图经过排版和渲染后成为部分渲染位图。展示模块还可以根据内容显示区域的尺寸在渲染位图上截取部分渲染位图,以在显示屏幕上预定位置处展示部分渲染位图。When the user's personalized setting of the display screen further includes the size of the content display area and its predetermined position relative to the display screen, the layout rendering module 530 may also be on the partial bitmap defined by the size of the content display area of the basic bitmap. Typography and rendering of the content to be displayed to obtain a rendered bitmap, and some bitmaps are partially rendered bitmaps after being typeset and rendered. The presentation module can also intercept a portion of the rendered bitmap on the rendered bitmap based on the size of the content display area to present a partially rendered bitmap at a predetermined location on the display screen.
【应用例】[Application example]
以下以智能手机为例,并结合图6所示的应用例简单说明本发明的技术方案。图6中简单示出智能手机的显示屏幕(忽略手机边框)。手机的常规显示模式为竖屏显示,假设基本位图已创建,基本位图的尺寸与显示 屏幕的尺寸相同(边缘重叠),并且基本位图上存在显示内容,其常规的文字方向如图6中的610所示。假设用户在浏览已存在的显示内容时更改个性化设置-显示屏幕的显示模式,并且内容显示区域的尺寸与显示屏幕的尺寸(基本位图的尺寸)相同,具体的内容显示流程如下:Hereinafter, the technical solution of the present invention will be briefly described by taking a smartphone as an example and combining the application examples shown in FIG. 6. The display screen of the smartphone is simply shown in Figure 6 (ignoring the phone border). The normal display mode of the mobile phone is vertical screen display. Assume that the basic bitmap has been created, the size of the basic bitmap is the same as the size of the display screen (edge overlap), and the display content exists on the basic bitmap. The normal text direction is shown in Figure 6. The 610 is shown. It is assumed that the user changes the display mode of the personalization-display screen when browsing the existing display content, and the size of the content display area is the same as the size of the display screen (the size of the basic bitmap), and the specific content display process is as follows:
1.用户在浏览显示内容时更改个性化设置,例如将显示屏幕的显示模式更改为逆时针的横屏显示。1. The user changes the personalization setting while browsing the display content, for example, changing the display mode of the display screen to the horizontal display of the counterclockwise.
2.智能手机的处理器响应于接收到的用户的新的个性化设置,并判断新的个性化设置是否与先前的个性化设置的显示模式相同、基本位图上是否存在显示内容、新的个性化设置的显示模式与基本位图对应的显示模式是否相同等等。2. The processor of the smartphone responds to the new personalized settings of the received user and determines whether the new personalized setting is the same as the display mode of the previous personalized setting, whether there is display content on the basic bitmap, new The display mode of the personalized setting is the same as the display mode corresponding to the basic bitmap.
3.在新的个性化设置与先前的个性化设置的显示模式不同并且基本位图上存在显示内容时,擦除先前渲染位图上的显示内容。3. When the new personalization setting is different from the display mode of the previous personalized setting and the display content exists on the basic bitmap, the display content on the previously rendered bitmap is erased.
4.基于新的个性化设置,以顺时针旋转90°的方式更改显示内容的排版方向,并进行排版和渲染(如图6的620所示);4. Based on the new personalized setting, change the layout direction of the display content by rotating 90° clockwise, and perform layout and rendering (as shown in 620 of FIG. 6);
5.基于新的个性化设置,将基本位图逆时针旋转90°,并在显示屏幕上展示给用户(如图6的630所示)。5. Based on the new personalization settings, rotate the base bitmap 90° counterclockwise and present it to the user on the display screen (shown at 630 in Figure 6).
由此,可以响应于用户对显示屏幕的显示模式的更改,以用户期望的方式在基本位图上重新排版渲染,以展示需要显示的内容,提高位图的利用率,提升用户的体验效果。Thereby, in response to the user's change of the display mode of the display screen, the layout can be re-formatted on the basic bitmap in a manner desired by the user to display the content that needs to be displayed, improve the utilization of the bitmap, and improve the user experience.
上文中已经参考附图详细描述了根据本发明的电子设备及其内容显示方法、装置。The electronic device and its content display method and apparatus according to the present invention have been described in detail above with reference to the accompanying drawings.
此外,根据本发明的方法还可以实现为一种计算机程序,该计算机程序包括用于执行本发明的上述方法中限定的上述各步骤的计算机程序代码指令。或者,根据本发明的方法还可以实现为一种计算机程序产品,该计算机程序产品包括计算机可读介质,在该计算机可读介质上存储有用于执行本发明的上述方法中限定的上述功能的计算机程序。Furthermore, the method according to the invention can also be implemented as a computer program comprising computer program code instructions for performing the various steps defined above in the above method of the invention. Alternatively, the method according to the invention may also be embodied as a computer program product comprising a computer readable medium on which is stored a computer for performing the above-described functions defined in the above method of the invention program.
或者,本发明还可以实施为一种非暂时性机器可读存储介质,其上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行根据本发明的上述内容显示方法。Alternatively, the present invention may also be embodied as a non-transitory machine readable storage medium having stored thereon executable code that, when executed by a processor of an electronic device, causes the processor to execute The above content display method of the invention.
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性 逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。The various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
附图中的流程图和框图显示了根据本发明的多个实施例的系统和方法的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标记的功能也可以以不同于附图中所标记的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality and operation of possible implementations of systems and methods in accordance with various embodiments of the present invention. In this regard, each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that in some alternative implementations, the functions noted in the blocks may also occur in a different order than the ones in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented in a dedicated hardware-based system that performs the specified function or operation. Or it can be implemented by a combination of dedicated hardware and computer instructions.
以上已经描述了本发明的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。The embodiments of the present invention have been described above, and the foregoing description is illustrative, not limiting, and not limited to the disclosed embodiments. Numerous modifications and changes will be apparent to those skilled in the art without departing from the scope of the invention. The choice of terms used herein is intended to best explain the principles, practical applications, or improvements of the techniques in the various embodiments of the embodiments, or to enable those of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

  1. 一种电子设备的内容显示方法,所述电子设备的显示屏幕具有两种显示模式,即横屏显示模式和竖屏显示模式,该方法包括:A content display method of an electronic device, wherein the display screen of the electronic device has two display modes, that is, a horizontal display mode and a vertical display mode, and the method includes:
    位图创建步骤,基于所述显示屏幕的尺寸,创建所述电子设备渲染页面所需要的基本位图,所述基本位图对应于所述显示屏幕的横屏显示模式和竖屏显示模式中的一种;a bitmap creation step of creating a basic bitmap required by the electronic device to render a page based on a size of the display screen, the basic bitmap corresponding to a horizontal screen display mode and a vertical screen display mode of the display screen One type;
    设置步骤,接收用户对所述显示屏幕的个性化设置,所述个性化设置包括所述显示屏幕的显示模式;a setting step of receiving a personalized setting of the display screen by a user, the personalized setting including a display mode of the display screen;
    排版渲染步骤,响应于所述用户对所述显示屏幕的个性化设置,在所述基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图,其中,当所述个性化设置的显示模式与所述基本位图对应的显示模式不同时,以顺时针或逆时针旋转90°的方式对所述需要显示的内容进行排版;以及a typesetting rendering step, in response to the user's personalized setting of the display screen, formatting and rendering the content to be displayed on the basic bitmap to obtain a rendered bitmap, wherein when the personalized setting When the display mode is different from the display mode corresponding to the basic bitmap, the content to be displayed is typeset by rotating 90° clockwise or counterclockwise;
    展示步骤,在所述显示屏幕上展示所述渲染位图,其中,当所述个性化设置的显示模式与所述基本位图的显示模式不同时,将所述渲染位图以与所述排版渲染步骤中相反的方向旋转90°。a presentation step of displaying the rendered bitmap on the display screen, wherein when the display mode of the personalized setting is different from the display mode of the basic bitmap, the rendered bitmap is associated with the typesetting Rotate 90° in the opposite direction in the rendering step.
  2. 根据权利要求1所述的方法,其中,所述排版渲染步骤还包括:The method of claim 1 wherein said typesetting rendering step further comprises:
    响应于接收到用户对所述显示屏幕新的个性化设置,擦除先前的渲染位图上的显示内容,以恢复所述基本位图,以便基于所述新的个性化设置,在所述基本位图上对需要显示的内容进行排版和渲染,以得到所述渲染位图。In response to receiving a user's new personalized settings for the display screen, erasing the display content on the previous rendered bitmap to recover the base bitmap, based on the new personalized settings, in the base The content to be displayed is typeset and rendered on the bitmap to obtain the rendered bitmap.
  3. 根据权利要求1所述的方法,其中,所述展示步骤还包括:The method of claim 1 wherein said displaying step further comprises:
    将旋转后的所述渲染位图平移到所述显示屏幕上适于其显示的位置。The rotated rendered bitmap is translated to a position on the display screen suitable for its display.
  4. 根据权利要求1-3中任何一项所述的方法,其中,A method according to any one of claims 1 to 3, wherein
    所述用户对所述显示屏幕的个性化设置还包括内容显示区域的尺寸及其相对于显示屏幕的预定位置,The user's personalized setting of the display screen further includes a size of the content display area and a predetermined position relative to the display screen,
    在所述排版渲染步骤中,在所述基本位图的由所述内容显示区域的尺 寸限定的部分位图上,对需要显示的内容进行排版和渲染,以得到所述渲染位图,其中所述部分位图经过排版和渲染后成为部分渲染位图,In the typesetting rendering step, on the partial bitmap defined by the size of the content display area of the basic bitmap, the content to be displayed is typeset and rendered to obtain the rendered bitmap, where After the partial bitmap is typeset and rendered, it becomes a partial rendered bitmap.
    所述展示步骤还包括:The displaying step further includes:
    根据所述内容显示区域的尺寸在所述渲染位图中截取所述部分渲染位图,以在所述显示屏幕上所述预定位置处展示所述部分渲染位图。The partially rendered bitmap is captured in the rendered bitmap according to a size of the content display area to display the partially rendered bitmap at the predetermined location on the display screen.
  5. 一种电子设备的内容显示装置,所述电子设备的显示屏幕具有两种显示模式,即横屏显示模式和竖屏显示模式,该装置包括:A content display device of an electronic device, the display screen of the electronic device having two display modes, that is, a horizontal display mode and a vertical display mode, the device comprising:
    位图创建模块,用于基于所述显示屏幕的尺寸,创建所述电子设备渲染页面所需要的基本位图,所述基本位图对应于所述显示屏幕的横屏显示模式和竖屏显示模式中的一种;a bitmap creation module, configured to create a basic bitmap required by the electronic device to render a page according to a size of the display screen, where the basic bitmap corresponds to a horizontal screen display mode and a vertical screen display mode of the display screen One of them;
    设置模块,用于接收用户对所述显示屏幕的个性化设置,所述个性化设置包括所述显示屏幕的显示模式;a setting module, configured to receive a personalized setting of the display screen by a user, where the personalized setting includes a display mode of the display screen;
    排版渲染模块,用于响应于所述用户对所述显示屏幕的个性化设置,在所述基本位图上对需要显示的内容进行排版和渲染,以得到渲染位图,其中,当所述个性化设置的显示模式与所述基本位图对应的显示模式不同时,以顺时针或逆时针旋转90°的方式对所述需要显示的内容进行排版;以及a typesetting rendering module, configured to typeset and render the content to be displayed on the basic bitmap in response to the personalized setting of the display screen by the user, to obtain a rendered bitmap, wherein, when the personality is When the display mode of the setting is different from the display mode corresponding to the basic bitmap, the content to be displayed is typeset by rotating 90° clockwise or counterclockwise;
    展示模块,用于在所述显示屏幕上展示所述渲染位图,其中,当所述个性化设置的显示模式与所述基本位图的显示模式不同时,将所述渲染位图以与所述排版渲染过程中相反的方向旋转90°。a display module, configured to display the rendered bitmap on the display screen, wherein when the display mode of the personalized setting is different from the display mode of the basic bitmap, the rendering bitmap is Rotate 90° in the opposite direction during the layout rendering process.
  6. 根据权利要求5所述的装置,其中,所述排版渲染模块还用于:The apparatus according to claim 5, wherein the typesetting rendering module is further configured to:
    响应于接收到用户对所述显示屏幕新的个性化设置,擦除先前的渲染位图上的显示内容,以恢复所述基本位图,以便基于所述新的个性化设置,在所述基本位图上对需要显示的内容进行排版和渲染,以得到所述渲染位图。In response to receiving a user's new personalized settings for the display screen, erasing the display content on the previous rendered bitmap to recover the base bitmap, based on the new personalized settings, in the base The content to be displayed is typeset and rendered on the bitmap to obtain the rendered bitmap.
  7. 根据权利要求5所述的装置,其中,所述展示模块还用于:The apparatus according to claim 5, wherein the display module is further configured to:
    将旋转后的所述渲染位图平移到所述显示屏幕上适于其显示的位置。The rotated rendered bitmap is translated to a position on the display screen suitable for its display.
  8. 根据权利要求5-7中任何一项所述的装置,其中,A device according to any one of claims 5-7, wherein
    所述用户对所述显示屏幕的个性化设置还包括内容显示区域的尺寸及其相对于显示屏幕的预定位置,The user's personalized setting of the display screen further includes a size of the content display area and a predetermined position relative to the display screen,
    所述排版渲染模块在所述基本位图的由所述内容显示区域的尺寸限定的部分位图上,对需要显示的内容进行排版和渲染,以得到所述渲染位图,其中所述部分位图经过排版和渲染后成为部分渲染位图,The layout rendering module formats and renders the content to be displayed on a partial bitmap defined by the size of the content display area of the basic bitmap to obtain the rendered bitmap, wherein the partial bitmap The graph becomes a partially rendered bitmap after being typeset and rendered.
    所述展示模块还用于:The display module is further configured to:
    根据所述内容显示区域的尺寸在所述渲染位图中截取所述部分渲染位图,以在所述显示屏幕上所述预定位置处展示所述部分渲染位图。The partially rendered bitmap is captured in the rendered bitmap according to a size of the content display area to display the partially rendered bitmap at the predetermined location on the display screen.
  9. 一种电子设备,包括:An electronic device comprising:
    显示屏幕;display screen;
    处理器;以及Processor;
    存储器,其上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行如权利要求1-4中任何一项所述的内容显示方法。A memory having stored thereon executable code that, when executed by the processor, causes the processor to perform the content display method of any of claims 1-4.
  10. 一种非暂时性机器可读存储介质,其上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如权利要求1至4中任一项所述的内容显示方法。A non-transitory machine readable storage medium having stored thereon executable code for causing the processor to perform any of claims 1 to 4 when executed by a processor of an electronic device The content display method.
PCT/CN2018/086853 2017-05-27 2018-05-15 Electronic device, content display method and content display apparatus therefor, and storage medium WO2018219140A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710390698.6 2017-05-27
CN201710390698.6A CN107239247B (en) 2017-05-27 2017-05-27 Electronic equipment and content display method, device and storage medium thereof

Publications (1)

Publication Number Publication Date
WO2018219140A1 true WO2018219140A1 (en) 2018-12-06

Family

ID=59984645

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/086853 WO2018219140A1 (en) 2017-05-27 2018-05-15 Electronic device, content display method and content display apparatus therefor, and storage medium

Country Status (2)

Country Link
CN (1) CN107239247B (en)
WO (1) WO2018219140A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239247B (en) * 2017-05-27 2019-12-20 广州阿里巴巴文学信息技术有限公司 Electronic equipment and content display method, device and storage medium thereof
CN108268288A (en) * 2018-01-28 2018-07-10 厦门四信通信科技有限公司 A kind of method of android display systems dynamic setting adjustment
CN116107743A (en) * 2023-01-12 2023-05-12 北京麟卓信息科技有限公司 Bitmap scaling rendering optimization method based on object dynamic migration

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306997A (en) * 2014-05-30 2016-02-03 广州市动景计算机科技有限公司 Mobile terminal play mode switching method and device
CN105447821A (en) * 2015-12-24 2016-03-30 广州乐霸网络科技有限公司 Self-adaptive revolving method and device of mobile terminal web game
US20160292133A1 (en) * 2015-04-02 2016-10-06 Apple Inc. Dynamically Determining Arrangement of a Layout
CN107239247A (en) * 2017-05-27 2017-10-10 广州阿里巴巴文学信息技术有限公司 Electronic equipment and its content display method, device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2797320B2 (en) * 1988-06-14 1998-09-17 株式会社日立製作所 Image display device
JPH0721401A (en) * 1993-06-21 1995-01-24 Ricoh Co Ltd Display device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306997A (en) * 2014-05-30 2016-02-03 广州市动景计算机科技有限公司 Mobile terminal play mode switching method and device
US20160292133A1 (en) * 2015-04-02 2016-10-06 Apple Inc. Dynamically Determining Arrangement of a Layout
CN105447821A (en) * 2015-12-24 2016-03-30 广州乐霸网络科技有限公司 Self-adaptive revolving method and device of mobile terminal web game
CN107239247A (en) * 2017-05-27 2017-10-10 广州阿里巴巴文学信息技术有限公司 Electronic equipment and its content display method, device and storage medium

Also Published As

Publication number Publication date
CN107239247B (en) 2019-12-20
CN107239247A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
US10878609B2 (en) Efficient image synthesis
US10031712B2 (en) System and method for display mirroring
CN107728901B (en) Interface display method and device and terminal
US9792670B2 (en) Picture display method and apparatus
RU2606055C2 (en) Desktop system of mobile terminal and interface interaction method and device
WO2018219140A1 (en) Electronic device, content display method and content display apparatus therefor, and storage medium
EP2962191A2 (en) System and method for virtual displays
CN110457102B (en) Visual object blurring method, visual object rendering method and computing equipment
WO2018119575A1 (en) Display method and electronic device
WO2017181844A1 (en) Method and device for controlling cursor, and display device
EP3035323A1 (en) Display apparatus and controlling method
JP2015170343A (en) Image display device and image display method
CN111638929A (en) Startup image processing method, device, equipment and storage medium
KR102061869B1 (en) Electronic apparatus and method for image displaying
CN107079198B (en) Display device, system and control method thereof
US20160062601A1 (en) Electronic device with touch screen and method for moving application functional interface
US20200251074A1 (en) Dynamic resolution scaling
CN115617225A (en) Application interface display method and device, electronic equipment and storage medium
CN104881261A (en) Method and system for reasonably using memory of display buffer
CN107450792B (en) Information processing method and mobile terminal
US11016584B2 (en) Electronic device having a curved display and control method thereof
CN109085978B (en) View display method, storage medium and mobile terminal
CN112099650A (en) Screen display method and device, electronic equipment and computer readable storage medium
CN115202773A (en) Application interface display method and device, terminal and storage medium
WO2016033934A1 (en) Projection method, projection device and computer storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18809420

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18809420

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 18809420

Country of ref document: EP

Kind code of ref document: A1