Subversion Repositories Scribus

Rev

Rev 23691 | 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"/>
23691 jghali 4
        <title>Manipulating Objects</title>
10646 cbradney 5
</head>
23696 jghali 6
<style>
7
@import "manual.css";
8
</style>
10646 cbradney 9
<body>
23691 jghali 10
<h2>Manipulating Objects</h2>
5297 mrdocs 11
 
12
<dl>
13
 
22774 jghali 14
<dt><a name="-combinePolygons"><strong>combinePolygons()</strong></a></dt>
15
<dd><code>combinePolygons()</code>
23691 jghali 16
<p>Combines two or more selected polygons.</p>
17
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a>.</p></dd>
22774 jghali 18
 
19336 gpittman 19
<dt><a name="-copyObject"><strong>copyObject</strong>(...)</a></dt>
23691 jghali 20
<dd><code>copyObject(["name"]) -&gt; string</code>
21
<p>copies the selected Object to the clipboard.</p></dd>
19336 gpittman 22
 
23
<dt><a name="-duplicateObject"><strong>duplicateObject</strong>(...)</a></dt>
23691 jghali 24
<dd><code>duplicateObject(["name"]) -&gt; string</code>
25
<p>Creates a Duplicate of the selected Object (or Selection Group).</p></dd>
19336 gpittman 26
 
23687 jghali 27
<dt><a name="-getCharacterStyle"><strong>getCharacterStyle</strong></a>(...)</dt>
23691 jghali 28
<dd><code>getCharacterStyle(["name"])</code>
29
<p>Return name of character style applied to object named "name". If "name" is not given, the currently selected object is used.</p>
30
<p>If current object has a text selection, the name of style applied to start of selection is returned. Otherwise the name of the item default character style is returned.</p>
31
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a> if target frame is not a text frame.</p></dd>
23687 jghali 32
 
23686 jghali 33
<dt><a name="-getParagraphStyle"><strong>getParagraphStyle</strong></a>(...)</dt>
23691 jghali 34
<dd><code>getParagraphStyle(["name"])</code>
35
<p>Return name of paragraph style applied to object named "name". If "name" is not given, the currently selected object is used.</p>
36
<p>If current object has a text selection, the name of style applied to start of selection is returned. Otherwise the name of the item default style is returned.</p>
37
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a> if target frame is not a text frame.</p></dd>
22774 jghali 38
 
23686 jghali 39
<dt><a name="-getStyle"><strong>getStyle</strong></a>(...)</dt>
23691 jghali 40
<dd><code>getStyle(["name"])</code>
41
<p>Deprecated. Use getParagraphStyle() instead.</p></dd>
23686 jghali 42
 
23691 jghali 43
<dt><a name="-getTextFlowMode"><strong>getTextFlowMode</strong></a>(...)</dt>
44
<dd><code>getTextFlowMode(["name"]) -&gt; integer</code>
45
<p>Return the current text flow mode used by item "name" as an integer. If "name" is not given, the currently selected object is used.</p>
46
<p>The function will return one of the following value:
47
<ul>
48
        <li>0 : text flow around frame is disabled</li>
49
        <li>1 : text flow around frame shape</li>
50
        <li>2 : text flow around frame bounding box</li>
51
        <li>3 : text flow around frame contour line</li>
52
        <li>4 : text flow around image clip path</li>
53
</ul>
54
</p></dd>
55
 
5297 mrdocs 56
<dt><a name="-groupObjects"><strong>groupObjects</strong></a>(...)</dt>
23691 jghali 57
<dd><code>groupObjects(list)</code>
58
<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>
5297 mrdocs 59
 
60
<dt><a name="-isLocked"><strong>isLocked</strong></a>(...)</dt>
23691 jghali 61
<dd><code>isLocked(["name"]) -&gt; bool</code>
62
<p>Returns true if is the object "name" locked.  If "name" is not given the currently selected item is used.</p></dd>
5297 mrdocs 63
 
64
<dt><a name="-lockObject"><strong>lockObject</strong></a>(...)</dt>
23691 jghali 65
<dd><code>lockObject(["name"]) -&gt; bool</code>
66
<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>
5297 mrdocs 67
 
68
<dt><a name="-moveObject"><strong>moveObject</strong></a>(...)</dt>
23691 jghali 69
<dd><code>moveObject(dx, dy [, "name"])</code>
70
<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>
71
<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.</p></dd>
5297 mrdocs 72
 
73
<dt><a name="-moveObjectAbs"><strong>moveObjectAbs</strong></a>(...)</dt>
23691 jghali 74
<dd><code>moveObjectAbs(x, y [, "name"])</code>
75
<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>
5297 mrdocs 76
 
