Package Things :: Module ThingObjects :: Class Props
[frames] | no frames]

Class Props

object --+
         |
        Props

A Property

Make one (or more) of these to pass into thing.keys(). Describes the visual data of a thing, like x and y.

Use

prop = Props(x=100, y=20, a=0.2)

Instance Methods
 
__init__(self, x=0, y=0, a=1.0, rot=0.0, sx=1, sy=1, sz=None, rx=0, ry=0.0, r=0.0, g=0.0, b=0.0, tint=0.0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
tintlist(self)
 
__repr__(self)
repr(x)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, x=0, y=0, a=1.0, rot=0.0, sx=1, sy=1, sz=None, rx=0, ry=0.0, r=0.0, g=0.0, b=0.0, tint=0.0)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • x, y - Positional coordinate relative to the center of the screen.
  • a - Alpha; a float between 0 (transparent) and 1 (opaque).
  • rot - Rotation; in radians -- a full turn is pi*2
  • rx, ry - A point about which to rotate.
  • sx, sy - Scale; setting them to different values will distort and stretch your Thing. You can use the param sz to set both at once.
  • r, g, b, tint - RGB colour values; floats 0 to 1. Tint is amount of colour to use over Thing. Used to fade from one colour to another, with varying amounts. This will only take effect when tint is not 0. WARNING: Tinting it *slow*. It's better to have duplicate paths of differing colours, or to draw your own paths and control the stroke/fill colour manually.
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)