Subversion Repositories Scribus

Rev

Rev 23430 | 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>Setting Object Properties</title>
5
</head>
23696 jghali 6
<style>
7
@import "manual.css";
8
</style>
10646 cbradney 9
<body>
559 cbradney 10
<h2>Setting Object Properties</h2>
11
 
12
<dl>
1041 cbradney 13
 
14
<dt><a name="-loadImage"><strong>loadImage</strong></a>(...)</dt>
7440 subik 15
<dd><code>loadImage("filename" [, "name"])</code>
1041 cbradney 16
<p>Loads the picture "picture" into the image frame "name". If "name" is not given the currently selected item is used.</p>
17
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a> if the target frame is not an image frame</p></dd></dt>
559 cbradney 18
 
23430 jghali 19
<dt><a name="-outlineText"><strong>outlineText</strong></a>(...)</dt>
20
<dd><code>outlineText(["name"])</code>
21
<p>Convert the text frame "name" to outlines. If "name" is not given the currently selected item is used.</p></dd>
22
 
22760 jghali 23
<dt><a name="-scaleImage"><strong>scaleImage</strong></a>(...)</dt>
24
<dd><code>scaleImage(x, y [, "name"])</code>
25
<p><b>Do not use this command since it no longer works. Use setImageScale instead.</b></p></dd>
26
 
22205 jghali 27
<dt><a name="-setCornerRadius"><strong>setCornerRadius</strong></a>(...)</dt>
28
<dd><code>setCornerRadius(radius, ["name"])</code>
22541 gpittman 29
<p>Sets the corner radius of the object "name". The radius is expressed in points regardless of page units, and must be an integer. If "name" is not given the currently selected item is used.</p>
22205 jghali 30
<p>May raise ValueError if the corner radius is negative.</p></dd>
31
 
32
<dt><a name="-setCustomLineStyle"><strong>setCustomLineStyle</strong></a>(...)</dt>
33
<dd><code>setCustomLineStyle(styleName, ["name"])</code>
34
<p>Sets the custom line style of the object "name" to "styleName". Argument "styleName" is the name of line style as seen in Style Manager. If "name" is not given the currently selected item is used.</p></dd>
35
 
7440 subik 36
<dt><a name="-setFillBlendmode"><strong>setFillBlendmode</strong>(...)</a></dt>
37
<dd><code>setFillBlendmode(blendmode, ["name"])</code>
22760 jghali 38
<p>Sets the fill blendmode of the object "name" to blendmode. If "name" is not given the currently selected item is used.</p></dd>
7440 subik 39
 
1041 cbradney 40
<dt><a name="-setFillColor"><strong>setFillColor</strong></a>(...)</dt>
7440 subik 41
<dd><code>setFillColor("color", ["name"])</code>
1041 cbradney 42
<p>Sets the fill color of the object "name" to the color "color". "color" is the name of one of the defined colors. If "name" is not given the currently selected item is used.</p></dd>
559 cbradney 43
 
1041 cbradney 44
<dt><a name="-setFillShade"><strong>setFillShade</strong></a>(...)</dt>
7440 subik 45
<dd><code>setFillShade(shade, ["name"])</code>
1041 cbradney 46
<p>Sets the shading of the fill color of the object "name" to "shade". "shade" must be an integer value in the range from 0 (lightest) to 100 (full Color intensity). If "name" is not given the currently selected Item is used.<p>
47
<p>May raise ValueError if the fill shade is out of bounds.</p></dd>
559 cbradney 48
 
7440 subik 49
<dt><a name="-setFillTransparency"><strong>setFillTransparency</strong>(...)</a></dt>
50
<dd><code>setFillTransparency(transparency, ["name"])</code>
22760 jghali 51
<p>Sets the fill transparency of the object "name". If "name" is not given the currently selected item is used.</p>
52
<p>In spite of this command's wording, the "transparency" value is actually a decimal corresponding to the <strong>opacity</strong>, so for example, 0.9 = 90% opacity, 0.2 = 20% opacity.</p></dd>
7440 subik 53
 
1041 cbradney 54
<dt><a name="-setGradientFill"><strong>setGradientFill</strong></a>(...)</dt>
7440 subik 55
<dd><code>setGradientFill(type, "color1", shade1, "color2", shade2, ["name"])</code>
1041 cbradney 56
<p>Sets the gradient fill of the object "name" to type. Color descriptions are the same as for <a href="#-setFillColor">setFillColor</a>() and <a href="#-setFillShade">setFillShade</a>(). See the constants for available types (FILL_&lt;type&gt;).</p></dd>
559 cbradney 57
 
13182 jghali 58
<dt><a name="-setGradientStop"><strong>setGradientStop</strong></a>(...)</dt>
59
<dd><code>setGradientStop("color", shade, opacity, ramppoint, ["name"])</code>
60
<p>Set or add a gradient stop to the gradient fill of the object \"name\" at position ramppoint. Color descriptions are the same as for <a href="#-setFillColor">setFillColor</a>() and <a href="#-setFillShade">setFillShade</a>(). setGradientFill() must have been called previously for the gradient fill to be visible.</p></dd>
61
 
22760 jghali 62
<dt><a name="-setImageScale"><strong>setImageScale</strong></a>(...)</dt>
63
<dd><code>setImageScale(x, y [, "name"])</code>
64
<p>Sets the scaling factors of the picture in the image frame "name". If "name" is not given the currently selected item is used. A number of 1 means 100 %. Scaling factors are equal to the values shown on properties palette.</p>
65
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a> if the target frame is not an image frame</p></dd>
66
 
