File: contour.rst

package info (click to toggle)
fontparts 0.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,004 kB
  • sloc: python: 18,702; makefile: 216; javascript: 143
file content (226 lines) | stat: -rw-r--r-- 3,873 bytes parent folder | download | duplicates (4)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
.. highlight:: python
.. module:: fontParts.base

#######
Contour
#######

***********
Description
***********

A Contour is a single path of any number of points. A Glyph usually consists of a couple of contours, and this is the object that represents each one. The :class:`Contour <BaseContour>` object offers access to the outline matter in various ways. The parent of :class:`Contour <BaseContour>` is usually :class:`Glyph <BaseGlyph>`.

********
Overview
********

Copy
====

.. autosummary::
    :nosignatures:

    BaseContour.copy

Parents
=======

.. autosummary::
    :nosignatures:

    BaseContour.glyph
    BaseContour.layer
    BaseContour.font

Identification
==============

.. autosummary::
    :nosignatures:

    BaseContour.identifier
    BaseContour.index

Winding Direction
=================

.. autosummary::
    :nosignatures:

    BaseContour.clockwise
    BaseContour.reverse

Queries
=======

.. autosummary::
    :nosignatures:

    BaseContour.bounds
    BaseContour.pointInside

Pens and Drawing
================

.. autosummary::
    :nosignatures:

    BaseContour.draw
    BaseContour.drawPoints

Segments
========

.. autosummary::
    :nosignatures:

    BaseContour.segments
    BaseContour.__len__
    BaseContour.__iter__
    BaseContour.__getitem__
    BaseContour.appendSegment
    BaseContour.insertSegment
    BaseContour.removeSegment
    BaseContour.setStartSegment
    BaseContour.autoStartSegment

bPoints
=======

.. autosummary::
    :nosignatures:

    BaseContour.bPoints
    BaseContour.appendBPoint
    BaseContour.insertBPoint

Points
======

.. autosummary::
    :nosignatures:

    BaseContour.points
    BaseContour.appendPoint
    BaseContour.insertPoint
    BaseContour.removePoint

Transformations
===============

.. autosummary::
    :nosignatures:

    BaseContour.transformBy
    BaseContour.moveBy
    BaseContour.scaleBy
    BaseContour.rotateBy
    BaseContour.skewBy

Normalization
=============

.. autosummary::
    :nosignatures:

    BaseContour.round

Environment
===========

.. autosummary::
    :nosignatures:

    BaseContour.naked
    BaseContour.changed

*********
Reference
*********

.. autoclass:: BaseContour

Copy
====

.. automethod:: BaseContour.copy

Parents
=======

.. autoattribute:: BaseContour.glyph
.. autoattribute:: BaseContour.layer
.. autoattribute:: BaseContour.font

Identification
==============

.. autoattribute:: BaseContour.identifier
.. autoattribute:: BaseContour.index

Winding Direction
=================

.. autoattribute:: BaseContour.clockwise
.. automethod:: BaseContour.reverse

Queries
=======

.. autoattribute:: BaseContour.bounds
.. automethod:: BaseContour.pointInside

Pens and Drawing
================

.. automethod:: BaseContour.draw
.. automethod:: BaseContour.drawPoints

Segments
========

.. autoattribute:: BaseContour.segments
.. automethod:: BaseContour.__len__
.. automethod:: BaseContour.__iter__
.. automethod:: BaseContour.__getitem__
.. automethod:: BaseContour.appendSegment
.. automethod:: BaseContour.insertSegment
.. automethod:: BaseContour.removeSegment
.. automethod:: BaseContour.setStartSegment
.. automethod:: BaseContour.autoStartSegment

bPoints
=======

.. autoattribute:: BaseContour.bPoints
.. automethod:: BaseContour.appendBPoint
.. automethod:: BaseContour.insertBPoint

Points
======

.. autoattribute:: BaseContour.points
.. automethod:: BaseContour.appendPoint
.. automethod:: BaseContour.insertPoint
.. automethod:: BaseContour.removePoint

Transformations
===============

.. automethod:: BaseContour.transformBy
.. automethod:: BaseContour.moveBy
.. automethod:: BaseContour.scaleBy
.. automethod:: BaseContour.rotateBy
.. automethod:: BaseContour.skewBy

Normalization
=============

.. automethod:: BaseContour.round

Environment
===========

.. automethod:: BaseContour.naked
.. automethod:: BaseContour.changed