The entire disclosures of Japanese Patent Application No. 2006-325885 filed on Dec. 1, 2006 is expressly incorporated by reference herein.
1. Technical Field
The present invention relates to a technique for editing a document or supporting the editing.
2. Related Art
Technology to edit or generate a document using a computer device to layout an object (or digital content) in an area is known. A so-called “grid line” is used as a guide line to layout an object (see JP-A-8-194832, JP-T-2003-523014, JP-A-2006-189989, JP-A-64-017156, and JP-A-3-269678, for example).
JP-A-8-194832 discloses a technique for changing a size of a grid line in a specific area. JP-T-2003-523014 discloses a technique for changing the configuration of a grid line in response to inputted parameters such as number of characters, type of font, font size, and number of multiple columns in a system displaying characters in a composition. JP-A-2006-189989 discloses a technique for smoothly moving an object by selecting a grid line to which the object adheres in response to a direction of the move when a user drags the object by operating a mouse. JP-A-64-017156 and JP-A-3-269678 disclose a system for selecting a grid line from among plural grid lines and a system for setting a desired grid line.
According to the references, a grid line having a well-balanced position, in other words, a beautiful layout cannot be generated. For example, according to JP-A-8-194832, although the size of a grid line is changeable, a user cannot know what size of a grid line is well-balanced. According to JP-T-2003-523014, to obtain a well-balanced grid line, a user must have knowledge and experience of inputting appropriate parameters. According to JP-A-2006-189989, an object can move smoothly, but cannot be moved to a well-balanced position automatically. According to JP-A-64-017156 and JP-A-3-269678, it is difficult for a user to select a well-balanced grid line.
The invention enables generation of a well-balanced grid line independently from a user's knowledge and experience.
According to an aspect of the invention, there is provided a document edit support device, including: an obtaining unit configured to obtain an object, the object being data showing at least one of a text and an image included in a document to be edited; an important area determining unit configured to determine an important area, the important area being a part of an area of the document; a grid line generating unit configured to generate a grid line, the grid line having a specific positional relationship with the important area determined by the important area determining unit, the grid line dividing two parallel standard lines at approximately golden ratio, each of the two standard lines being determined on the basis of at least one of a figure and a position of the object and a layout area, the layout area being an area in which an object is located in the document; and a display unit configured to display the grid line generated by the grid line generating unit.
According to the a document edit support device, a grid line is generated on the basis of the golden ratio.
It is preferable that the document may include a plurality of objects, and the display unit may be configured to display the grid line if at least a part of the grid line overlaps with an object that is outside the important area.
It is preferable that the document may include a plurality of objects, and the display unit may be configured to display the grid line if at least a part of the grid line overlaps an n % magnified object (n is a real number that satisfies n>0).
It is preferable that the document may include a plurality of objects, each object may have attribute information showing an attribute of the object, and the important area determining unit may be configured to determine the important area on the basis of the attribute information, the important area including at least one of the plurality of objects.
It is preferable that the grid line generating unit may be configured to generate the grid line around the important area.
According to another aspect of the invention, there is provided a document edit device, including: the above document edit support device, the document including a plurality of objects; and an editing unit configured to edit a position of an object of the document so as to be tangent to the nearest grid line.
According to yet another aspect of the invention, there is provided a document edit device, including: the document edit support device according to any one of claims 1-5, the document including a plurality of objects; and an editing unit configured to edit a position of an object of the document in accordance with an instruction inputted by a user.
According to yet another aspect of the invention, there is provided a program causing a computer device having display unit to execute a process, the process including: obtaining an object, the object being data showing at least one of a text and an image included in a document to be edited; determining an important area, the important area being a part of an area of the document; generating a grid line, the grid line having a specific positional relationship with the important area determined by the important area determining unit, the grid line dividing two parallel standard lines at approximately golden ratio, each of the two standard lines being determined on the basis of at least one of a figure and a position of the object and a layout area, the layout area being an area in which an object is located in the document; and displaying on the display unit the grid line.
According to yet another aspect of the invention, there is provided a computer-readable storage medium storing a program causing a computer device having display unit to execute a process, the process including: obtaining an object, the object being data showing at least one of a text and an image included in a document to be edited; determining an important area, the important area being a part of an area of the document; generating a grid line, the grid line having a specific positional relationship with the important area determined by the important area determining unit, the grid line dividing two parallel standard lines at approximately golden ratio, each of the two standard lines being determined on the basis of at least one of a figure and a position of the object and a layout area, the layout area being an area in which an object is located in the document; and displaying on the display unit the grid line.
The invention will be described with reference to the accompanying drawings, wherein like numbers refer to like units:
1-1. Configuration
An object obtaining unit 101 obtains an object (a digital content). The object obtaining unit 101 may obtain an object from a storage unit (not shown in the figures) or a device other than the document edit device 100. An important area determining unit 102 determines an important area. A term “important area” refers to a part of a document. The important area determining unit 102 may determine an important area in response to an instruction by a user. Alternatively, the important area determining unit 102 may automatically determine the important area in accordance with a predetermined algorithm.
A grid line generating unit 103 calculates a parameter for identifying a grid line, in other words, generates a grid line. A grid line is a line that divides a distance between two standard lines by a golden ratio. Here, the golden ratio is expressed by the equation (1) shown below. In equation (1), the right term and the left term may be exchanged with each other. A standard line is defined on the basis of at least one of a figure or a position of the object or figures of the layout area. Also, the grid line generating unit 103 generates a grid line having a specific positional relationship with the important area.
A display unit 104 displays a document and a grid line. A changing unit 105 changes a position of an object in a document. The change of the position may be carried out in response to an instruction by a user. Alternatively, the change of the position may be carried out automatically in accordance with a predetermined algorithm. The document edit device 100 outputs a document edited as described above.
1-2. Operation
In step S100, the CPU 110 determines an important area in response to an instruction by a user. The user operates the keyboard/mouse 160 and identifies as the important area an object included in the document.
In step S110, the CPU 110 generates a grid line that devices a blank area at the golden ratio. Here, a term “blank area” refers to an area around the important area.
In step S112, the CPU 110 generates a grid line which divides the blank area at the golden ratio. The up blank area is an area defined by corners P1 and P2 of the page of document D1, and intersections P3 and P4 that are intersections of a line and left and right sides of the page, the line being parallel to an upper side of the page and being in contact with (tangent to) the upper edge of the important area (refer to
In step S113, the CPU 110 determines whether the grid line generating process is completed for all directions to which it is determined to generate a grid line. If it is determined that there is a direction to which the grid line generating process is not completed (S113:NO), the CPU 110 repeats the process in steps S111-S113. If it is determined that the grid line generating process is completed for all directions to which it is determined to generate a grid line (S113: YES), the CPU 110 terminates the operation shown in
Referring to
In step S130, the CPU 120 displays on the display 170 the generated grid lines.
When displaying grid lines, only a part of the grid lines that satisfies a predetermined condition may be displayed. For example, the CPU 110 may display on the display 170 only grid lines that overlap onto an object located outside the important area. Alternatively, the CPU 110 may display on the display 170 only grid lines that overlap onto an area that is obtained by n % magnifying an object located outside the important area.
A user may determine a position of an object on the basis of the displayed grid lines. For example, a user may determine a position of an object so that the object comes into contact with at least one grid line. A user may input via the keyboard/mouse 160 the position of the object.
As described above, the present embodiment provides a grid line generated on the basis of the golden ratio and determining a position of an object by using the grid line. In other words, a user can determine a well-balanced, beautiful layout of the object.
Next, a second embodiment of the invention will be described. In the following description, elements common with the first embodiment will be omitted. Also, common reference numerals will be used for elements common with the first embodiment. In the second embodiment, an object automatically adheres to a grid line. Here, the term “adhere” refers to a process of generating a relationship between an object and a grid line and specifying a relative positional relationship between the object and the grid line.
In step S202, the CPU 110 stores a distance to the nearest grid line in the target direction. Details are as follows. The CPU 110 searches a grid line starting from the object toward the target direction, and calculates a distance to the nearest grid line in the target direction. Then, the CPU 110 stores in the RAM 130 the calculated distance and an identifier of the target direction.
In step S203, the CPU 110 determines whether a process for searching a grid line is completed for every direction to be searched. If it is determined that there is a direction for which the search process is not completed (S203: NO), the CPU 110 updates the target direction and repeats the processes in steps S201-S203.
If it is determined that the search process is completed for every direction to be searched (S203: YES), the CPU 110 causes the target object to adhere to the nearest grid line (step S204). It is to be noted that the CPU 110 may not cause the target object to adhere to the nearest grid line if a predetermined condition is satisfied. The condition may be, for example, that a distance from the target object to the grid line must be greater than a threshold, for example, height or width of the target object.
As described above, the present embodiment provides a grid line generated on the basis of the golden ratio and determining a position of an object by using the grid line. In other words, a user can determine a well-balanced, beautiful layout of the object.
Next, a third embodiment of the invention will be described. In the following description, elements common with the first and the second embodiments will be omitted. Also, common reference numerals will be used for elements common with the first and the second embodiments. In the third embodiment, the important area is automatically specified by the document edit device 100.
The invention is not limited to the above embodiments and may be practiced in various modifications.
In the above embodiments, the figure of an object is a quadrangle. However, the figure of an object is not restricted to a quadrangle. The figure of an object may be any kind of a figure as long as it is a specific figure, for example, an ellipse, n-gon (n≧3), or a combination thereof. A standard line may be a side of a figure of an object, or a side of a circumscribed n-gon of an object. The circumscribed n-gon may be any kind of a figure, for example, a triangle or a quadrangle.
In the above embodiment, the standard lines are defined by the layout area (page) or an object. However, the standard line is not restricted to these lines. For example, a previously presented grid line may be used as a standard line for generating a new grid line. Also, in the above embodiment, two sets of sides of the blank area are used as standard lines for generating a grid line, but a single set of sides may be used as standard lines. Furthermore, in the above embodiment, two grid lines are generated by one set of standard lines, but a single grid line may be generated by one set of standard lines.
In the above embodiment, a single device has the functional elements shown in
Two reference lines used for generating grid lines need not always be parallel to each other. Even if reference lines are not mutually parallel, the CPU 110 may generate grid lines which split the interval between the two reference lines, at the golden ratio.
In addition, the program for causing a computer device to execute the above process may be provided by a computer-readable storage medium such as a CD-ROM (Compact Disk Read Only Memory).
Number | Date | Country | Kind |
---|---|---|---|
2006-325885 | Dec 2006 | JP | national |