View Issue Details

IDProjectCategoryView StatusLast Update
0010269ScribusShape Drawingpublic2012-07-01 20:32
ReporterJLuc Assigned ToChelen  
Status closedResolutionfixed 
PlatformPCOS7OS Version
Product Version1.4.0svn 
Target VersionFixed in Version1.5.0svn 
Summary0010269: CTRL shape-tool modifier
DescriptionIn the PP, when clicking "Shape"/"Change", a new "Points" toobox appears.

This tool box enables to modify the block shape or contour shape.
It is possible to use the mouse so as to move one point or to move one line (segment) part of the shape.

When moving one line of the shape, all movement and all directions are possible.

However, when the initial shape is a perfect rectangle, with horizontal and vertical sides, i would like it to keep perfectly horizontal and vertical lined. This is very difficult now since the line is not constrained at all, and no mouse modifier are active. So it requires to zoom and be very precise and try and retry and correct until perfection of verticality or horizontality is reached.

So the request is to enable the CTRL modifier to constrain the line moves to horizontal or vertical, in the same way as CTRL does when changing a shape on the main edit window (without this "point" tool).

As a matter of fact maybe it should not be CTRL but SHIFT or SHIFT-CTRL modifier, since the usual CTRL modifier not only constrains to keep the alignment of the line, but modify all the points of the shape so as to keep the proportions of the shape. And with the "Points" tool, we are not modifying the all shape but we are just moving 2 points (this is, when using the mouse to move one side).

Well, whatever solution, a modifier that would easien the constrained moves of one side of the shape with the mouse would be helpfull.
Steps To Reproduce- create text or image frame
- Open the PP
- goto "shape" tab
- click "modify shape" (well : "Modifier", in french)
- move one side of the shape with the mouse so as to enlarge the frame horizontaly. Try to enlarge the frame without loosing the rectangle shape.
Additional InformationSidenote 1 : maybe the title for this window should be "Shape" instead of "Points" so as to reflect its link in the PP ?

Sidenote 2 : as with the "Point mouse moves" (and not any more the "line mouse move"), the moves could be improved in enabling a constraint too : CTRL or SHIFT or CTRL SHIFT could keep the angle of the 2 lines at that point, thus moving 3 points instead of just one.
TagsNo tags attached.


related to 0010800 closedChelen GSoC : Git branch about Layout undo/redo functionnality 



2011-09-16 15:30

developer   ~0026880

This would be usefull mainly for the "contour" shape, since the frame shape in itself can be modified in normal edit mode, without the "Shape edit/Points" tool... and with the CTRL modifier.


2012-04-11 13:29

developer   ~0027918

Last edited: 2012-04-11 13:31

View 2 revisions

It tried to do a patch to solve this.
It is functional for me but I don't do a modifier to keep angle. I just add ctrl modifier to have a parallel shape.

If something is wrong, just notice me and I will do my best to improve this patch

PS: I had to add two "contour mode" verification at the end of the patch and I don't know why it is not good without them but I notice there are bugs.


2012-04-11 13:30


shapeAlign.diff (1,984 bytes)
Index: ../scribus/canvasmode_nodeedit.cpp
--- ../scribus/canvasmode_nodeedit.cpp	(révision 17429)
+++ ../scribus/canvasmode_nodeedit.cpp	(copie de travail)
@@ -1127,7 +1128,56 @@
 						npf = npf.transformPoint(p, false);
+				//Control Modifier to have parallele shape
+				if (m->modifiers() == Qt::ControlModifier){
+					FPointArray cli;
+					if (m_doc->nodeEdit.isContourLine)
+						cli = currItem->ContourLine;
+					else
+						cli = currItem->PoLine;
+					FPoint npf1(npf);
+					int tmpNode;
+					int curr = (m_doc->nodeEdit.ClRe==0)?cli.size()-2:m_doc->nodeEdit.ClRe;
+					int prev = (curr+cli.size()-4)%cli.size();
+					int next = (curr+4)%cli.size();
+					if(abs(cli.point(prev).x()-cli.point(curr).x())<abs(cli.point(next).x()-cli.point(curr).x()))
+						tmpNode=next;
+					else if(abs(cli.point(prev).x()-cli.point(curr).x())==abs(cli.point(next).x()-cli.point(curr).x())){
+						if(cli.point(prev).y()!=cli.point(curr).y())
+							tmpNode=next;
+						else
+							tmpNode=prev;
+					}
+					else
+						tmpNode=prev;
+					m_doc->nodeEdit.moveClipPoint(currItem, npf);
+					m_doc->nodeEdit.ClRe=tmpNode;
+					if (m_doc->nodeEdit.isContourLine)
+						npf1.setX(currItem->ContourLine.point(m_doc->nodeEdit.ClRe).x());
+					else
+						npf1.setX(currItem->PoLine.point(m_doc->nodeEdit.ClRe).x());
+					m_doc->nodeEdit.moveClipPoint(currItem, npf1);
+					if(m_doc->nodeEdit.ClRe==prev)
+						m_doc->nodeEdit.ClRe=next;
+					else
+						m_doc->nodeEdit.ClRe=prev;
+					if (m_doc->nodeEdit.isContourLine)
+						npf.setY(currItem->ContourLine.point(m_doc->nodeEdit.ClRe).y());
+					else
+						npf.setY(currItem->PoLine.point(m_doc->nodeEdit.ClRe).y());
+				}
 				m_doc->nodeEdit.moveClipPoint(currItem, npf);
 				m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
shapeAlign.diff (1,984 bytes)

Issue History

Date Modified Username Field Change
2011-09-16 15:28 JLuc New Issue
2011-09-16 15:30 JLuc Note Added: 0026880
2012-04-11 13:29 Chelen Note Added: 0027918
2012-04-11 13:30 Chelen File Added: shapeAlign.diff
2012-04-11 13:31 Chelen Note Edited: 0027918 View Revisions
2012-06-25 10:10 Chelen Relationship added related to 0010800
2012-06-26 20:06 cbradney Status new => resolved
2012-06-26 20:06 cbradney Fixed in Version => 1.5.0svn
2012-06-26 20:06 cbradney Resolution open => fixed
2012-06-26 20:06 cbradney Assigned To => Chelen
2012-07-01 20:32 cbradney Status resolved => closed