Subversion Repositories Scribus

Rev

Rev 13527 | Rev 22540 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10646 cbradney 1
<html>
2
<head>
3
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4
        <title>Manipulating Objects</title>
5
</head>
6
<body>
5297 mrdocs 7
<h2>Manipulating Objects</h2>
8
 
9
<dl>
10
 
19336 gpittman 11
<dt><a name="-copyObject"><strong>copyObject</strong>(...)</a></dt>
12
<dd><code>copyObject(["name"]) -&gt; string</code>
13
<p>copies the selected Object to the clipboard.</p></dd>
14
 
15
<dt><a name="-duplicateObject"><strong>duplicateObject</strong>(...)</a></dt>
16
<dd><code>duplicateObject(["name"]) -&gt; string</code>
17
<p>creates a Duplicate of the selected Object (or Selection Group).</p></dd>
18
 
5297 mrdocs 19
<dt><a name="-groupObjects"><strong>groupObjects</strong></a>(...)</dt>
19336 gpittman 20
<dd><code>groupObjects(list)</code>
5297 mrdocs 21
<p>Groups the objects named in "list" together. "list" must contain the names of the objects to be grouped. If "list" is not given the currently selected items are used.</p></dd>
22
 
23
<dt><a name="-isLocked"><strong>isLocked</strong></a>(...)</dt>
19336 gpittman 24
<dd><code>isLocked(["name"]) -&gt; bool</code>
5297 mrdocs 25
<p>Returns true if is the object "name" locked.  If "name" is not given the currently selected item is used.</p></dd>
26
 
27
<dt><a name="-lockObject"><strong>lockObject</strong></a>(...)</dt>
19336 gpittman 28
<dd><code>lockObject(["name"]) -&gt; bool</code>
5297 mrdocs 29
<p>Locks the object "name" if it's unlocked or unlock it if it's locked. If "name" is not given the currently selected item is used. Returns true if locked.</p></dd>
30
 
31
<dt><a name="-moveObject"><strong>moveObject</strong></a>(...)</dt>
19336 gpittman 32
<dd><code>moveObject(dx, dy [, "name"])</code>
33
<p>Moves the object "name" by dx and dy relative to its current position. The distances are expressed in the current measurement unit of the document (see UNIT constants). If "name" is not given the currently selected item is used. If the object "name" belongs to a group, the whole group is moved.</p>
34
<p>If what you wish to do is to move an object to a different page or layer, it may be more efficient to do the sequence <em>copyObject(...)</em>, followed by <em>pasteObject(...)</em>, and then finally <em>deleteObject(...)</em> to delete the original.</dd>
5297 mrdocs 35
 
36
<dt><a name="-moveObjectAbs"><strong>moveObjectAbs</strong></a>(...)</dt>
19336 gpittman 37
<dd><code>moveObjectAbs(x, y [, "name"])</code>
5297 mrdocs 38
<p>Moves the object "name" to a new location. The coordinates are expressed in the current measurement unit of the document (see UNIT constants).  If "name" is not given the currently selected item is used.  If the object "name" belongs to a group, the whole group is moved.</p></dd>
39
 
19336 gpittman 40
<dt><a name="-pasteObject"><strong>pasteObject</strong>(...)</a></dt>
41
<dd><code>pasteObject(["name"]) -&gt; string</code>
42
<p>pastes an Object from the clipboard. This will be used only or most sensibly following <em>copyObject(...)</em>, since otherwise there will likely be nothing in the clipboard to paste.</p></dd>
43
 
5297 mrdocs 44
<dt><a name="-rotateObject"><strong>rotateObject</strong></a>(...)</dt>
19336 gpittman 45
<dd><code>rotateObject(rot [, "name"])</code>
5297 mrdocs 46
<p>Rotates the object "name" by "rot" degrees relatively. The object is rotated by the vertex that is currently selected as the rotation point - by default, the top left vertext at zero rotation. Positive values mean counter clockwise rotation when the default rotation point is used. If "name" is not given the currently selected item is used.</p></dd>
47
 
48
<dt><a name="-rotateObjectAbs"><strong>rotateObjectAbs</strong></a>(...)</dt>
19336 gpittman 49
<dd><code>rotateObjectAbs(rot [, "name"])</code>
5297 mrdocs 50
<p>Sets the rotation of the object "name" to "rot". Positive values mean counter clockwise rotation. If "name" is not given the currently selected item is used.</p></dd>
51
 
52
<dt><a name="-scaleGroup"><strong>scaleGroup</strong></a>(...)</dt>
19336 gpittman 53
<dd><code>scaleGroup(factor [,"name"])</code>
5297 mrdocs 54
<p>Scales the group the object "name" belongs to. Values greater than 1 enlarge the group, values smaller than 1 make the group smaller e.g a value of 0.5 scales the group to 50 % of its original size, a value of 1.5 scales the group to 150 % of its original size.  The value for "factor" must be greater than 0. If "name" is not given the currently selected item is used.</p>
55
<p>May raise ValueError if an invalid scale factor is passed.</p></dd>
56
 
57
<dt><a name="-setScaleImageToFrame"><strong>setScaleImageToFrame</strong></a>(...)</dt>
19336 gpittman 58
<dd><code>setScaleImageToFrame(scaletoframe, proportional=None, name=&lt;selection&gt;)</code>
5297 mrdocs 59
<p>Sets the scale to frame on the selected or specified image frame to `scaletoframe'. If `proportional' is specified, set fixed aspect ratio scaling to `proportional'. Both `scaletoframe' and `proportional' are boolean.</p>
60
<p>May raise WrongFrameTypeError.</p></dd>
61
 
62
<dt><a name="-setStyle"><strong>setStyle</strong></a>(...)</dt>
19336 gpittman 63
<dd><code>setStyle("style" [, "name"])</code>
64
<p>Apply the named "style" to the object named "name". If object name is given, style is applied to the current text selection in object "name". If no object name is given, style is applied on selected object.</p></dd>
5297 mrdocs 65
 
66
<dt><a name="-sizeObject"><strong>sizeObject</strong></a>(...)</dt>
19336 gpittman 67
<dd><code>sizeObject(width, height [, "name"])</code>
5297 mrdocs 68
<p>Resizes the object "name" to the given width and height. If "name" is not given the currently selected item is used.</p></dd>
69
 
70
<dt><a name="-unGroupObject"><strong>unGroupObject</strong></a>(...)</dt>
71
<dd><code>unGroupObjects("name")</code>
72
<p>Destructs the group the object "name" belongs to.If "name" is not given the currently selected item is used.</p></dd>
73
 
19336 gpittman 74
<dt><a name="-textFlowMode"><strong>textFlowMode</strong>(...)</a></dt>
75
<dd><code>textFlowMode("name" [, state])</code>
76
<p>Enables/disables "Text Flows Around Frame" feature for object "name". Called with parameters string name and optional int "state" (0 &lt;= state &lt;= 3). Setting "state" to 0 will disable text flow. Setting "state" to 1 will make text flow around object frame. Setting "state" to 2 will make text flow around bounding box. Setting "state" to 3 will make text flow around contour line. If "state" is not passed, text flow is toggled.</p></dd>
5297 mrdocs 77
 
78
</dl>
10646 cbradney 79
</body>
80
</html>