Auto-layout of shapes
Abstract
Various technologies and techniques are disclosed that automatically layout components/shapes on a design surface. The system receives input from a user to add components to the design surface. At an appropriate time, the system initiates an auto-layout process. The auto-layout process maps each shape in a particular set to a two-dimensional grid and uses the two-dimensional grid to assign an X and Y value to each shape. For any shape having a new X and Y value, the position of the shape is adjusted on the design surface. The system provides a visual indicator on the design surface to indicate that component positions are being adjusted. The system provides an undo feature to allow the user to undo the auto-layout process when desired.
Claims
exact text as granted — not AI-modified1 . A method for automatically laying out components comprising the steps of:
receiving input from a user to add a new component to a design surface, the design surface having a plurality of components that includes the new component; programmatically analyzing at least a portion of the plurality of components according to a set of layout optimization rules, the layout optimization rules comprising:
assigning each of the at least the portion of components to a two-dimensional grid; and
using the two-dimensional grid to compute an X and Y position for each of the at least the portion of components;
analyzing the two-dimensional grid to determine if any of the components have a new X and Y position; and adjusting a position for each component having the new X and Y position.
2 . The method of claim 1 , wherein a visual indicator is provided during the adjusting step so the user can see what changed.
3 . The method of claim 1 , wherein the visual indicator is an animation.
4 . The method of claim 1 , further comprising:
providing an undo feature to allow the user to undo the position adjustment.
5 . The method of claim 1 , wherein the analyzing step is initiated each time the user adds another component to the design surface.
6 . The method of claim 1 , wherein the analyzing step is initiated when the user selects an option to initiate an auto-layout process against an existing document.
7 . A computer-readable medium having computer-executable instructions for causing a computer to perform the steps recited in claim 1 .
8 . A computer-readable medium having computer-executable instructions for causing a computer to perform steps comprising:
receive input from a user to add a new component to a design surface, the design surface having a plurality of components that includes the new component; and upon receiving input from the user to add the new component, initiate an auto-layout process that analyzes at least a portion of the plurality of components according to a set of layout optimization rules and automatically adjusts a position for at least one of the components on the design surface.
9 . The computer-readable medium of claim 8 , wherein the analyzing at least a portion of the components according to the set of layout optimization rules comprises:
assigning each of the at least the portion of components to a two-dimensional grid; and using the two-dimensional grid to compute an X and Y position for each of the at least the portion of components.
10 . The computer-readable medium of claim 8 , further causing a computer to perform steps comprising comprising:
when adjusting the position for the at least one component, provide a visual indicator to allow a user to see what changed on the design surface.
11 . The computer-readable medium of claim 10 , wherein the visual indicator provided is an animation.
12 . The computer-readable medium of claim 8 , further causing a computer to perform steps comprising:
provide an undo feature to allow the user to undo the position adjustment of the at least one component.
13 . A method for automatically laying out shapes comprising the steps of:
initiating an auto-layout process to programmatically adjust a position of at least one shape on a design surface, the auto-layout process comprising the steps of:
assigning each shape to a particular cell in a two-dimensional grid;
traversing the two-dimensional grid one shape at a time and computing an X and Y coordinate for each shape; and
adjusting a position on the design surface for the at least one shape that has an X and Y coordinate that is different from a prior X and Y coordinate assigned to the at least one shape.
14 . The method of claim 13 , wherein the analyzing step is initiated each time the user adds another component to the design surface.
15 . The method of claim 13 , wherein the analyzing step is initiated when the user selects an option to initiate an auto-layout process against an existing document.
16 . The method of claim 13 , wherein a visual indicator is provided to allow a user to see that the position of the at least one shape was adjusted on the design surface.
17 . The method of claim 16 , wherein the visual indicator is an animation.
18 . The method of claim 13 , wherein an undo feature is provided to allow the user to undo the position adjustment.
19 . The method of claim 13 , wherein the Y position for each shape is calculated at least in part upon summing a shape height value with a shape offset accumulation value.
20 . A computer-readable medium having computer-executable instructions for causing a computer to perform the steps recited in claim 13.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.