Display control program

The display control program aligns stroke line edges with the ruler edge by considering line width and display magnification, addressing overlap issues in conventional technologies.

WO2026234969A1PCT designated stage Publication Date: 2026-11-12BROTHER KOGYO KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2026/015570
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-08
Filing Date
2026-04-17
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

Conventional technologies fail to address the issue of line width adjustment in a display device, which is not taken into account the line width of the line width of the line width of the line width of the line width of the stroke line and the edge of the ruler, leading to overlap issues when display magnification or line width changes.

Method used

A display control program that aligns the edge of the stroke line with the edge of the ruler by determining stroke coordinates based on line width and display magnification, ensuring alignment regardless of screen magnification or line width changes.

Benefits of technology

The solution ensures that the edge of the stroke line consistently aligns with the ruler edge, preventing overlap and maintaining accuracy during display magnification or line width adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2026015570_12112026_PF_FP_ABST
    Figure JP2026015570_12112026_PF_FP_ABST
Patent Text Reader

Abstract

Provided is a display control program for causing the edge of a stroke line to follow the side of a ruler regardless of the magnification ratio of a display screen on a touch panel or the line width of the stroke. A CPU turns on a snap mode (S66) when the CPU determines that the distance between the touch coordinates of a stroke input by handwriting and the ruler is equal to or less than a fixed value (S65: YES). The CPU acquires thickness data, which is data relating to the line width of an object to be added (S63). The CPU determines coordinates at which the edge of the stroke is in contact with the side of the ruler on the basis of the touch coordinates of the stroke input by handwriting, the thickness data of the object acquired in S63, and the magnification ratio of a page display area 65 (S64). The CPU adds and displays the object 21 at coordinates in contact with the side of the ruler on the basis of the determined coordinates (S64).
Need to check novelty before this filing date? Find Prior Art

Description

Display Control Program

[0001] The present invention relates to a display control program.

[0002] The electronic device described in Patent Document 1 receives a handwritten instruction from a user via a touch panel. The touch panel draws straight lines and curves corresponding to the trajectory of the contact position between a stylus pen and the touch panel. The electronic device shifts to a straightedge ruler mode by detecting that the user has pressed a straightedge ruler button via the touch panel. When detecting two touch coordinates, the electronic device displays a ruler on the touch panel based on the two touch coordinates. When detecting a third touch coordinate, the electronic device displays a straight line along the edge of the displayed ruler based on the trajectory of the third touch coordinate.

[0003] Japanese Unexamined Patent Application Publication No. 2012-88768

[0004] Conventional electronic devices do not take into account the line width of strokes input to the touch panel. Accordingly, when the display magnification of the screen displayed on the touch panel is changed, or when the line width of a stroke is changed, there is a problem that the edge of the line may not follow the ruler and overlap with the ruler depending on the positional relationship between the display position of the stroke line and the ruler.

[0005] An object of the present invention is to make the edge of a stroke line follow the edge of a ruler, regardless of the display magnification of the screen on the touch panel or the line width of the stroke.

[0006] A display control program according to one aspect of the present invention is a display control program executed by a computer that controls an information processing device equipped with a touch panel and capable of acquiring a plurality of touch coordinates which are the coordinates of a location touched on the touch panel, characterized in that the computer is made to execute the following: a ruler display process which displays a ruler on the touch panel based on an instruction to display a ruler; a movement process which acquires a first touch coordinate and a second touch coordinate which are the coordinates of a location touched on the ruler displayed on the touch panel, and moves or rotates the ruler in accordance with the movement of the first touch coordinate and the second touch coordinate; a drawing process which, when handwriting input is made to the touch panel, if the distance between the input coordinate and the position of the ruler is less than or equal to a certain value, draws the handwriting input along the ruler; and a coordinate determination process which, in the drawing process, determines the coordinates of a stroke based on the line width of the input stroke and the display magnification ratio of the screen displayed on the touch panel, such that the edge of the stroke and the side of the two sides of the ruler that extends in the direction in which the stroke extends that is closer to the stroke coincide.

[0007] The display control program determines the stroke coordinates based on the stroke line width and display magnification so that the edge of the stroke coincides with the stroke-side edge of the ruler. Therefore, regardless of the display magnification of the screen displayed on the touch panel or the width of the stroke line, the edge of the stroke line can be aligned with the edge of the ruler.

[0008] This is a block diagram showing the electrical configuration of the information processing device 1. This is a diagram showing the state in which document 60 is displayed in the editing window 5. This is a diagram showing the state in which document 60 and ruler 30 are displayed in the editing window 5. This is a flowchart of the display control process. This is a flowchart of the ruler movement process. This is a diagram showing the state in which document 60 and ruler 30 are displayed in the editing window 5. This is a diagram showing the state in which document 60 and ruler 30 are displayed in the editing window 5. This is a diagram showing the state in which ruler 30 has been moved in the editing window 5. This is a flowchart of the ruler rotation process. This is a diagram showing the state in which ruler 30 has been rotated in the editing window 5. This is a flowchart of the handwritten stroke drawing process. This is a diagram showing the state in which a handwritten stroke has been entered in the editing window 5. This is a diagram showing the state in which a shaped figure 22B is displayed in the editing window 5. This is a diagram showing the state in which a handwritten stroke has been entered in the editing window 5. This is a diagram showing the state in which an object 21 is displayed at coordinates tangent to ruler 30. This figure shows the state where object 21 is displayed at coordinates tangent to ruler 30. This figure shows the state where a hand-drawn shape is displayed in editing window 5. This is a flowchart of the ruler drawing process. This figure shows the state where the scale of ruler 30 has been changed.

[0009] Referring to Figure 1, the electrical configuration of the information processing device 1 will be explained. The information processing device 1 comprises a CPU 10, a system controller 11, a ROM 12, a RAM 13, a graphics controller 15, a touchscreen display 16, and a communication unit 19. The information processing device 1 is a portable information terminal device, such as a smartphone, tablet terminal, or tablet PC.

