API Reference for Enthought Tool Suite 3.0.1
Pure-Python reference implementation of a Kiva graphics context.
Currently fill just compares the two colors.
Tests a color array to see whether it is fully transparent or not.
This is true if the alpha value (4th entry in the color array) is 0.0.
Compares two LineState objects to see if they are equivalent.
This is generally called by device-specific drawing routines before they stroke a path. It determines whether previously set line settings are equivalent to desired line settings for this drawing command. If true, the routine can bypass all the work needed to set all the line settings of the graphics device.
With the current Python implementation, this may not provide any time savings over just setting all the graphics state values. However, in C this could be a very fast memcmp if the C structure is set up correctly.
While this could be the __cmp__ method for LineState, I have left it as a function because I think it will move to C and be used to compare structures.
© Copyright 2002-2008 Enthought, Inc.