View Issue Details

IDProjectCategoryView StatusLast Update
0009146ScribusCanvaspublic2016-12-02 20:56
Reporterpspencer Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformlinuxOSFedoraOS Version10
Product Version1.3.6 
Summary0009146: Hard to get the length you want when drawing constrained horizontal/vertical lines
DescriptionWhen drawing a line with angle constrained, the constraint works by rotating the line into the constrained angle.

This is great for most angles, but for horizontal/vertical lines it means you have to position both the x and y coordinates of the mouse carefully in order to get the length you want.

For example: start a line at (10,10), move mouse to (100,11): you get a horizontal line from (10,10) to (100.something, 10).

It would be more intuitive, I think, if a horizontal line extended exactly to the x-coordinate of your mouse location (e.g., from (10,10) to exactly (100,10) in the above example).

The attached patch implements this by snapping the length of the line down to the horizontal or vertical extent if the angle is close to horizontal or vertical (determined by checking if the length is only just slightly larger than the horizontal or vertical extent)
Tagslines
PatchYes

Activities

pspencer

2010-06-08 18:30

reporter  

scriblinecreate.patch (619 bytes)   
--- Scribus-orig/scribus/canvasmode_create.cpp	2010-05-20 09:50:33.000000000 -0400
+++ Scribus/scribus/canvasmode_create.cpp	2010-06-08 12:10:21.000000000 -0400
@@ -260,6 +260,8 @@
 						newRot += 360;
 					newRot = constrainAngle(newRot, m_doc->opToolPrefs().constrain);
 					double len = qMax(0.01, distance(bounds.width(), bounds.height()));
+					if (len < qAbs(bounds.width())*1.01) len=qAbs(bounds.width());
+					if (len < qAbs(bounds.height())*1.01) len=qAbs(bounds.height());
 					bounds.setSize(len * QSizeF(cosd(newRot), sind(newRot)));
 					newX = bounds.right();
 					newY = bounds.bottom();
scriblinecreate.patch (619 bytes)   

Issue History

Date Modified Username Field Change
2010-06-08 18:30 pspencer New Issue
2010-06-08 18:30 pspencer File Added: scriblinecreate.patch
2016-05-14 04:05 Kunda Tag Attached: lines
2016-12-02 20:56 Kunda Patch => Yes