[0010] The CPU 10 controls the information processing device 1 and executes a display control program according to one embodiment of the present invention. The system controller 11 connects the local bus of the CPU 10 to each component. The ROM 12 stores the BIOS, OS, setting values, etc. The RAM 13 temporarily stores data and flags generated when the CPU 10 executes processing. The flash memory 14 stores various programs executed by the CPU 10, such as programs for display control processing, ruler movement processing, ruler rotation processing, and handwriting stroke drawing processing, which will be described later.

[0011] The touchscreen display 16 includes a flat panel display 17 and a sensor 18. The flat panel display 17 displays a visual output to the user. The sensor 18 detects the contact position of a stylus pen 4 or finger on the screen of the touchscreen display 16. The graphics controller 15 controls the display of the flat panel display 17.

[0012] The communication unit 19 is an interface that can connect to the network 3. The network 3 connects to the server 2 wirelessly or via a wired connection. The CPU 10 obtains page drawing information for the document 60 (see Figure 2) to be displayed on the touchscreen display 16 from the flash memory 14 or the server 2. The information processing device 1 may also obtain the program executed by the CPU 10 via the network 3. The information processing device 1 may also store the obtained page drawing information and program in its internal flash memory 14. The communication unit 19 communicates with the stylus pen 4 via wireless communication such as Bluetooth®.

[0013] Referring to Figure 2, the editing window 5 will be described. When the sensor 18 detects the operation to launch the editing application, the CPU 10 displays the editing window 5 on the touchscreen display 16. The editing window 5 includes a display area 50 and a number of software buttons 55. The display area 50 is, for example, a horizontal rectangle. The number of software buttons 55 includes a pen button 51, an eraser button, a selection button, a structuring button, etc. The editing window 5 also includes a ruler display button 56.

[0014] In the display area 50, a document 60 is displayed as an example. Document 60 is, as an example, a building floor plan in PDF format. Document 60 may also be other types of document data, images, etc. When the ruler display button 56 is selected, a ruler 30 is displayed in the display area 50 as shown in Figure 3. On the ruler 30, scales 31 are formed at predetermined intervals in the left-right direction at the top and bottom ends, and numerical values ​​are written at predetermined intervals corresponding to the scales 31. The units of the scale are written at predetermined intervals next to the numerical values. In the example shown in Figure 3, the numbers "5", "10", "15" are written every five scale divisions, and the unit "m" is written every 10 scale divisions.

[0015] As shown in Figure 3, the ruler 30 has a display unit 32 located in the center of the ruler 30 in the left-right direction. The display unit 32 shows the rotation angle of the ruler 30 with respect to the horizontal direction of the display area 50, and the scale of the current markings.

[0016] <Display Control Processing> The display control processing will be explained with reference to Figure 4. When the CPU 10 detects an instruction to start the display control processing from the sensor 18, it reads the program for the display control processing from the flash memory 14 and executes the processing. When the CPU 10 starts the display control processing, it displays the editing window 5 shown in Figure 2 on the flat panel display 17. At this time, nothing is displayed in the display area 50 of the editing window 5.

[0017] The CPU 10 determines whether the user has selected a page of the document to view (S1). An example of a document is a PDF document. When the sensor 18 detects a touch indicating the selection of a specific page of the document, the CPU 10 determines that the user has selected a page to view (S1: YES). Next, the CPU 10 obtains page rendering information from the flash memory 14 or the server 2 and displays the document 60 in the display area 50 as shown in Figure 2 (S2). The page rendering information is page rendering information stored in the flash memory 14 or the server 2, and can be drawings, document data, images, etc. In the example shown in Figure 2, an example of the document 60 is a floor plan of a building.

[0018] If the CPU 10 does not detect a touch from the sensor 18 indicating the selection of a specific page in the document, it does not determine that the user has selected a page to view (S1: NO). Therefore, the CPU 10 continues to make the determination in S1.

[0019] In the example shown in Figure 2, the area of ​​the document 60 displayed in the display area 50 is called the page display area 65. Following the processing in S2, the CPU 10 determines whether the page display area 65 has been operated (S3). The CPU 10 determines that the page display area 65 has been operated if the sensor 18 detects a touch on the page display area 65 (S3: YES). Examples of operations include pinch operations and pan operations. A pinch operation is an operation to enlarge or reduce the display on the screen by pinching the page display area 65 with two fingers. A pan operation is an operation to move the page display area 65 in a parallel direction (up, down, left, or right) by touching the page display area 65.

[0020] If the CPU 10 determines YES in the S3 decision process, it determines the page display origin (0,0) and magnification of the page display area 65 according to the detected operation (S4). The page display origin (0,0) shown in Figure 2 is the origin that serves as the reference for coordinate information and is located near the upper left corner of the display area 50. The left-right direction corresponds to the X-axis direction, and the up-down direction corresponds to the Y-axis direction. In this embodiment, the origin is near the upper left corner, and the direction extending to the right from the origin corresponds to the positive X-axis direction. The direction extending downward from the origin corresponds to the positive Y-axis direction. Next, the CPU 10 performs the decision in S5. If the sensor 18 does not detect a touch on the page display area 65, the CPU 10 does not determine that the page display area 65 has been operated (S3: NO). The CPU 10 does not perform the process in S4 and performs the decision in S5.

[0021] The CPU 10 determines whether it is in ruler display mode (S5). If the sensor 18 detects that the ruler display button 56 has been touched in the editing window 5 shown in Figure 2, the CPU 10 determines that it is in ruler display mode (S5: YES). If the sensor 18 does not detect that the ruler display button 56 has been touched, the CPU 10 does not determine that it is in ruler display mode (S5: NO). The CPU 10 proceeds to S3.

[0022] If the CPU 10 determines in the S5 decision process that it is in ruler display mode (S5: YES), it determines the interval of the scales on the ruler 30 to be drawn and the display units (S6). The CPU 10 determines the interval of the scales on the ruler 30 based on the resolution of the flat panel display 17, the scale of the document 60, and the page magnification of the page display area 65 (S6). An example of the resolution of the flat panel display 17 is 2752 x 2064 pixels. An example of the scale is 1 / 100, 1 / 1000, etc. The CPU 10 also determines the display units based on whether it is the metric system or the imperial system. For example, if it is the metric system, the display units are "m", "cm", "mm", etc.

