C-Struct for AnimationStackElement See Macro/PixelMap/pixel.h
| 245 | |
| 246 | |
| 247 | class AnimationStackElement( Structure ): |
| 248 | ''' |
| 249 | C-Struct for AnimationStackElement |
| 250 | See Macro/PixelMap/pixel.h |
| 251 | ''' |
| 252 | _fields_ = [ |
| 253 | ( "trigger", POINTER( TriggerMacro ) ), |
| 254 | ( "index", c_uint16 ), |
| 255 | ( "pos", c_uint16 ), |
| 256 | ( "subpos", c_uint8 ), |
| 257 | ( "loops", c_uint8 ), |
| 258 | ( "framedelay", c_uint8 ), |
| 259 | ( "frameoption", c_uint8 ), |
| 260 | ( "ffunc", c_uint8 ), |
| 261 | ( "pfunc", c_uint8 ), |
| 262 | ( "replace", c_uint8 ), |
| 263 | ( "state", c_uint8 ), |
| 264 | ] |
| 265 | |
| 266 | def frameoption_lookup(self): |
| 267 | ''' |
| 268 | Do lookup on frameoption |
| 269 | |
| 270 | Options are set using each bit |
| 271 | |
| 272 | @returns: String name of frameoption index |
| 273 | ''' |
| 274 | output = [] |
| 275 | if self.frameoption & 1: |
| 276 | output.append('framestretch') |
| 277 | |
| 278 | return output |
| 279 | |
| 280 | def ffunc_lookup(self): |
| 281 | ''' |
| 282 | Do lookup on ffunc (Frame Function) |
| 283 | |
| 284 | @returns: String name of ffunc index |
| 285 | ''' |
| 286 | lookup = { |
| 287 | 0: 'off', |
| 288 | } |
| 289 | return lookup[self.ffunc] |
| 290 | |
| 291 | def pfunc_lookup(self): |
| 292 | ''' |
| 293 | Do lookup on pfunc (Pixel Function) |
| 294 | |
| 295 | @returns: String name of pfunc index |
| 296 | ''' |
| 297 | lookup = { |
| 298 | 0: 'off', |
| 299 | 1: 'interp', |
| 300 | } |
| 301 | return lookup[self.pfunc] |
| 302 | |
| 303 | def __repr__(self): |
| 304 | val = "(trigger={}, index={}, pos={}, subpos={}, loops={}, framedelay={}, frameoption={}, ffunc={}, pfunc={})".format( |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…