Figma Support Forum

Lines not centered on origin?

I’ve noticed that, when drawing lines, the stroke of the line sits on one side of the line, rather than being centered on it. So, if you try to center a line with anything else, it will essentially appear off-center by half of your line width. I’m attaching a screenshot that explains this pretty simply. Does anyone know how to either center line strokes on their origin, or otherwise get around this?

The the following image, I have used the align tool to center the line (stroke weight of 6) inside the box. But it clearly isn’t centered (vertically).

You can try to draw lines using pen tool instead of the line tool.

1 Like

Good idea, thanks!

I think this is a bug with the line tool. It was discussed with Figma representatives back in 2018, but the problem still exists.

I just came across this limitation myself when trying to align a line with the corner of a rectangle:

image

Using the pen tool is fine as a workaround but it renders the line tool quite limited.

Line tool is used when you need pixel-perfect lines. Such a line will never be sub-pixel unlike the centered one created using the pen tool or by flattening the Line when the stroke thickness is an uneven number.