67
<dt><a name="-setImageOffset"><strong>setImageOffset</strong></a>(...)</dt>
68
<dd><code>setImageOffset(x, y [, "name"])</code>
69
<p>Sets the position of the picture in the image frame "name". If "name" is not given the currently selected item is used. The specified offset values are equal to the values shown on properties palette when point unit is used.</p>
70
<p>May raise <a href="scripterapi.html#WrongFrameTypeError">WrongFrameTypeError</a> if the target frame is not an image frame</p></dd>
71
 
23369 jghali 72
<dt><a name="-setItemName"><strong>setItemName</strong></a>(...)</dt>
73
<dd><code>setItemName(newName, [, "name"])</code>
74
<p>Sets the name of the object "name" to "newName" and returns the name applied. If "name" is not given the currently selected item is used.</p>
75
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the object doesn't exist.</p></dd>
76
 
22760 jghali 77
<dt><a name="-setLineBlendmode"><strong>setLineBlendmode</strong>(...)</a></dt>
78
<dd><code>setLineBlendmode(blendmode, ["name"])</code>
79
<p>Sets the line blendmode of the object "name" to blendmode is the name of one of the defined colors. If "name" is not given the currently selected item is used.</p></dd>
80
 
1041 cbradney 81
<dt><a name="-setLineCap"><strong>setLineCap</strong></a>(...)</dt>
15508 jghali 82
<dd><code>setLineCap(captype, ["name"])</code>
22760 jghali 83
<p>Sets the line cap style of the object "name" to the style "cap". If "name" is not given the currently selected item is used.</p>
84
<p>The value "cap" must be taken amongst predefined constants CAP_&lt;type&gt;: CAP_FLAT, CAP_ROUND, or CAP_SQUARE.</p></dd>
1041 cbradney 85
 
86
<dt><a name="-setLineColor"><strong>setLineColor</strong></a>(...)</dt>
7440 subik 87
<dd><code>setLineColor("color", ["name"])</code>
1041 cbradney 88
<p>Sets the line color of the object "name" to the color "color". If "name" is not given the currently selected item is used.</p></dd>
22760 jghali 89
 
1041 cbradney 90
<dt><a name="-setLineJoin"><strong>setLineJoin</strong></a>(...)</dt>
7440 subik 91
<dd><code>setLineJoin(join, ["name"])</code>
22760 jghali 92
<p>Sets the line join style of the object "name" to the style "join". If "name" is not given the currently selected item is used.</p>
93
<p>The value "join" must be taken amongst predefined constants JOIN_&lt;type&gt;: JOIN_BEVEL, JOIN_MITTER or JOIN_ROUND.</p></dd>
1041 cbradney 94
 
95
<dt><a name="-setLineShade"><strong>setLineShade</strong></a>(...)</dt>
7440 subik 96
<dd><code>setLineShade(shade, ["name"])</code>
1041 cbradney 97
<p>Sets the shading of the line color of the object "name" to "shade". "shade" must be an integer value in the range from 0 (lightest) to 100 (full color intensity). If "name" is not given the currently selected item is used.</p>
98
<p>May raise ValueError if the line shade is out of bounds.</p></dd>
22760 jghali 99
 
1041 cbradney 100
<dt><a name="-setLineStyle"><strong>setLineStyle</strong></a>(...)</dt>
7440 subik 101
<dd><code>setLineStyle(style, ["name"])</code>
22760 jghali 102
<p>Sets the line style of the object "name" to the style "style". If "name" is not given the currently selected item is used.</p>
103
<p>There are predefined constants for "style" - LINE_&lt;style&gt;.</p></dd>
1041 cbradney 104
 
22760 jghali 105
<dt><a name="-setLineTransparency"><strong>setLineTransparency</strong>(...)</a></dt>
106
<dd><code>setLineTransparency(transparency, ["name"])</code>
107
<p>Sets the line transparency of the object "name". If "name" is not given the currently selected item is used. In spite of this command's wording, the "transparency" value is actually a decimal corresponding to the <strong>opacity</strong>, so for example, 0.9 = 90% opacity, 0.2 = 20% opacity.</p></dd>
108
 
1041 cbradney 109
<dt><a name="-setLineWidth"><strong>setLineWidth</strong></a>(...)</dt>
7440 subik 110
<dd><code>setLineWidth(width, ["name"])</code>
1041 cbradney 111
<p>Sets line width of the object "name" to "width". "width" must be in the range from 0.0 to 12.0 inclusive, and is measured in points. If "name" is not given the currently selected item is used.</p>
112
<p>May raise ValueError if the line width is out of bounds.</p></dd>
113
 
22760 jghali 114
<dt><a name="-setMultiLine"><strong>setMultiLine</strong></a>(...)</dt>
115
<dd><code>setMultiLine("namedStyle", ["name"])</code>
116
<p>Sets the line style of the object "name" to the named style "namedStyle". If "name" is not given the currently selected item is used.</p>
117
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the line style doesn't exist.</p></dd>
7440 subik 118
 
22758 jghali 119
<dt><a name="-setObjectAttributes"><strong>setObjectAttributes</strong></a>(...)</dt>
120
<dd><code>setObjectAttributes(attributes, ["name"])</code>
121
<p>Sets attributes of the object "name". If "name" is not given the currently selected item is used.</p>
122
<p>attributes is a list of dictionary. Each dictionary must have those keys: Name, Type, Value, Parameter, Relationship, RelationshipTo, AutoAddTo. All values must be strings.</p></dd>
123
 
1041 cbradney 124
<dt><a name="-traceText"><strong>traceText</strong></a>(...)</dt>
7440 subik 125
<dd><code>traceText(["name"])</code>
23430 jghali 126
<p>Deprecated, use outlineText() instead.</p></dd>
559 cbradney 127
 
597 cbradney 128
</dl>
10646 cbradney 129
</body>
130
</html>