API Reference for Enthought Tool Suite 3.0.1
Define a base set of constants and functions used by the remainder of the Enable package.
BOTTOM = 8
BOTTOM_LEFT = (BOTTOM + LEFT)
BOTTOM_RIGHT = (BOTTOM + RIGHT)
default_font = str_to_font(None, None, default_font_name)
Pick a default font that should work on all platforms.
default_font_name = 'modern 10'
EMBOSSED = 2
Special 'empty rectangle' indicator:
empty_rectangle = -Const(1)
Text engraving style:
ENGRAVED = 1
engraving_style = { Const('none') : Const(0), Const('engraved') : Name('ENGRAVED'), Const('embossed') : Name('EMBOSSED'), Const('shadowed') : Name('SHADOWED') }
font_families = { Const('default') : Name('DEFAULT'), Const('decorative') : Name('DECORATIVE'), Const('roman') : Name('ROMAN'), Const('script') : Name('SCRIPT'), Const('swiss') : Name('SWISS'), Const('modern') : Name('MODERN') }
font_noise = [ 'pt', 'point', 'family' ]
font_styles = { Const('italic') : Name('ITALIC') }
font_weights = { Const('bold') : Name('BOLD') }
A dummy graphics context just used to calculate font metrics: gc_temp = GraphicsContext( ( 1, 1 ) )
gc_temp = font_metrics_provider()
Used to offset positions by half a pixel and bounding width/height by 1. TODO: Resolve this in a more intelligent manner.
half_pixel_bounds_inset = (0.5, 0.5, -Const(1.0), -Const(1.0))
HCENTER = 2
LEFT = 4
RIGHT = 1
SHADOWED = 3
Positions:
TOP = 32
TOP_LEFT = (TOP + LEFT)
TOP_RIGHT = (TOP + RIGHT)
VCENTER = 16
Add two bounds or coordinate rectangles
Compute the bounding box for a set of components
Return the bounding rectangle for a list of rectangles
Convert a bounds rectangle to a coordinate rectangle
Convert a coordinates rectangle to a bounds rectangle
Convert a coordinates rectangle to a size tuple
Return the disjoint intersection of an already disjoint list of rectangles and a new rectangle:
Return the disjoint union of an already disjoint list of rectangles and a new rectangle:
Return whether a rectangle intersects a disjoint set of rectangles anywhere
Draws a filled rectangle with border.
Convert an image file name to a cached Kiva gc containing the image
Compute the intersection of two bounds rectangles
Compute the intersection of two coordinate based rectangles
Send an event to a specified set of components until it is 'handled'
Converts a (somewhat) free-form string into a valid Font object.
Generate all of the classes (and subclasses) for a specified class
Compute the union of two bounds rectangles
Compute the union of two coordinate based rectangles
Test whether a specified (x,y) point is in a specified bounds
| Local name | Refers to |
|---|---|
| abspath | os.path.abspath |
| BOLD | enthought.kiva.constants.BOLD |
| color_table | enthought.enable.colors.color_table |
| DECORATIVE | enthought.kiva.constants.DECORATIVE |
| DEFAULT | enthought.kiva.constants.DEFAULT |
| dirname | os.path.dirname |
| Font | enthought.kiva.fonttools.font.Font |
| generators | __future__.generators |
| is_zipfile | zipfile.is_zipfile |
| ITALIC | enthought.kiva.constants.ITALIC |
| join | os.path.join |
| MODERN | enthought.kiva.constants.MODERN |
| NORMAL | enthought.kiva.constants.NORMAL |
| ROMAN | enthought.kiva.constants.ROMAN |
| SCRIPT | enthought.kiva.constants.SCRIPT |
| splitext | os.path.splitext |
| StringIO | cStringIO.StringIO |
| SWISS | enthought.kiva.constants.SWISS |
| sys | sys |
| TraitError | enthought.traits.trait_errors.TraitError |
| transparent_color | enthought.enable.colors.transparent_color |
| TupleType | types.TupleType |
| TypeType | types.TypeType |
| ZipFile | zipfile.ZipFile |
© Copyright 2002-2008 Enthought, Inc.