23691 jghali 77
<dt><a name="-pasteObject"><strong>pasteObject</strong>(...)</a></dt>
78
<dd><code>pasteObject(["name"]) -&gt; string</code>
79
<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>
80
 
5297 mrdocs 81
<dt><a name="-rotateObject"><strong>rotateObject</strong></a>(...)</dt>
23691 jghali 82
<dd><code>rotateObject(rot [, "name"])</code>
83
<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>
5297 mrdocs 84
 
85
<dt><a name="-rotateObjectAbs"><strong>rotateObjectAbs</strong></a>(...)</dt>
23691 jghali 86
<dd><code>rotateObjectAbs(rot [, "name"])</code>
87
<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>
5297 mrdocs 88
 
89
<dt><a name="-scaleGroup"><strong>scaleGroup</strong></a>(...)</dt>
23691 jghali 90
<dd><code>scaleGroup(factor [,"name"])</code>
91
<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>
92
<p>May raise ValueError if an invalid scale factor is passed.</p></dd>
5297 mrdocs 93
 
22540 jghali 94
<dt><a name="-setCharacterStyle"><strong>setCharacterStyle</strong></a>(...)</dt>
23691 jghali 95
<dd><code>setCharacterStyle("style" [, "name"])</code>
96
<p>Apply the named character "style" to the object named "name".</p>
97
<p>If object name is not provided, style is applied on current object selection.</p>
98
<p>If multiple objects are selected or if selected object has no text selection, style is applied on selected object(s). Otherwise style is applied to the current text selection.</p>
99
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a> if the target frame is not a text frame.</p>
100
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if specified style name does not exist in current document.</p></dd>
22540 jghali 101
 
23686 jghali 102
<dt><a name="-setParagraphStyle"><strong>setParagraphStyle</strong></a>(...)</dt>
23691 jghali 103
<dd><code>setParagraphStyle("style" [, "name"])</code>
104
<p>Apply the named paragraph "style" to the object named "name".</p>
105
<p>If object name is not provided, style is applied on current object selection.</p>
106
<p>If multiple objects are selected or if selected object has no text selection, style is applied on selected object(s). Otherwise style is applied to the current text selection.</p>
107
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a> if the target frame is not a text frame.</p>
108
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if specified style name does not exist in current document.</p></dd>
23686 jghali 109
 
22540 jghali 110
<dt><a name="-setScaleFrameToImage"><strong>setScaleFrameToImage</strong></a>(...)</dt>
23691 jghali 111
<dd><code>setScaleFrameToImage([name])</code>
112
<p>Set frame size on the selected or specified image frame to image size.</p>
113
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a>.</p></dd>
22540 jghali 114
 
5297 mrdocs 115
<dt><a name="-setScaleImageToFrame"><strong>setScaleImageToFrame</strong></a>(...)</dt>
23691 jghali 116
<dd><code>setScaleImageToFrame(scaletoframe, proportional=None, name=&lt;selection&gt;)</code>
117
<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>
118
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a>.</p></dd>
5297 mrdocs 119
 
120
<dt><a name="-setStyle"><strong>setStyle</strong></a>(...)</dt>
23691 jghali 121
<dd><code>setStyle("style" [, "name"])</code>
122
<p>Deprecated. Use setParagraphStyle() instead.</p></dd>
5297 mrdocs 123
 
23691 jghali 124
<dt><a name="-setTextFlowMode"><strong>setTextFlowMode</strong>(...)</a></dt>
125
<dd><code>setTextFlowMode("name" [, state])</code>
126
<p>Enables/disables "Text Flows Around Frame" feature for object "name".</p>
127
<p>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>
23690 jghali 128
 
5297 mrdocs 129
<dt><a name="-sizeObject"><strong>sizeObject</strong></a>(...)</dt>
23691 jghali 130
<dd><code>sizeObject(width, height [, "name"])</code>
131
<p>Resizes the object "name" to the given width and height. If "name" is not given the currently selected item is used.</p></dd>
5297 mrdocs 132
 
23438 jghali 133
<dt><a name="-unGroupObjects"><strong>unGroupObjects</strong></a>(...)</dt>
23691 jghali 134
<dd><code>unGroupObjects("name")</code>
135
<p>Destructs the group the object "name" belongs to. If "name" is not given the currently selected item is used.</p></dd>
5297 mrdocs 136
 
23691 jghali 137
<dt><a name="-textFlowMode"><strong>textFlowMode</strong>(...)</a></dt>
138
<dd><code>textFlowMode("name" [, state])</code>
139
<p>Deprecated. Use setTextFlowMode() instead.</p></dd>
5297 mrdocs 140
 
141
</dl>
10646 cbradney 142
</body>
143
</html>