[0023] In the display control process, during a setting process not shown in the diagram, the distance display unit, whether metric or imperial, is pre-set, and the distance display unit information is stored in the flash memory 14. The CPU 10 determines the interval of the scale and the display unit based on the magnification of the page display area 65, so as to display the actual size of the page display area 65. The CPU 10 also determines the display unit so that the minimum memory interval does not fall below 1 mm when the ruler 30 is drawn.

[0024] The CPU 10 reads the image data of the ruler 30 from the flash memory 14 and displays the ruler 30 in the display area 50 as shown in Figure 3 (S7). The CPU 10 displays the ruler 30 in the display area 50 based on the parameters determined in S6 (S7). For example, the CPU 10 determines the center coordinates of the ruler 30 to be the coordinates of the center of the display unit 32 of the ruler 30, which will be described later, and displays it in the display area 50. Also, for example, when the CPU 10 first displays the ruler 30 in the display area 50, it displays it at an angle of 0 degrees with respect to the horizontal direction of the display area 50. The CPU 10 displays the scale and display units of the ruler 30 according to the scale interval and distance display units of the ruler 30 determined in S6.

[0025] In the example shown in Figure 3, the CPU 10 displays the ruler 30 at an angle of 0 degrees relative to the horizontal direction of the display area 50, and the scale is displayed every 1 m. The CPU 10 also displays the scale numbers 5, 10, and 15 on the ruler 30 every 5 m, and the display unit is displayed as "m". The CPU 10 displays the display unit 32 in the horizontal center of the ruler 30. The CPU 10 displays the rotation angle of the ruler 30 relative to the horizontal direction and the scale on the display unit 32. In the example shown in Figure 3, the rotation angle is displayed as 0° and the scale as 1 / 100 within the circle representing the display unit 32. After displaying the ruler 30 (S7), the CPU 10 proceeds to processing S3.

[0026] <Ruler Movement Processing> Next, the ruler movement processing will be explained with reference to the flowchart shown in Figure 5. In the ruler movement processing, the CPU 10 controls the sliding movement, which is the horizontal movement of the ruler 30 up, down, left, and right. The CPU 10 reads the ruler movement processing program from the flash memory 14 and executes it in parallel with the display control program shown in Figure 4. First, the CPU 10 determines whether the page display area 65 has been panned (S13). The CPU 10 uses the sensor 18 to detect the touch coordinates, which are the coordinates of the area touched by the user in the page display area 65 on the flat panel display 17. If the CPU 10 detects a movement of the touch coordinates using the sensor 18, it determines that a pan operation has been performed (S13: YES). If the CPU 10 does not determine that a pan operation has been performed (S13: NO), it continues the determination in S13.

[0027] If the CPU 10 determines that a pan operation has been performed (S13: YES), it determines whether it is in ruler display mode (S14). If the ruler 30 is displayed in the display area 50, the CPU 10 determines that it is in ruler display mode (S14: YES). If the ruler 30 is not displayed in the display area 50, the CPU 10 does not determine that it is in ruler display mode (S14: NO). If the CPU 10 does not determine that it is in ruler display mode (S14: NO), it performs a movement operation to move the page display origin of the page display area 65 in response to the pan operation (S24). Next, the CPU 10 proceeds to S13.

[0028] In this embodiment, the CPU 10 determines that the ruler display mode is active because the ruler 30 is drawn in the display control process shown in Figure 4 (S14: YES). Next, the CPU 10 determines whether the touch coordinates of the pan operation are on the drawing area of ​​the ruler 30 (S15). The CPU 10 determines that the touch coordinates detected by the sensor 18 are on the drawing area of ​​the ruler 30 if they are within the coordinates of the drawing area of ​​the ruler 30 (S15: YES). Next, the CPU 10 determines whether one or two fingers are used for the pan operation (S16).

[0029] The CPU 10 determines that one finger was used for the pan operation if the touch coordinates detected by the sensor 18 are within the coordinates of the drawing area of ​​the ruler 30 (S16: 1 finger). Next, the CPU 10 determines whether the touch coordinates detected by the sensor 18 are in the right half of the ruler 30, region 30A, as shown in Figure 6 (S17). The right half of the ruler 30, region 30A, is the area to the right of the ruler 30 in the left-right direction from the coordinates of the center of the display unit 32 of the ruler 30. The area to the left of the ruler 30 from the coordinates of the center of the display unit 32 is called the left half of the ruler 30, region 30B. If the CPU 10 determines that the touch coordinates for the pan operation are in the right half of the ruler 30, region 30A (S17: YES), it highlights the right half of the ruler 30, region 30A, as shown in Figure 6 (S18). As an example of highlighting, the CPU 10 sets the color scheme of the right half of the ruler 30, area 30A, to be different from the color scheme of the left half, area 30B. For example, the CPU 10 changes the color scheme so that the right half of the ruler 30, area 30A, is darker than the left half, area 30B.

[0030] Furthermore, the CPU 10 displays a warning message 33 in the left half of the ruler 30, area 30B, which is in a position that is less likely to be obscured by the user's hand (S18). As an example of a warning message 33, the CPU 10 displays "Move / Rotate with two fingers" (S18). This display informs the user that in order to move or rotate the ruler 30 on the display area 50, the ruler 30 must be touched with two fingers. In addition, this warning message 33 visually indicates that the ruler 30 cannot be moved if there is only one touch coordinate on the ruler 30. If the sensor 18 detects only one touch coordinate, the CPU 10 will not move the ruler 30 even if the touch coordinate for panning moves. Next, the CPU 10 proceeds to S13.

[0031] If the CPU 10 does not determine that the touch coordinates detected by the sensor 18 are located in the right half of the ruler 30 (area 30A) (S17: NO), then the user's finger is touching the left half of the ruler 30 (area 30B). Therefore, as shown in Figure 7, the CPU 10 highlights the left half of the ruler 30 (area 30B) (S19). The CPU 10 also displays a warning message 33 in the right half of the ruler 30 (area 30A), which is less likely to be obscured by the user's hand (S19). As an example of a warning message 33, the CPU 10 displays "Move / Rotate with two fingers" (S19). This display informs the user that in order to move or rotate the ruler 30 on the display area 50, the ruler 30 must be touched with two fingers. Furthermore, this warning message 33 visually indicates that the ruler 30 cannot be moved if there is only one touch coordinate on the ruler 30. If the sensor 18 detects only one touch coordinate, the CPU 10 does not move the ruler 30 even if the touch coordinate of the pan operation moves. Next, the CPU 10 proceeds to process S13.

