_rotopaint.Stroke

Module _rotopaint :: Class Stroke |
[hide private]
[frames] | no frames]

# Class Stroke

    object --+
             |
       Element --+
                 |
                Stroke

A paint stroke, which may be animated.

A paint stroke is represented as a sequence of AnimControlPoint objects. You can find out how many control points there are in the stroke using python's built-in len() function; and you can access individual control points using the array-style syntax (e.g. stroke[0] returns the first control point, stroke[-1] returns the last control point, etc.).

Instance Methods | [hide private]
__delattr__(...) x.__delattr__('name') <==> del x.name |
__getattribute__(...) x.__getattribute__('name') <==> x.name |
__getitem__(x, y) x[y] |
__len__(x) len(x) |
a new object with type S, a subtype of T |
__new__(T, S, ...) |
__setattr__(...) x.__setattr__('name', value) <==> x.name = value |
None |
append(self, controlPoint) Add a new control point to the stroke. |
CubicCurve |
evaluate(self, time, viewName='default') Bake out a curve for the path of this stroke at the specified time. |
AnimAttributes |
getAttributes(self) Gets the collection of attributes for this stroke. |
bool |
getFlag(self, flag) Check whether a particular flag is set or not. |
AnimCTransform |
getTransform(self) Gets the transform for this shape. |
None |
insert(self, index, controlPoint) Insert a new control point in the stroke before the given index. |
None |
remove(self, index) Remove the control point at the given index. |
None |
setFlag(self, flag, value) Set a particular flag. |
Inherited from `Element`: `getVisible`, `setVisible` Inherited from `object`: `__format__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
Inherited from `Element`: `locked`, `name` Inherited from `object`: `__class__`

Method Details | [hide private]

### __delattr__(...) |
x.__delattr__('name') <==> del x.name Overrides: object.__delattr__

### __getattribute__(...) |
x.__getattribute__('name') <==> x.name Overrides: object.__getattribute__

### __new__(T, S, ...) |
Returns: a new object with type S, a subtype of T Overrides: object.__new__

### __setattr__(...) |
x.__setattr__('name', value) <==> x.name = value Overrides: object.__setattr__

### append(self, controlPoint) |
Add a new control point to the stroke. The controlPoint parameter must be either an instance of the AnimControlPoint class, or something we can convert to an AnimControlPoint. This includes a sequence of 2, 3 or 4 floats; or a CVec2, CVec3 or CVec4 object. Returns: None

### evaluate(self, time, viewName='default') |
Bake out a curve for the path of this stroke at the specified time. Parameters: `time` - The (floating point) frame number to bake the curve from. `viewName` - Optional parameter specifying which view to bake the curve from. If omitted, the default view will be used. Returns: CubicCurve

### getFlag(self, flag) |
Check whether a particular flag is set or not. The flag parameter should be one of the constants from the FlagType class. The return value will be True if the flag is set, False if it isn't. Returns: bool

### insert(self, index, controlPoint) |
Insert a new control point in the stroke before the given index. The controlPoint parameter must be either an instance of the AnimControlPoint class, or something we can convert to an AnimControlPoint. This includes a sequence of 2, 3 or 4 floats; or a CVec2, CVec3 or CVec4 object. Returns: None

### remove(self, index) |
Remove the control point at the given index. If the index is out of bounds, an IndexError will be raised. Returns: None

### setFlag(self, flag, value) |
Set a particular flag. The flag parameter specifies which flag to set and should be one of the constants from the FlagType class. The value parameter is a boolean value; True will set the flag, False will clear it. Returns: None