Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a picture moving method, which may include the following steps:
step 101: when a first trigger operation for a picture displayed on a screen is detected, determining whether the first trigger operation meets a preset moving condition, if so, executing step 102, otherwise, executing step 106.
In a practical application scenario, since the size (in pixels) of a picture is larger than the resolution of a screen, the content of the picture cannot be completely displayed on the screen, in which case, if the whole content of the picture is to be viewed, the picture needs to be moved to adjust the displayed content of the picture on the screen.
The method can be applied to devices such as a mobile terminal and a PC terminal, and the form of the first trigger operation can be various according to different devices to which the screen belongs. For example, when the method is applied to a mobile terminal and a screen of the mobile terminal has a touch function, the first trigger operation may be a slide. When the method is applied to the PC side, the first trigger operation may be a mouse drag. Of course, the form of the first trigger operation is not limited to the above two, and other operations for the screen such as double-click may be performed. The second trigger operation described below is similar to the first trigger operation, and the above-described various forms also exist.
In the embodiment of the present invention, the first trigger operation and the preset moving condition jointly determine whether to execute the series of operations of moving the picture from step 102 to step 105. Accordingly, there is also a difference in the movement conditions corresponding to the different first trigger operations.
Taking the first trigger operation as an example of sliding, at least the following three cases exist for determining whether the first trigger operation satisfies the preset movement condition.
A: determining whether the sliding distance is greater than a preset sliding distance threshold.
B: it is determined whether the slip speed is greater than a preset slip speed threshold.
C: and determining whether the sliding distance is greater than a preset sliding distance threshold value and the sliding speed is greater than a preset sliding speed threshold value.
It can be seen from A, B, C that when the first trigger operation is sliding, the related operation of moving or not can be determined according to the sliding speed only, the sliding distance only, or both the sliding distance and the sliding speed, i.e. steps 102-105.
In an actual application scenario, because the first trigger operation has different forms, it is determined whether the first trigger operation satisfies the preset moving condition, and different implementation forms exist, which is not described herein again.
Step 102: and reducing the scale of the picture to a first scale.
When the first trigger operation meets the preset moving condition, the series of operations of zoom-out-moving-zoom-in is started to be executed.
The "scale of the picture is reduced to the first scale" includes at least the following two cases.
Case 1: and reducing the scale of the picture to a preset first scale.
Case 2: determining a first scale according to a first trigger operation; and reducing the scale of the picture to a first scale.
In case 1, the scale of the picture is reduced to a fixed value (i.e., the first scale) regardless of the first trigger operation, and in case 2, the scale of the picture after reduction is determined by the first trigger operation.
Now, using the first trigger operation as an example, a description will be given of "determining the first scale according to the first trigger operation".
Determining the first scale according to the first triggering operation may include:
and determining a first scale according to the sliding distance.
Determining the first scale according to the first triggering operation may include:
according to the sliding speed, a first scale is determined.
Determining the first scale according to the first triggering operation may include:
and determining a first scale according to the sliding distance and the sliding speed.
Taking the sliding speed as an example, the larger the sliding speed, the smaller the first scale.
Step 103: and determining the movement parameters according to the first trigger operation.
Movement parameters include, but are not limited to: a moving distance, a moving direction, a moving speed, and the like;
in an actual application scenario, the moving distance may be determined according to the sliding distance, and may also be determined according to the sliding speed. Further, the sliding distance may be determined as the moving distance, or the moving distance may be determined according to a preset adjustment parameter and the sliding distance. Similarly, the sliding direction may be determined as the moving direction, and the moving direction may also be determined according to a preset direction coefficient and the sliding direction.
Step 104: and moving the picture according to the moving parameters.
Step 105: and amplifying the scale of the picture to a second scale, wherein the size of the picture is larger than the resolution of the screen.
After the movement is completed, the scale of the picture needs to be enlarged to the scale before the picture is reduced or other predetermined scales, so as to improve the user experience.
In an actual application scene, the second scale of the enlarged picture may be equal to the scale of the enlarged picture before reduction, and the second scale of the enlarged picture may be determined according to the first trigger operation.
Taking sliding as an example, the second scale is determined according to the sliding speed, or the second scale is determined according to the sliding distance, or the second scale is determined according to the sliding speed and the sliding distance.
Step 106: and moving the picture according to the first trigger operation.
When the first trigger operation does not meet the moving condition, the first trigger operation cannot trigger the series of operations of zooming out, moving and amplifying, and in this case, the picture can be directly moved according to the first trigger operation. The specific implementation process is similar to steps 103 and 104, and is not described herein again.
When the first trigger operation does not meet the moving condition, determining a moving parameter according to the first trigger operation; and moving the picture according to the moving parameters. That is, when the moving condition is satisfied, the method performs an operation of "zoom-out-move-zoom", and when the moving condition is not satisfied, the method performs an operation of "move-zoom".
According to the method, the first trigger operation is judged, the operations of zooming out, moving and amplifying the picture can be automatically completed, frequent operation of a user is not needed, and convenience and user experience can be improved.
In order to make the user clearly perceive the picture movement and further improve the user experience, in an embodiment of the present invention, moving the picture according to the movement parameter includes:
moving the picture to a moving direction by a first segmentation distance according to a preset moving speed;
moving the picture to the moving direction by a second sectional distance according to a preset moving acceleration;
wherein the sum of the first and second segment distances is equal to the movement distance; the moving acceleration is less than 0.
The moving process is divided into two stages, the first stage is to move at a constant speed according to a certain moving speed, and the second stage is to perform deceleration movement according to a certain moving acceleration until the movement stops. In an actual application scene, the expression form corresponding to the second stage is that the picture slowly moves to a stop, so that the user can perceive that the picture is moved, and the user experience is improved. Of course, the moving process may also be divided into multiple stages, which are not described herein again.
In an actual application scenario, in the moving process of the picture, if the user finds that the distance between the current screen display position and the distance which the user wants to pay attention to is larger than the current screen display position, a second trigger operation can be performed on the picture to enable the picture to continue to move. For example, if the position of the map displayed on the current screen is beijing, and the position that the user wants to view is hainan, the user may slide the screen upward to trigger the picture to move, and in the process of moving the picture, when the user moves to hunnan, the moving speed of the picture is reduced, which means that the picture will stop moving and cannot reach the destination position, hainan, and at this time, the user may perform a second trigger operation on the picture according to the display condition of the screen, so that the picture continues to move to hainan.
In view of this, in one embodiment of the present invention, after moving the picture according to the moving parameter, before enlarging the scale of the picture to the second scale, the method may further include: and when a second trigger operation aiming at the picture is detected, moving the picture according to the second trigger operation.
In an actual application scenario, the processing for the second trigger operation may be the same as the first trigger operation, or may be different from the first trigger operation.
For example, moving a picture according to a second trigger operation includes: determining whether the second trigger operation meets a preset moving condition, and if so, reducing the scale of the picture to a third scale; determining a movement parameter according to the second trigger operation; and moving the picture according to the moving parameters.
For another example, moving a picture according to a second trigger operation includes: determining a movement parameter according to a first trigger operation; and moving the picture according to the moving parameters.
It should be noted that the movement parameter corresponding to the first trigger operation and the movement parameter corresponding to the second trigger operation may be the same or different.
The embodiment of the present invention will take fig. 2-5 as an example to describe the picture moving method in detail, as shown in fig. 6, the method includes:
step 601: when the sliding operation for the map displayed on the screen is detected, whether the sliding distance is greater than a preset sliding distance threshold value is determined, if yes, step 602 is executed, otherwise, step 608 is executed.
In an embodiment of the present invention, the user wants to move the map from the currently displayed yellow dragon sports center to the aribbicxi park in the direction of sliding as shown in fig. 2.
Step 602: it is determined whether the slip speed is greater than a preset slip speed threshold, if so, step 603 is performed, otherwise, step 608 is performed.
Step 603: and reducing the scale of the map to a preset first scale.
The zoomed-out map is shown in fig. 3. Wherein the position shown by "x" is a yellow dragon sports center.
Step 604: according to the sliding operation, the moving distance and the moving direction are determined.
In the embodiment of the invention, the moving direction is the sliding direction, and the moving distance is from the Huanglong sports center to the Alibaxi stream park.
Step 605: and moving the map to the moving direction by a first segmentation distance according to a preset moving speed.
Step 606: moving the map to a moving direction by a second sectional distance according to a preset moving acceleration, wherein the sum of the first sectional distance and the second sectional distance is equal to the moving distance; the moving acceleration is less than 0.
The position of stopping after the movement is shown in fig. 4.
Step 607: and carrying out the scale method of the map to a second scale.
The map of the screen presentation after zooming in is shown in fig. 5. More detailed information can be viewed from fig. 5 than from fig. 4.
Step 608: the map is moved according to the sliding operation.
And if the moving condition is not met, directly moving the map.
As shown in fig. 7, an embodiment of the present invention provides a picture moving apparatus, including:
a determining unit 701, configured to determine, when a first trigger operation for a picture displayed on a screen is detected, whether the first trigger operation satisfies a preset moving condition, and if so, trigger a zooming-out unit 702; wherein the size of the picture is larger than the resolution of the screen;
a reducing unit 702, configured to reduce the scale of the picture to a first scale;
a moving unit 703, configured to determine a moving parameter according to a first trigger operation; moving the picture according to the moving parameters;
and an enlarging unit 704 for enlarging the scale of the picture to a second scale.
In one embodiment of the invention, the first trigger operation comprises: sliding;
a determining unit 701, configured to determine whether the sliding distance is greater than a preset sliding distance threshold.
In one embodiment of the invention, the first trigger operation comprises: sliding;
a determining unit 701, configured to determine whether the sliding speed is greater than a preset sliding speed threshold.
In an embodiment of the present invention, the reducing unit 702 is configured to reduce the scale of the picture to a preset first scale.
In an embodiment of the present invention, the reducing unit 702 is configured to determine a first scale according to a first triggering operation; and reducing the scale of the picture to a first scale.
In one embodiment of the invention, the movement parameters include: a movement distance and a movement direction; a moving unit 703, configured to move the picture by a first segmentation distance in the moving direction according to a preset moving speed; moving the picture to the moving direction by a second sectional distance according to a preset moving acceleration; wherein the sum of the first and second segment distances is equal to the movement distance; the moving acceleration is less than 0.
In an embodiment of the present invention, the moving unit 703 is further configured to, when detecting a second trigger operation for the picture, move the picture according to the second trigger operation.
In an embodiment of the present invention, the moving unit 703 is further configured to move the picture according to the first triggering operation when the first triggering operation does not satisfy the moving condition.
An embodiment of the present invention provides a picture moving device, including: a processor and a memory;
the memory is used for storing execution instructions, and the processor is used for executing the execution instructions stored by the memory to realize the method of any one of the above embodiments.
In the 90's of the 20 th century, improvements to a technology could clearly distinguish between improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements to process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is an integrated circuit whose Logic functions are determined by a user programming the Device. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), lava, lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium that stores computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element described by the phrase "comprising a. -" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.