[0032] In S16, the CPU 10 determines that two fingers are used for the pan operation if there are two touch coordinates, a first touch coordinate and a second touch coordinate, within the coordinates of the drawing area of ​​the ruler 30, as shown in Figure 8 (S16: 2 fingers). Next, the CPU 10 determines whether the movement mode is ON (S20). The movement mode is initially set to OFF. Therefore, the CPU 10 does not determine that the movement mode is ON (S20: NO). Next, the CPU 10 determines whether the amount of movement of the first touch coordinate and the second touch coordinate of the pan operation is greater than or equal to a predetermined amount (S22).

[0033] A predetermined amount of movement is set in advance and recorded in the flash memory 14. For example, the predetermined amount of movement is 10 points (pt) in physical coordinates on the flat panel display 17. Since 1 pt = 1 / 72 inch, 10 pt is 10 / 72 inch. When the CPU 10 determines that the amount of movement of the touch coordinates for the pan operation is greater than or equal to a predetermined amount (S22: YES), it stores a flag indicating that the movement mode is ON in the RAM 13 (S23). In the determination in S22, for example, the CPU 10 determines YES when both the first touch coordinate and the second touch coordinate have moved greater than or equal to a predetermined amount. Alternatively, it may determine YES when either the first touch coordinate or the second touch coordinate has moved greater than or equal to a predetermined amount. Next, the CPU 10 moves the ruler 30 in accordance with the amount of movement of the touch coordinates for the pan operation (S21). The movement of the coordinates for the pan operation is detected by the sensor 18 and input to the CPU 10. Figure 9 shows an example of the ruler 30 being moved from the position shown in Figure 8. Next, the CPU 10 proceeds to process S13.

[0034] If the ruler 30 has been moved once and a flag indicating that the movement mode is ON is recorded in the RAM 13, the CPU 10 determines in the judgment of S20 that the movement mode is ON (S20: YES). As shown in Figure 9, the CPU 10 moves the ruler 30 in the display area 50 in accordance with the movement of the coordinates of the pan operation (S21).

[0035] <Ruler Rotation Processing> Next, the ruler rotation processing will be explained with reference to the flowchart shown in Figure 10. The CPU 10 reads the ruler rotation processing program from the flash memory 14 and executes it in parallel with the display control program shown in Figure 4 and the ruler movement processing shown in Figure 5. First, the CPU 10 determines whether the page display area 65 has been rotated (S33). The CPU 10 uses the sensor 18 to detect two touch coordinates, which are the coordinates of the location touched by the user in the page display area 65 on the flat panel display 17. These two touch coordinates are called the first touch coordinate and the second touch coordinate. Hereinafter, the rotation of the line segment connecting the first touch coordinate and the second touch coordinate is called the rotation operation. The first touch coordinate and the second touch coordinate are also collectively referred to simply as touch coordinates.

[0036] If the CPU 10 does not detect rotation of the line segment connecting the first touch coordinates and the second touch coordinates using the sensor 18, it does not determine that a rotation operation has occurred (S33: NO). The CPU 10 continues the determination in S33. If the CPU 10 detects rotation of the line segment connecting the first touch coordinates and the second touch coordinates using the sensor 18, it determines that a rotation operation has occurred (S33: YES). Next, the CPU 10 determines whether it is in ruler display mode (S34). If the ruler 30 is displayed in the display area 50, the CPU 10 determines that it is in ruler display mode (S34: YES). If the ruler 30 is not displayed in the display area 50, the CPU 10 does not determine that it is in ruler display mode (S34: NO). If the CPU 10 does not determine that it is in ruler display mode (S34: NO), it operates the rotation angle of the page display area 65 in accordance with the rotation operation (S44). Next, the CPU 10 proceeds to S33.

[0037] If the CPU 10 determines in S34 that it is in ruler display mode (S34: YES), it determines whether the touch coordinates for the rotation operation are on the drawing area of ​​the ruler 30 (S35). The CPU 10 determines that the touch coordinates for the rotation operation are on the drawing area of ​​the ruler 30 if the first and second touch coordinates detected by the sensor 18 are within the coordinates of the drawing area of ​​the ruler 30 (S35: YES). Next, the CPU 10 determines whether the rotation mode is ON (S36). The rotation mode is initially set to OFF, and a flag indicating that the rotation mode is OFF is stored in the RAM 13. Therefore, the CPU 10 does not determine that the rotation mode is ON (S36: NO). Next, the CPU 10 determines whether the rotation angle of the touch coordinates for the rotation operation is greater than or equal to a predetermined angle (S42).

[0038] A predetermined angle is set in advance and recorded in the flash memory 14. For example, the predetermined angle is 6 degrees. When the CPU 10 determines that the rotation angle of the rotation operation of the line segment connecting the first touch coordinates and the second touch coordinates detected by the sensor 18 is greater than or equal to the predetermined angle (S42: YES), it turns on the rotation mode and stores a flag indicating that the rotation mode is ON in the RAM 13 (S43). Next, the CPU 10 rotates the ruler 30 to match the rotation angle of the rotation operation (S38). The rotation operation is detected by the sensor 18 when it detects the rotation of the line segment connecting the first touch coordinates and the second touch coordinates, and this is input to the CPU 10.

[0039] The CPU 10 determines whether the rotation angle of the ruler 30 is within a threshold value for a specific value (S40). The specific value of the rotation angle and the threshold value are predetermined and recorded in the flash memory 14. An example of a specific value is the rotation angle in 15-degree increments. A 15-degree increment means that the rotation angle is 15 degrees, 30 degrees, 45 degrees, 60 degrees, 75 degrees, 90 degrees, 105 degrees, 120 degrees, 135 degrees, 150 degrees, and so on. The threshold value is, for example, ±α degrees for the specific value of the rotation angle of the ruler 30. For example, the threshold value is ±3 degrees for each 15-degree increment of the rotation angle of the ruler 30. Figure 11 shows an example of the ruler 30 rotated by an angle θ with respect to the horizontal line 40 in the left-right direction. The center of rotation at angle θ is the center of the line segment connecting the first touch coordinate and the second touch coordinate.

