1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Commands for Lines</title>
</head>
<style>
@import "manual.css";
</style>
<body>
<h2>Commands for Lines</h2>
<dl>
<dt><a name="-createBezierLine"><strong>createBezierLine</strong></a>(...)</dt>
<dd><code>createBezierLine(list, ["name"]) -> string</code>
<p>Creates a new bezier curve and returns its name. The points for the bezier curve are stored in the list "list" in the following order: [x1, y1, kx1, ky1, x2, y2, kx2, ky2...xn. yn, kxn. kyn] In the points list, x and y mean the x and y coordinates of the point and kx and ky meaning the control point for the curve. The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.</p>
<p>May raise <a href="scripterapi.html#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used. May raise ValueError if an insufficient number of points is passed or if the number of values passed don't group into points without leftovers.</p></dd>
<dt><a name="-createLine"><strong>createLine</strong></a>(...)</dt>
<dd><code>createLine(x1, y1, x2, y2, ["name"]) -> string</code>
<p>Creates a new line from the point(x1, y1) to the point(x2, y2) and returns its name. The coordinates are given in the current measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.</p>
<p>May raise <a href="scripterapi.html#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.</p></dd>
<dt><a name="-createPolyLine"><strong>createPolyLine</strong></a>(...)</dt>
<dd><code>createPolyLine(list, ["name"]) -> string</code>
<p>Creates a new polyline and returns its name. The points for the polyline are stored in the list "list" in the following order: [x1, y1, x2, y2...xn. yn]. The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.</p>
<p>May raise <a href="scripterapi.html#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used. May raise ValueError if an insufficient number of points is passed or if the number of values passed don't group into points without leftovers.</p></dd>
<dt><a name="-getLineBlendmode"><strong>getLineBlendmode</strong>(...)</a></dt>
<dd><code>getLineBlendmode(["name"]) -> integer</code>
<p>Returns the line blendmode of the object "name". If "name" is not given the currently selected Item is used.</p></dd>
<dt><a name="-getLineCap"><strong>getLineCap</strong></a>(...)</dt>
<dd><code>getLineEnd(["name"]) -> integer (see constants)</code>
<p>Returns the line cap style of the object "name". If "name" is not given the currently selected item is used. The cap types are: CAP_FLAT, CAP_ROUND, CAP_SQUARE</p></dd>
<dt><a name="-getLineColor"><strong>getLineColor</strong></a>(...)</dt>
<dd><code>getLineColor(["name"]) -> string</code>
<p>Returns the name of the line color of the object "name". If "name" is not given the currently selected item is used.</p></dd>
<dt><a name="-getLineJoin"><strong>getLineJoin</strong></a>(...)</dt>
<dd><code>getLineJoin(["name"]) -> integer (see contants)</code>
<p>Returns the line join style of the object "name". If "name" is not given the currently selected item is used. The join types are: JOIN_BEVEL, JOIN_MITTER, JOIN_ROUND</p></dd>
<dt><a name="-getLineShade"><strong>getLineShade</strong></a>(...)</dt>
<dd><code>getLineShade(["name"]) -> integer</code>
<p>Returns the shading value of the line color of the object "name". If "name" is not given the currently selected item is used.</p></dd>
<dt><a name="-getLineStyle"><strong>getLineStyle</strong></a>(...)</dt>
<dd><code>getLineStyle(["name"]) -> integer (see constants)</code>
<p>Returns the line style of the object "name". If "name" is not given the currently selected item is used. Line style constants are: LINE_DASH, LINE_DASHDOT, LINE_DASHDOTDOT, LINE_DOT, LINE_SOLID</p></dd>
<dt><a name="-getLineTransparency"><strong>getLineTransparency</strong>(...)</a></dt>
<dd><code>getLineTransparency(["name"]) -> float</code>
<p>Returns the line transparency of the object "name". If "name" is not given the currently selected Item is used.</p></dd>
<dt><a name="-getLineWidth"><strong>getLineWidth</strong></a>(...)</dt>
<dd><code>getLineWidth(["name"]) -> integer</code>
<p>Returns the line width of the object "name". If "name" is not given the currently selected Item is used.</p></dd>
<dt><a name="-setLineBlendmode"><strong>setLineBlendmode</strong>(...)</a></dt>
<dd><code>setLineBlendmode(blendmode, ["name"])</code>
<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>
<dt><a name="-setLineTransparency"><strong>setLineTransparency</strong>(...)</a></dt>
<dd><code>setLineTransparency(transparency, ["name"])</code>
<p>Sets the line transparency of the object "name" to transparency is the name of one of the defined colors. If "name" is not given the currently selected item is used.</p></dd>
<dt><a name="-setLineCap"><strong>setLineCap</strong></a>(...)</dt>
<dd><code>setLineCap(captype, ["name"])</code>
<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. There are predefined constants for "cap" - CAP_<type>.</p></dd>
<dt><a name="-setLineColor"><strong>setLineColor</strong></a>(...)</dt>
<dd><code>setLineColor("color", ["name"])</code>
<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>
<dt><a name="-setMultiLine"><strong>setMultiLine</strong></a>(...)</dt>
<dd><code>setMultiLine("namedStyle", ["name"])</code>
<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>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the line style doesn't exist.</p></dd>
<dt><a name="-setLineJoin"><strong>setLineJoin</strong></a>(...)</dt>
<dd><code>setLineJoin(join, ["name"])</code>
<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. There are predefined constants for join - JOIN_<type>.</p></dd>
<dt><a name="-setLineShade"><strong>setLineShade</strong></a>(...)</dt>
<dd><code>setLineShade(shade, ["name"])</code>
<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>
<p>May raise ValueError if the line shade is out of bounds.</p></dd>
<dt><a name="-setLineStyle"><strong>setLineStyle</strong></a>(...)</dt>
<dd><code>setLineStyle(style, ["name"])</code>
<p>Sets the line style of the object "name" to the style "style". If "name" is not given the currently selected item is used. There are predefined constants for "style" - LINE_<style>.</p></dd>
<dt><a name="-setLineWidth"><strong>setLineWidth</strong></a>(...)</dt>
<dd><code>setLineWidth(width, ["name"])</code>
<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>
<p>May raise ValueError if the line width is out of bounds.</p></dd>
</dl>
</body>
</html>
|