View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009146 | Scribus | Canvas | public | 2010-06-08 18:30 | 2016-12-02 20:56 |
Reporter | pspencer | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | linux | OS | Fedora | OS Version | 10 |
Product Version | 1.3.6 | ||||
Summary | 0009146: Hard to get the length you want when drawing constrained horizontal/vertical lines | ||||
Description | When 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) | ||||
Tags | lines | ||||
Patch | Yes | ||||
|
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(); |