[0040] For example, the threshold is ±3 degrees for every 15-degree increment of the rotation angle of the ruler 30. Therefore, the CPU 10 determines that the rotation angle of the ruler is within the threshold for 45 degrees when the angle θ is between 42 and 48 degrees (S40: YES). Next, the CPU 10 sets the rotation angle θ of the ruler 30 to a specific value (S41). The CPU 10 sets a value in 15-degree increments of the rotation angle that falls within the threshold as a specific value (S41). For example, when the angle θ is between 42 and 48 degrees, the CPU 10 sets 45 degrees as the specific value (S41). Therefore, the CPU 10 draws the ruler 30 with its rotation angle θ set to 45 degrees (S41). Next, the CPU 10 proceeds to S33. The threshold is variable according to the magnification ratio of the page display area 65 displayed in the display area 50 of the flat panel display 17. For example, if the magnification doubles, the threshold may be set to ±1.5 degrees. Alternatively, the threshold may be calculated as ±3 degrees / magnification.

[0041] If the ruler 30 has been rotated once and a flag indicating that the rotation mode is ON is recorded in the RAM 13, the CPU 10 determines in the judgment of S36 that the rotation mode is ON (S36: YES). Next, the CPU 10 determines whether the ruler 30 has been moved by a certain amount or more (S37). The CPU 10 determines that the ruler 30 has been moved by a certain amount or more if the amount of movement of the first touch coordinate and the second touch coordinate detected by the sensor 18 on the display area of ​​the ruler 30 is a certain amount or more (S37: YES). An example of a certain amount is 40 points in physical coordinates on the flat panel display 17. If the CPU 10 determines that the ruler 30 has been moved by a certain amount or more (S37: YES), it stores a flag indicating that the rotation mode is OFF in the RAM 13 (S39) and proceeds to processing in S33.

[0042] If the CPU 10 does not determine that the ruler 30 has been moved by a certain amount or more (S37: NO), the CPU 10 rotates the ruler 30 in accordance with the rotation angle of the rotation operation (S38). Next, the CPU 10 performs the processes of S40 and S41 in the same manner as described above, and advances the process to S33. Accordingly, in the ruler rotation process described above, when the ruler 30 has been moved by a certain amount or more, movement is prioritized over rotation of the ruler 30, and the ruler 30 is drawn at the movement position.

[0043] <Handwritten Stroke Drawing Process> Next, the handwritten stroke drawing process will be described with reference to the flowchart shown in FIG. 12. The CPU 10 reads a program for the handwritten stroke drawing process from the flash memory 14, and executes it in parallel with the display control program shown in FIG. 4. First, the CPU 10 determines whether the user has input a handwritten stroke (S53). As an example, the CPU 10 enters a pen input mode when the sensor 18 detects that the pen button 51 has been selected. Then, when input of touch coordinates from the sensor 18 is detected, the CPU 10 determines that the user has input a handwritten stroke (S53: YES).

[0044] If the CPU 10 does not determine that the user has input a handwritten stroke (S53: NO), the CPU 10 continues the determination of S53. When the CPU 10 determines that the user has input a handwritten stroke (S53: YES), the CPU 10 determines whether the current mode is a ruler display mode (S54). When the ruler 30 is displayed in the display area 50, the CPU 10 determines that the current mode is the ruler display mode (S54: YES). When the ruler 30 is not displayed in the display area 50, the CPU 10 does not determine that the current mode is the ruler display mode (S54: NO). When the CPU 10 does not determine that the current mode is the ruler display mode (S54: NO), the CPU 10 displays dots at the input touch coordinates, and adds a stroke object formed by a dot sequence (S68). Next, the CPU 10 advances the process to S53.

[0045] The CPU 10 determines that it is in ruler display mode if the ruler 30 is displayed in the display area 50 (S54: YES). Next, the CPU 10 determines whether it is in shape conversion mode (S55). The shape conversion mode is a mode in which a shape 22 formed from handwritten strokes, as shown in Figure 13, is converted into a shaped shape 22B (hereinafter also referred to as shaped shape 22B) that approximates the handwritten shape 22, as shown in Figure 14. In Figure 14, a circle is drawn as the shaped shape 22B.

[0046] Initially, the shape conversion mode is set to OFF and a flag is stored in RAM 13. Therefore, the CPU 10 does not determine that the shape conversion mode is ON (S55: NO). Next, the CPU 10 determines whether the snap mode is ON (S57). As shown in Figure 15, the snap mode is a mode in which a straight line object 21 is displayed so that the edge of the stroke 20 handwritten by the tip 4A of the stylus pen 4 follows the side 34 of the ruler 30 on the stroke 20 side, as shown in Figures 16 and 17. The stroke 20 is not actually displayed, and the straight line object 21 is displayed.

[0047] Initially, the snap mode is set to OFF and a flag is stored in RAM 13. Therefore, the CPU 10 does not determine that the snap mode is ON (S57: NO). Next, the CPU 10 determines whether the input stroke was long-pressed (S58). One example of determining a long press is, for example, as shown in Figure 13, when a touch coordinate 22A of a part of the figure 22 composed of the input stroke is pressed for more than one second, and the movement of the touch coordinate 22A is 10 points or less in physical coordinates of the flat panel display 17. If the CPU 10 determines that the input stroke was long-pressed (S58: YES), it turns on the figure conversion mode and stores the flag in RAM 13 (S59).

[0048] Next, the CPU 10 converts a figure formed from handwritten input strokes into a shaped figure that approximates the handwritten input figure (S56). As an example, as shown in FIG. 14, the figure 22 formed from handwritten input strokes shown in FIG. 13 is converted into a shaped figure 22B that approximates the handwritten input figure 22 (S56). The conversion processing to the shaped figure 22B is performed, for example, by the CPU 10 selecting a figure approximating the handwritten input figure 22 from the shaped figure data such as circles, ellipses, triangles, quadrilaterals, and polygons stored in the flash memory 14 through pattern matching processing (S56). Note that in the determination of S55, when the flag for the figure conversion mode ON is stored in the RAM 13, the CPU 10 determines that the figure conversion mode is ON (S55: YES). Next, the CPU 10 converts a figure formed from handwritten input strokes into a shaped figure that approximates the handwritten input figure (S56).

