Ask Your Question

How to align shapes in the Draw app?

asked 2021-02-08 07:55:32 +0200

Frants gravatar image

There are two rectangles on the Draw sheet. Coordinates of the first (2.0; 2.0), the second (5.0; 6.0). The first one needs to be aligned with the second rectangle. Variant #1. I select the first rectangle (click), then the second (Shift + click) and the command Shape -> Aligning Objects -> Left. Result: alignment is done to the first rectangle (2.0; 2.0). Variant #2. I select the second rectangle (click), then the first one (Shift + click) and the command Shape -> Aligning Objects -> Left. Result: again alignment is done according to the first rectangle (2.0; 2.0). How do I get the desired result? Version: (x64) / LibreOffice Community Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: threaded

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2021-02-08 12:54:20 +0200

Lupp gravatar image

updated 2021-02-08 12:56:35 +0200

From my experience:

-1- The alignments Left, Right, Top, Bottom always are done "to the extreme" regarding the common area of the selection (what would be the area of the group, grouping assumed).
-2- Alignment by first (left/right) or second (top bottom) Center is related to the respective middle of the pseudo-group-area.
-3- There are shapes (sectors!) for which the visible area is different from the overall-area. The overall area is relevant then when aligning though user may expect otherwise.

If you don't get what you want this way, some handicraft may be required.

edit flag offensive delete link more


Thanks for the help! The behavior of the Aligning Objects function described by you differs from the usual (for me) in the products of other developers. For example, this is the first time I've seen this. Perhaps there is some convenience hidden in this behavior, which I do not yet understand. But, along with the functionality that you described, I would like to have the usual (such, for example, as in Microsoft products). At least for simple shapes. Is it possible to add such functionality? Otherwise, .... I don't know what to do. I need a convenient editor, and Draw editor suits me very well. Best regards!

Frants gravatar imageFrants ( 2021-02-08 14:09:13 +0200 )edit

I don't know those other products you're talking of. To a very small amount I'm using the annotation tools of Foxit Reader. The annotations created there behave like TextBox shapes in Draw concerning the left/right/top/bottom alignment options. "Center" isn't offered. Two additional options (horizontal/vertical) align with respect to the last selected annotation.
Enhancement requests go to
If you are fond of programming user tools, this may be a task of limited complexity. However: Multiselections of shapes are sequences without a specified order as treated by the API. In specific the shapes are not sorted regarding the order they were selected in (by clicking).

Lupp gravatar imageLupp ( 2021-02-08 15:01:43 +0200 )edit

1) I apologize to everyone. I was delusional about the behavior of this feature, including in Microsoft applications. 2) For a long time I had to work in an application in which the alignment behavior is based on the principle of "align the selected shapes to the last" (and not relative to the common area). Perhaps this led to a collision in my memory :). Aligning to the borders of the last shape is very convenient. After all, the purpose of alignment (mainly) is to change the position of the figures relative to each other, and not the general pseudo group. 3) It is worth noting that for the Equal width / height command, the order affects the result. Why not do the same for alignment.

Best regards!

Frants gravatar imageFrants ( 2021-02-10 09:05:52 +0200 )edit

Quoting @Frants: "Why not do the same for alignment."
I neither know the why nor if/when/by_whom the topic was discussed and decided.
Enhancement requests go to
If the functionality is essential to your workflow: It isn't really difficult to program a customized adjustment procedure for a group of selected shapes.
The one rather ticklish thing I already mentioned: There isn't specified an order concerning the elements of a multiselection. You will therefore need to either align regarding the previous position (along with the bottom selected object e.g.) or to select the group and the preferred object in two steps.

Lupp gravatar imageLupp ( 2021-02-10 15:35:11 +0200 )edit

Thanks you! This topic ... is probably too small to discuss. There is a function, and great. Programming? I like this idea. There is one difficulty. How do you learn to do this (where to start)? Best regards!

Frants gravatar imageFrants ( 2021-02-11 13:30:15 +0200 )edit

Oh my... It depends. And: I'm not a developer. There are riches in the API (and of course in the core code) I have no idea of - and shortcomings I have an idea of. "Just for fun" I'm sometimes addressing a task by means of custom code. A life without any programming may come out a bit dry after all. It's like with motorbiking.
If much interested in personalized advice you may call me. Flip 212145477194 and prefix the plus for the purpose. (Unfortunatly I don't speak any foreign language but English, and my teachers [1950es] would laugh out loudly regarding this claim.)
There are the famous texts by Andrew Pitonyak, of course. You find them here: Regard the table on that page.

Lupp gravatar imageLupp ( 2021-02-11 14:00:13 +0200 )edit

You are very kind, thanks for your assistance! Perhaps I will not abuse your time and patience here, I will read something publicly available on the topic of programming in LibO. I think the topic is closed. Best regards!

Frants gravatar imageFrants ( 2021-02-11 14:32:47 +0200 )edit

answered 2021-02-08 13:40:39 +0200

LeroyG gravatar image

If only one object is selected, the edge/center of the object is aligned to the page margin/center (

If more than one object is selected, they are aligned with respect to the selection edges/center.

Answering your question:

  • Select the object/s to be aligned
  • Move it/them to the right while holding Shift, passing the left margin of the reference object
  • Add the reference object to the selection
  • Align left

Tested with LibreOffice (x86); OS: Windows 6.1.

Add Answer is reserved for solutions. If you think the answer is not satisfactory, add a comment below, or click edit (below your question) to add more information. Thanks.

Check the mark (Answer markCorrect answer mark) to the left of the answer that solves your question.

If the answer helped you, you can mark the up arrow (Upvote mark) that is on the left (to vote, you need to have karma of at least 5).

edit flag offensive delete link more


It works. But still, I want it without unnecessary movements. Thanks! Best regards!

Frants gravatar imageFrants ( 2021-02-10 09:00:16 +0200 )edit

answered 2021-02-08 10:59:12 +0200

Earnest Al gravatar image

It is a little arbitrary how objects are aligned, in my test the smaller object was moved to align with the larger regardless of which was created first. There are two possible answers:

  1. Turn on Snap to objects, turn on Helplines. Using the mouse move the desired object using the helplines to align it with the other object (it should snap when it is close to the edges) and the ghost of the object that you are moving

image description

  1. Right-click the object that you want to remain stationary, click Position and Size > Position and Size > Protect > Position then align objects. The other object(s) will align to the protected one.

image description

Cheers, Al

edit flag offensive delete link more


Thanks for the help! These actions are good as an alternative. But I was hoping to use the Shape -> Aligning Objects command. I was hoping to quickly align the shapes using this command. Is this feature not working? Or am I misunderstanding this function? Best regards!

Frants gravatar imageFrants ( 2021-02-08 11:33:52 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-02-08 07:55:32 +0200

Seen: 37 times

Last updated: Feb 08