~ubuntu-branches/ubuntu/trusty/python-sfml/trusty

« back to all changes in this revision

Viewing changes to python/doc/String.html

  • Committer: Package Import Robot
  • Author(s): James Cowgill
  • Date: 2013-12-09 17:50:52 UTC
  • mfrom: (1.1.3) (8.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20131209175052-11v6drpb6g3yksst
Tags: 1.5.1.is.1.3+dfsg-1
* New upstream version 1.3 (from python-sfml.org)
  - This is a complete rewrite of the Python bindings for SFML2, and
    the new maintainer is using a different version numbering scheme.
* Added myself to the list of uploaders
* Change package priority from extra to optional
* Bumped standards version (to 3.9.5) and debhelper compat (to 9)
* Added Python 3 and documentation packages
* Improve package description for debug packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
 
<html>
3
 
    <head>
4
 
        <title>PySFML - Python binding for SFML (Simple and Fast Multimedia Library) - String</title>
5
 
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
6
 
        <link href="style.css" rel="stylesheet" type="text/css" />
7
 
    </head>
8
 
    <body>
9
 
        <div id="logo">
10
 
            <img src="http://www.sfml-dev.org/images/logo.jpg" width="770" height="200" title="SFML home" alt="SFML logo" />
11
 
        </div>
12
 
<h1>sf.String Class Reference</h1>
13
 
<div class="class_desc">sf.String defines a graphical 2D text, that can be drawn on screen.<br />
14
 
Default constructor : String ()<br />
15
 
Construct the string from an unicode or an ascii string : String(Text, Font=sf.Font.GetDefaultFont(), Size=30.)<br />
16
 
&nbsp;&nbsp;&nbsp;&nbsp;Text : Text assigned to the string<br />
17
 
&nbsp;&nbsp;&nbsp;&nbsp;Font : Font used to draw the string (SFML built-in font by default)<br />
18
 
&nbsp;&nbsp;&nbsp;&nbsp;Size : Characters size (30 by default)</div>
19
 
<div class="base_class">Base class: <a href="Drawable.html">sf.Drawable</a>.</div>
20
 
<h2>Attributes</h2>
21
 
<div class="attr_name">Bold</div>
22
 
<div class="attr_name">Italic</div>
23
 
<div class="attr_name">Regular</div>
24
 
<div class="attr_name">Underlined</div>
25
 
<br />
26
 
<h2>Methods</h2>
27
 
<div class="attr_name">GetCenter()</div>
28
 
<div class="desc">Get the center of the object, in coordinates relative to the object.<br /></div>
29
 
<div class="inherited">Inherited</div>
30
 
<div class="attr_name">GetCharacterPos(Index)</div>
31
 
<div class="desc">Return the visual position (a tuple of two floats) of the Index-th character of the string, in coordinates relative to the string (note : translation, center, rotation and scale are not applied)<br />&nbsp;&nbsp;&nbsp;&nbsp;Index : Index of the character<br /></div>
32
 
<div class="attr_name">GetColor()</div>
33
 
<div class="desc">Get the color of the object.<br /></div>
34
 
<div class="inherited">Inherited</div>
35
 
<div class="attr_name">GetFont()</div>
36
 
<div class="desc">Get the font used by the string.<br /></div>
37
 
<div class="attr_name">GetPosition()</div>
38
 
<div class="desc">Get the position of the object.<br /></div>
39
 
<div class="inherited">Inherited</div>
40
 
<div class="attr_name">GetRect()</div>
41
 
<div class="desc">Get the string rectangle on screen.<br /></div>
42
 
<div class="attr_name">GetRotation()</div>
43
 
<div class="desc">Get the orientation of the object.<br /></div>
44
 
<div class="inherited">Inherited</div>
45
 
<div class="attr_name">GetScale()</div>
46
 
<div class="desc">Get the scale of the object.<br /></div>
47
 
<div class="inherited">Inherited</div>
48
 
<div class="attr_name">GetSize()</div>
49
 
<div class="desc">Get the size of the characters.<br /></div>
50
 
<div class="attr_name">GetStyle()</div>
51
 
<div class="desc">Get the style of the text.<br /></div>
52
 
<div class="attr_name">GetText()</div>
53
 
<div class="desc">Get the text as an unicode string.<br /></div>
54
 
<div class="attr_name">Move(OffsetX, OffsetY)</div>
55
 
<div class="desc">Move the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;OffsetX : X offset<br />&nbsp;&nbsp;&nbsp;&nbsp;OffsetY : Y offset <br /></div>
56
 
<div class="inherited">Inherited</div>
57
 
<div class="attr_name">Rotate(Angle)</div>
58
 
<div class="desc">Rotate the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;Angle : Angle of rotation, in degrees<br /></div>
59
 
<div class="inherited">Inherited</div>
60
 
<div class="attr_name">Scale(FactorX, FactorY)</div>
61
 
<div class="desc">Scale the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;FactorX : Scaling factor on X (must be strictly positive)<br />&nbsp;&nbsp;&nbsp;&nbsp;FactorY : Scaling factor on Y (must be strictly positive)<br /></div>
62
 
<div class="inherited">Inherited</div>
63
 
<div class="attr_name">SetBlendMode(Mode)</div>
64
 
<div class="desc">Set the blending mode for the object. The default blend mode is sf.Blend.Alpha<br />&nbsp;&nbsp;&nbsp;&nbsp;Mode : New blending mode<br /></div>
65
 
<div class="inherited">Inherited</div>
66
 
<div class="attr_name">SetCenter(CenterX, CenterY)</div>
67
 
<div class="desc">Set the center of the object, in coordinates relative to the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;CenterX : X coordinate of the center<br />&nbsp;&nbsp;&nbsp;&nbsp;CenterY : Y coordinate of the center<br /></div>
68
 
<div class="inherited">Inherited</div>
69
 
<div class="attr_name">SetColor(Color)</div>
70
 
<div class="desc">Set the color of the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;Color : New color<br /></div>
71
 
<div class="inherited">Inherited</div>
72
 
<div class="attr_name">SetFont(Font)</div>
73
 
<div class="desc">Set the font of the string.<br />&nbsp;&nbsp;&nbsp;&nbsp;Font : font to use<br /></div>
74
 
<div class="attr_name">SetPosition(X, Y)</div>
75
 
<div class="desc">Set the position of the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;X : New X coordinate<br />&nbsp;&nbsp;&nbsp;&nbsp;Y : New Y coordinate<br /></div>
76
 
<div class="inherited">Inherited</div>
77
 
<div class="attr_name">SetRotation(Rotation)</div>
78
 
<div class="desc">Set the orientation of the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;Rotation : Angle of rotation, in degrees<br /></div>
79
 
<div class="inherited">Inherited</div>
80
 
<div class="attr_name">SetScale(ScaleX, ScaleY)</div>
81
 
<div class="desc">Set the scale of the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;ScaleX &nbsp;&nbsp;&nbsp;&nbsp;: New horizontal scale (must be strictly positive)<br />&nbsp;&nbsp;&nbsp;&nbsp;ScaleY &nbsp;&nbsp;&nbsp;&nbsp;: New vertical scale (must be strictly positive)<br /></div>
82
 
<div class="inherited">Inherited</div>
83
 
<div class="attr_name">SetScaleX(ScaleX)</div>
84
 
<div class="desc">Set the X scale factor of the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;ScaleX &nbsp;&nbsp;&nbsp;&nbsp;: New horizontal scale (must be strictly positive)<br /></div>
85
 
<div class="inherited">Inherited</div>
86
 
<div class="attr_name">SetScaleY(ScaleY)</div>
87
 
<div class="desc">Set the Y scale factor of the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;ScaleY &nbsp;&nbsp;&nbsp;&nbsp;: New vertical scale (must be strictly positive)<br /></div>
88
 
<div class="inherited">Inherited</div>
89
 
<div class="attr_name">SetSize(Size)</div>
90
 
<div class="desc">Set the size of the string.<br />&nbsp;&nbsp;&nbsp;&nbsp;Size : New size, in pixels<br /></div>
91
 
<div class="attr_name">SetStyle(TextSize)</div>
92
 
<div class="desc">Set the style of the text. The default style is Regular.<br />&nbsp;&nbsp;&nbsp;&nbsp;TextSize : New text style, (combination of Style values)<br /></div>
93
 
<div class="attr_name">SetText(UnicodeText) or SetText(Text, Encoding='utf8')</div>
94
 
<div class="desc">Set the text. Valid encodings are 'utf8', 'utf16' and 'utf32'.<br />&nbsp;&nbsp;&nbsp;&nbsp;Text : New text<br /></div>
95
 
<div class="attr_name">SetX(X)</div>
96
 
<div class="desc">Set the X position of the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;X : New X coordinate<br /></div>
97
 
<div class="inherited">Inherited</div>
98
 
<div class="attr_name">SetY(Y)</div>
99
 
<div class="desc">Set the Y position of the object.<br />&nbsp;&nbsp;&nbsp;&nbsp;Y : New Y coordinate<br /></div>
100
 
<div class="inherited">Inherited</div>
101
 
<div class="attr_name">TransformToGlobal(X, Y)</div>
102
 
<div class="desc">Transform a point from local coordinates into global coordinates (ie it applies the object's center, translation, rotation and scale to the point). Returns a tuple.<br />&nbsp;&nbsp;&nbsp;&nbsp;X : X coordinate of the point to transform<br />&nbsp;&nbsp;&nbsp;&nbsp;Y : Y coordinate of the point to transform<br /></div>
103
 
<div class="inherited">Inherited</div>
104
 
<div class="attr_name">TransformToLocal(X, Y)</div>
105
 
<div class="desc">Transform a point from global coordinates into local coordinates (ie it applies the inverse of object's center, translation, rotation and scale to the point). Returns a tuple.<br />&nbsp;&nbsp;&nbsp;&nbsp;X : X coordinate of the point to transform<br />&nbsp;&nbsp;&nbsp;&nbsp;Y : Y coordinate of the point to transform<br /></div>
106
 
<div class="inherited">Inherited</div>
107
 
<br />
108
 
<br />
109
 
<br />
110
 
 
111
 
        <p id="footer">
112
 
            &nbsp;::&nbsp; Copyright &copy; 2007-2008 Rémi Koenig &nbsp;::&nbsp;
113
 
        </p>
114
 
 
115
 
    </body>
116
 
</html>