[0049] Next, the CPU 10 determines whether to add an object to be snapped (S61). When a stroke of a line figure is input by handwriting, the CPU 10 determines to add the object to be snapped (S61: YES). The line figure refers to a figure in which the start end and the end end of the input stroke are not closed. Figures other than line figures are, for example, figures such as circles, triangles, and quadrilaterals in which the start end and the end end of the stroke are closed. When a stroke other than a line figure is input by handwriting, the CPU 10 does not determine to add the object to be snapped (S61: NO).

[0050] When the CPU 10 has determined to add the object to be snapped (S61: YES), the CPU 10 determines whether the snap mode is ON (S62). When the flag for the snap mode OFF is stored in the RAM 13, the CPU 10 does not determine that the snap mode is ON (S62: NO).

[0051] Next, the CPU 10 determines whether the distance between the touch coordinates of the handwritten stroke and the ruler 30 is less than or equal to a certain value (S65). As an example, the CPU 10 determines whether the distance D1 (see Figure 15) between the handwritten stroke 20 and the side 34 of the ruler 30 on the stroke 20 side is less than or equal to a certain value (S65). The ruler 30 has two sides, and side 34 is the side closer to the stroke 20. An example of a certain value is when the magnification ratio of the flat panel display 17 is less than or equal to 20 points / page display area 65 in physical coordinates. For example, if the magnification ratio of the page display area 65 is 1 / 100, an example of a certain value is 2000 points. If the CPU 10 determines that the distance between the touch coordinates of the handwritten stroke and the ruler 30 is less than or equal to a certain value (S65: YES), it turns on snap mode (S66). The CPU 10 stores the snap mode ON flag in RAM 13 (S66).

[0052] Next, the CPU 10 obtains the thickness data, which is the line width data of the object to be added (S63). The thickness (line width) of the object is set in advance, for example, when the pen button 51 is touched and the handwriting input mode is activated. The CPU 10 obtains this thickness data (S63). Next, the CPU 10 determines the coordinates where the edge of the stroke 20 touches the edge 34, based on the touch coordinates of the handwritten stroke 20, the thickness data of the object obtained in S63, and the magnification ratio of the page display area 65 (S64). Based on the determined coordinates, the CPU 10 adds and displays the object 21 at the coordinates touching the edge 34 of the ruler 30 (S64). Next, the CPU 10 proceeds to processing S53.

[0053] Furthermore, if, based on the judgment in S61, a stroke other than a line shape is entered by hand as shown in Figure 19, the CPU 10 does not decide to add an object to be snapped to (S61: NO). The CPU 10 turns off snap mode (S67). The CPU 10 stores the snap mode OFF flag in RAM 13 (S67). Next, the CPU 10 performs the process in S68. Also, if, based on the judgment in S65, the CPU 10 does not determine that the distance D1 between the touch coordinates of the handwritten stroke and the ruler 30 is less than or equal to a certain value (S65: NO), it performs the process in S68. After the process in S68, the CPU 10 proceeds to S53. If, based on the judgment in S58, the CPU 10 does not determine that a long press has occurred (S58: NO), it turns off the shape conversion mode and stores the shape conversion mode OFF flag in RAM 13 (S60). Next, the CPU 10 proceeds to S61.

[0054] Furthermore, as shown in Figures 17 and 18, the CPU 10 may display the length of the object 21 on the length display unit 35 that displays the length on the ruler 30 during processing S64. Based on the drawing data of the object 21, the CPU 10 displays the length of the portion along the ruler 30 on the length display unit 35 while the object 21 is being drawn. As an example, in Figure 17, the CPU 10 displays 1.1m on the length display unit 35, and in Figure 18, it displays 2.1m.

[0055] Furthermore, in the judgment of S61, if a stroke other than a line shape is entered by hand as shown in Figure 19, the system does not decide to add an object to be snapped to (S61: NO). Next, the CPU 10 adds an object to the touch coordinates. Accordingly, as shown in Figure 19, shapes 22, 23, and 24 are drawn as objects resulting from the actual handwritten strokes.

[0056] In the above embodiment, when the distance D1 between the touch coordinates and the ruler 30 is less than or equal to a certain value, the CPU 10 turns on snap mode and performs the processes of S63 and S64. Therefore, even if the distance D2 between the touch coordinates and the ruler 30 exceeds a certain value while drawing the object 21 shown in Figure 17, as shown in Figure 18, the object 21 is drawn along the edge 34 of the ruler 30.

[0057] <Ruler Drawing Process> The ruler drawing process will be explained with reference to Figure 20. In the display control process shown in Figure 4, the ruler 30 was drawn when the CPU 10 detected that the ruler display button 56 had been touched by the sensor 18 (S5: YES) (S7). In the ruler drawing process, the ruler 30 can be drawn in the page display area 65 without operating the ruler display button 56.

[0058] When the CPU 10 detects an instruction to start the ruler drawing process via the sensor 18, it reads the ruler drawing process program from the flash memory 14 and executes the process. When the CPU 10 starts the ruler drawing process, it displays the editing window 5 shown in Figure 2 on the flat panel display 17. At this time, nothing is displayed in the display area 50 of the editing window 5.

[0059] The CPU 10 determines whether the user has selected a page of the document to view (S71). An example of a document is a PDF document. When the sensor 18 detects a touch indicating the selection of a specific page of the document, the CPU 10 determines that the user has selected a page to view (S71: YES). Next, the CPU 10 obtains page rendering information from the flash memory 14 or the server 2 and displays the document 60 in the display area 50 as shown in Figure 2 (S72). The page rendering information is page rendering information stored in the flash memory 14 or the server 2, and can be drawings, document data, images, etc. In the example shown in Figure 2, an example of the document 60 is a floor plan of a building.

