View Issue Details

IDProjectCategoryView StatusLast Update
0017742ScribusGeneralpublic2026-02-08 15:00
Reporterdeepaksinghola Assigned Tojghali  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
PlatformmacOSOSmacOS TahoeOS Version26.1
Product Version1.6.5 
Summary0017742: Snap to guides produces incorrect object width when stroke color is set
DescriptionWhen "Snap to Guides" is enabled, resizing a shape (e.g. a rectangle) to guide positions results in an incorrect object width if the object has a stroke color assigned.

For example, with page margins set to 180 mm, resizing a rectangle by snapping its edges to the margin guides results in a width of approximately 179.647 mm or 179.721 mm instead of exactly 180 mm, even when the line width is 0 (Hairline).

If the stroke color is explicitly set to "None", snapping behaves correctly and the resulting width is exactly 180 mm. No fill is required for correct behavior.

This suggests that snapping calculations take stroke presence into account even when stroke width is zero.
Steps To Reproduce1. Create a new document.
2. Set page margins so that the margin width is exactly 180 mm.
3. Enable "Snap to Guides".
4. Draw a rectangle.
5. Assign any stroke color to the rectangle (stroke width 0, fill irrelevant).
6. Resize the rectangle by snapping its left and right edges to the margin guides.
7. Check the resulting width of the rectangle.
8. Set the stroke color to "None".
9. Repeat the resize operation.
Additional InformationExpected Result: The rectangle width should be exactly 180 mm when snapped to the guides with line width 0 (Hairline) even when stroke color is assigned.

Actual Result: With a stroke color assigned, the resulting width is approximately 179.647 mm or 179.721 mm.
When stroke color is set to None, the width is exactly 180 mm.
Tagsshape snapping, snap to guide, snapping
Attached Files
scribus-snap-issue.gif (2,049,075 bytes)
PatchNo

Relationships

related to 0001462 acknowledged Lines (borders) on frames are drawn from the center of the edge to the outside 

Activities

jghali

2026-02-07 15:44

administrator   ~0053452

Last edited: 2026-02-07 15:46

Not a bug. In PDF or PostScript, a hairline width is not 0, but the smallest width the rendering device can reproduce. So a hairline width is essentially device dependent. For screen rendering we have arbitrarily chosen this width to be exactly 1 point, so (25.4 / 72) mm = 0.353 mm. And 179.647 + 0.353 = 180 mm. The only proper way to get a 0 mm line width in PostScript and PDF is indeed to set stroke color to "None", setting the line width to 0 does not guarantee to get an invisible line in output as 0 is a special value which means hairline.

deepaksinghola

2026-02-07 15:49

reporter   ~0053453

Thanks for the clarification. Really appreciate your help!

ale

2026-02-07 16:59

manager   ~0053454

This can be related to 0001462

deepaksinghola

2026-02-07 17:13

reporter   ~0053456

When i zoomed in, I can see a gap between the guide and the shape. This means the hairline width is not the problem, it is actually not snapping correctly.

deepaksinghola

2026-02-07 17:23

reporter   ~0053457

I think it is not related to 0001462. As lines on frames are drawn from the center and the center line is suppose to be snapped with the grid. But in this case, there is clearly a gap, we can try to snap by zooming in but with zoom also it is not precise. It could be a bug. Please cross check.

qirat

2026-02-07 17:24

reporter   ~0053458

Hi @deepak. Could you check if "Snap to Grid" is also active? Bcz it might be snaoping to a grid-line surrounding the guidline.

jghali

2026-02-07 17:49

administrator   ~0053459

>> As lines on frames are drawn from the center and the center line is suppose to be snapped with the grid

No, that's not correct, the snapping happens on the exterior of the line stroke. Try with a line width of 3mm.

deepaksinghola

2026-02-07 18:07

reporter   ~0053460

@qirat No, Snap to grid is not active. @jghali thank you for correcting me, yes snapping happens on the exterior. Surprisingly when I assigned 5mm line width and then tried to snap the shape, it is snapping perfectly, the rectangle width is exactly 175 mm, which is expected. And then I set the stroke color to none, line width still 5mm, it is snapping to the center line and i am getting 180 mm width. But in the case of hairline width with color assigned, a clear gap can be seen when we zoom in. As you said the hairline width is not exactly zero and that is why this is happening, which is convincing. But we should be able to see that width right, so that we know what is happening.

jghali

2026-02-07 19:14

administrator   ~0053461

>> But in the case of hairline width with color assigned, a clear gap can be seen when we zoom in.

As I already wrote, a hairline width is always != 0 with a device specific behavior (and zoom dependent behavior also in case of a screen). So the line width will be different depending on whether you output to a screen or a printer and will vary also depending on the printer. As the line width is device dependent, what we draw on screen can only be an approximation. As I already wrote the only correct way to have an invisible line when outputting to PostScript or PDF is to set Color to None. That's not an option, that's the specs. If you choose to use hairlines, you cannot have "the width right" as you explicitly chose to use device dependent behavior.

deepaksinghola

2026-02-07 19:21

reporter   ~0053462

Thanks for your patience and the detailed explanation, @jghali. This clarifies it.

Issue History

Date Modified Username Field Change
2026-02-06 12:34 deepaksinghola New Issue
2026-02-06 12:34 deepaksinghola Tag Attached: shape snapping
2026-02-06 12:34 deepaksinghola Tag Attached: snap to guide
2026-02-06 12:34 deepaksinghola Tag Attached: snapping
2026-02-06 12:34 deepaksinghola File Added: scribus-snap-issue.gif
2026-02-06 19:32 jghali Priority high => normal
2026-02-07 15:44 jghali Note Added: 0053452
2026-02-07 15:46 jghali Note Edited: 0053452
2026-02-07 15:46 jghali Note Edited: 0053452
2026-02-07 15:49 deepaksinghola Note Added: 0053453
2026-02-07 16:58 ale Relationship added related to 0001462
2026-02-07 16:59 ale Note Added: 0053454
2026-02-07 17:13 deepaksinghola Note Added: 0053456
2026-02-07 17:13 deepaksinghola File Added: Screenshot 2026-02-07 at 10.37.18 PM.png
2026-02-07 17:23 deepaksinghola Note Added: 0053457
2026-02-07 17:24 qirat Note Added: 0053458
2026-02-07 17:49 jghali Note Added: 0053459
2026-02-07 18:07 deepaksinghola Note Added: 0053460
2026-02-07 19:14 jghali Note Added: 0053461
2026-02-07 19:21 deepaksinghola Note Added: 0053462
2026-02-08 15:00 jghali Assigned To => jghali
2026-02-08 15:00 jghali Status new => resolved
2026-02-08 15:00 jghali Resolution open => no change required
2026-02-08 15:00 jghali Status resolved => closed