[0060] If the CPU 10 does not detect a touch from the sensor 18 indicating the selection of a specific page in the document, it does not determine that the user has selected a page to view (S71: NO). Therefore, the CPU 10 continues to make the determination in S71.

[0061] Following the processing in S72, the CPU 10 determines whether the page display area 65 has been touched (S73). If the sensor 18 detects a touch on the page display area 65, the CPU 10 determines that the page display area 65 has been touched (S73: YES). If the sensor 18 does not detect touch coordinates on the page display area 65 (S73: NO), the CPU 10 continues the determination in S73.

[0062] If the CPU 10 determines that the page display area 65 has been touched (S73: YES), it determines whether one or two fingers touched the area (S74).

[0063] The CPU 10 determines that only one finger is used for the touch operation if the touch coordinates detected by the sensor 18 are within the page display area 65 (S74: 1 finger). Next, the CPU 10 performs a movement operation to move the page display origin of the page display area 65 in accordance with the movement of the touch coordinates (S77). Then, the CPU 10 proceeds to S73.

[0064] If the CPU 10 determines in S74 that there are two touch coordinates, a first touch coordinate and a second touch coordinate, then it determines that two fingers are touching the screen (S74: 2 fingers). If the CPU 10 determines that two fingers are touching the screen (S74: 2 fingers), it determines whether the page display area 65 is being touched for a certain period of time or longer (S75). An example of a certain period of time is 1 second. If the CPU 10 does not determine that the page display area 65 is being touched for a certain period of time or longer (S75: NO), it proceeds to S77. If the CPU 10 determines that the page display area 65 is being touched for a certain period of time or longer (S75: YES), it determines whether the movement amount of the two touch coordinates is greater than or equal to a certain amount (S76). An example of a certain amount is 10 points in the physical coordinates of the flat panel display 17.

[0065] If the CPU 10 determines that the amount of movement of the two touch coordinates is greater than or equal to a certain amount (S76: YES), it proceeds to S77. If the CPU 10 does not determine that the amount of movement of the two touch coordinates is greater than or equal to a certain amount (S76: NO), it determines whether the area of ​​the touch coordinates is greater than or equal to a certain area (S78). An example of a certain area is 10 mm² in physical coordinates of the flat panel display 17. If the CPU 10 does not determine that the area of ​​the two touch coordinates is greater than or equal to a certain area (S78: NO), it proceeds to S77. If the CPU 10 determines that the area of ​​the two touch coordinates is greater than or equal to a certain area (S78: YES), it displays the ruler 30 in the display area 50 (S79). After that, the CPU 10 proceeds to S73.

[0066] In the above embodiment, the ruler 30 can be displayed in the display area 50 by long-pressing the first touch coordinates and the second touch coordinates, without operating the ruler display button 56.

[0067] <Changing the scale> The changing of the scale of the ruler 30 will be explained with reference to Figure 19. In the display control process, the CPU 10 determines the interval of the scale of the ruler 30 based on the resolution of the flat panel display 17, the scale of the page display area 65, and the page magnification ratio of the page display area 65 (S6). Therefore, as shown in Figure 19, the CPU 10 changes the scale and scale of the ruler 30 and draws. When the page display area 65 is reduced, the document 60 displayed in the page display area 65 is also reduced. Therefore, the width of the scale displayed on the ruler 30 becomes narrower, and the values ​​of the scale numbers become larger.

[0068] The CPU 10 determines the coordinates where the edge of the stroke 20 touches the edge 34 based on the touch coordinates of the handwritten stroke 20, the object thickness data obtained in S63, and the magnification of the page display area 65 (S64). Based on the determined coordinates, the CPU 10 adds and displays the object 21 at the coordinates touching the edge 34 of the ruler 30 (S64). Therefore, regardless of the magnification of the page display area 65 displayed on the touchscreen display 16 or the width of the stroke 20 line, the edge of the stroke 20 line can be made to follow the edge 34 of the ruler 30.

[0069] In the handwriting stroke drawing process, the CPU 10 draws the handwritten input along the ruler 30 (S64) if the distance D1 between the input coordinates and the position of the ruler 30 is less than or equal to a certain value (S65: YES). The distance D1 is determined based on the physical coordinates on the touchscreen display 16. Therefore, regardless of the magnification of the page display area 65 displayed on the touchscreen display 16 or the width of the stroke 20 line, the stroke can be made to follow the ruler 30 at a constant physical distance.

[0070] In the handwriting stroke drawing process, the CPU 10 continues to draw the stroke along the ruler 30 until the stroke is finished, even if the distance D2 becomes greater than a certain value while the stroke is being drawn with the stroke aligned with the ruler 30. Therefore, even if the handwriting input position moves away from the ruler 30 while the stroke is aligned with the ruler 30, the stroke will remain aligned with the ruler 30 until the stroke is finished. Consequently, the operability of inputting strokes along the ruler 30 can be improved.

[0071] The CPU 10 determines a constant value for S65 based on the stroke line width and the magnification ratio of the page display area 65. Therefore, the position in which the stroke follows the ruler 30 can be appropriately determined according to the stroke line width and the magnification ratio of the page display area 65.

[0072] During stroke drawing (S64), the CPU 10 displays the length of the portion along the ruler 30 on the length display unit 35. Therefore, the actual length of the stroke can be easily recognized.

[0073] When handwriting input is made to the touchscreen display 16, the CPU 10 draws the entered shape along the ruler 30 if the entered shape is linear (a line shape). The CPU 10 does not draw the entered shape along the ruler 30 if the entered shape is a closed shape. Therefore, shapes that do not need to be aligned with the ruler 30, such as closed shapes, are not drawn along the ruler 30, thus preventing unnecessary drawing of shapes along the ruler 30.

[0074] The CPU 10 recognizes a shape based on an input stroke, and when it receives an instruction for a shape conversion process to draw a shaped figure that approximates the shape, if the shaped figure is linear, it draws the shaped figure along the ruler 30. The CPU 10 does not draw the shaped figure along the ruler 30 if the input shaped figure is a closed shape. Therefore, the CPU 10 does not draw shapes that do not need to be aligned with the ruler 30, such as closed shapes, so that shapes are not unnecessarily aligned with the ruler 30.

[0075] In the information processing device 1, handwritten strokes can be easily converted into shaped figures simply by pressing and holding the display area 50 of the touchscreen display 16 for a certain period of time or longer while drawing the stroke.

[0076] When the CPU 10 draws a stroke along the ruler 30, it ignores the input of instructions for shape conversion processing. Therefore, when the stroke is drawn along the ruler 30, there is no need to convert it to a shape, and thus the stroke is not unnecessarily converted to a shape.

[0077] The instruction to display the ruler 30 is to press the ruler display button 56. Therefore, the ruler 30 can be displayed on the display area 50 of the touchscreen display 16 by the simple operation of pressing the ruler display button 56.

[0078] The instruction to display the ruler 30 is to press and hold for a predetermined time or longer on the first and second touch coordinates on the display area 50 of the touchscreen display 16. Therefore, the ruler 30 can be displayed on the display area 50 of the touchscreen display 16 by pressing and holding at two locations on the touchscreen display 16. Thus, the ruler 30 can be displayed on the touchscreen display 16 without performing any other operations.

[0079] In the above description, the touchscreen display 16 is an example of the "touch panel" of the present invention. The CPU 10 is an example of the "computer" of the present invention. The process in S7 is an example of the "ruler display process" of the present invention. The process in S21 is an example of the "movement process" of the present invention. The process in S64 is an example of the "coordinate determination process" of the present invention. The magnification ratio of the page display area 65 is an example of the "screen display magnification ratio" of the present invention. In the process in S64, the process of displaying the stroke length in the length display unit 35 is an example of the "length display process" of the present invention.

[0080] Furthermore, the present invention can be modified in various ways in addition to the above modifications. The ruler 30 may be displayed when the display area 50 of the touchscreen display 16 is pressed with a predetermined or greater pressure. As an example of highlighting, the color scheme of the ruler 30 may be changed to a conspicuous color such as red or yellow. The highlighting may also be changed to a lighter color than the color scheme of the touch area where the user's finger touches. The brightness of the highlighting may be changed. The highlighting may be made to blink. The warning display 33 may blink. An audio warning may be given in conjunction with the warning display 33.

[0081] The specific value is not limited to 15-degree increments of rotation angle and may be predetermined. The specific value may be, for example, 10-degree or 30-degree increments. The threshold is not limited to ±3 degrees. The threshold may be set according to the magnification ratio of the page display area 65 displayed in the display area 50 of the flat panel display 17. The threshold may be ±1 degree, ±2 degrees, ±5 degrees, etc., depending on the magnification ratio of the page display area 65. Also, the positive and negative values ​​of the threshold do not have to be the same. Stroke input is not limited to the use of the stylus pen 4 and may be performed using a fingertip or a wirelessly connected mouse, etc. The editing window 5 may be displayed as a partial window rather than the entire touchscreen display 16. Also, instead of the CPU 10, a microcomputer, ASIC (Application Specific Integrated Circuits), FPGA (Field Programmable Gate Array), etc., may be used as the processor.

[0082] 1 Information processing device 4 Stylus pen 5 Editing window 10 CPU 14 Flash memory 16 Touchscreen display 22-24 Shapes 22B Shaped shapes 30 Ruler 30A Area 30B Area 31 Scale 32 Display area 33 Warning display 34 Side 50 Display area 60 Document 65 Page display area

Claims

1. A display control program executed by a computer controlling an information processing device equipped with a touch panel and capable of acquiring multiple touch coordinates which are the coordinates of a location touched on the touch panel, characterized in that the computer is made to execute the following: a ruler display process which displays a ruler on the touch panel based on an instruction to display a ruler; a movement process which acquires a first touch coordinate and a second touch coordinate which are the coordinates of a location touched on the ruler displayed on the touch panel, and moves or rotates the ruler in accordance with the movement of the first touch coordinate and the second touch coordinate; a drawing process which, when handwriting input is made to the touch panel, if the distance between the input coordinate and the position of the ruler is less than or equal to a certain value, draws the handwriting input along the ruler; and a coordinate determination process which, in the drawing process, determines the coordinates of a stroke based on the line width of the input stroke and the display magnification of the screen displayed on the touch panel, such that the edge of the stroke and the side of the two sides of the ruler that extends in the direction in which the stroke extends that is closer to the stroke coincide.

2. The display control program according to claim 1, characterized in that the distance in the drawing process is determined based on the physical coordinates on the touch panel.

3. The display control program according to claim 1 or 2, characterized in that, in the drawing process, even if the distance becomes greater than the constant value while the stroke is being drawn with the stroke aligned with the ruler, the stroke is drawn along the ruler until the drawing of the stroke is completed.

4. The display control program according to claim 1, characterized in that the constant value is determined based on the line width of the stroke and the display magnification ratio.

5. The display control program according to claim 1, characterized in that, in the drawing process, the computer is instructed to perform a length display process that displays the length of the portion along the ruler while the stroke is being drawn.

6. The display control program according to claim 1, characterized in that, in the drawing process, when handwriting input is made to the touch panel, if the input figure is linear, the figure is drawn along the ruler, and if the input figure is a closed figure, the figure is not drawn along the ruler.

7. The display control program according to claim 1, characterized in that, in the drawing process, when an instruction for a shape conversion process is input to recognize a shape based on the input stroke and to draw a shaped shape that approximates the shape, if the shaped shape is linear, the shaped shape is drawn along the ruler, and if the input shaped shape is a closed shape, the shaped shape is not drawn along the ruler.

8. The display control program according to claim 7, characterized in that the input of the instruction for the graphic transformation process is the detection of a long press on the touch panel for a certain period of time or longer at the input position of the stroke during the drawing of the stroke.

9. The display control program according to claim 7 or 8, characterized in that, in the drawing process, when the stroke is drawn along the ruler, the input of the instruction for the graphic transformation process is ignored.

10. The display control program according to claim 1, characterized in that the instruction to display the ruler is the pressing of the ruler display button.

11. The display control program according to claim 1, characterized in that the instruction to display the ruler is to press and hold the first touch coordinates and the second touch coordinates on the touch panel for a certain period of time or longer.