Inherits from
- Category: enthought.traits.category.Category
- AbstractComponent: abstract_component.AbstractComponent
Attributes
- backbuffer_padding
Should the backbuffer include the padding area? TODO: verify that backbuffer invalidation occurs if this attribute is changed.
backbuffer_padding = Bool(True)
- bgcolor
The background color of this component. By default all components have a white background. This can be set to "transparent" or "none" if the component should be see-through.
bgcolor = white_color_trait
- border_color
The color of the border. Only used if border_visible is True.
border_color = black_color_trait
- border_dash
The line style (i.e. dash pattern) of the border.
border_dash = LineStyle
- border_visible
Is the border visible? If this is false, then all the other border properties are not
border_visible = Bool(False)
- border_width
The width of the border around this component. This is taken into account during layout, but only if the border is visible.
border_width = Int(1)
- draw_layer
If unified_draw is True for this component, then this attribute determines what layer it will be drawn on. This is used by containers and external classes whose drawing loops will call this component.
draw_layer = Enum(RenderController.LAYERS)
- draw_order
A list of the order in which various layers of this component should be rendered. This is only used if the component does unified draw.
draw_order = List
- draw_valid
Reflects the validity state of the backbuffer. This is usually set by the component itself or set on the component by calling _invalidate_draw(). It is exposed as a public trait for the rare cases when another components wants to know the validity of this component's backbuffer, i.e. if a draw were to occur, whether the component would actually change.
draw_valid = Bool(False)
- fill_padding
Should the padding area be filled with the background color?
fill_padding = Bool(False)
- inset_border
Should the border be drawn inset (on the plot) or outside the plot area?
inset_border = Bool(True)
- overlay_border
Should the border be drawn as part of the overlay or the background?
overlay_border = Bool(True)
- render_controller
The controller that determines how this component renders. By default, this is the singleton
render_controller = Instance(AbstractRenderController, factory = DefaultRenderController)
- unified_draw
Does this container prefer to draw all of its components in one pass, or does it prefer to cooperate in its container's layer-by-layer drawing? If unified_draw is on, then this component will draw as a unified whole, and its parent container will call our _draw() method when drawing the layer indicated in self.draw_layer. If unified_draw is off, then our parent container will call self._dispatch_draw() with the name of each layer as it goes through its list of layers.
unified_draw = Bool(False)
- use_backbuffer
Should this component do a backbuffered draw, i.e. render itself to an offscreen buffer that is cached for later use? If False, then the component will never render itself backbufferd, even if explicitly asked to do so.
use_backbuffer = Bool(False)
- visible
Is the component visible?
visible = Bool(True)
Method summary
- draw(self, gc, view_bounds = None, mode = 'default')
Methods
- draw(self, gc, view_bounds = None, mode = 'default')
Renders this component onto a GraphicsContext.
"view_bounds" is a 4-tuple (x, y, dx, dy) of the viewed region relative to the CTM of the gc.
"mode" can be used to require this component render itself in a particular fashion, and can be "default" or any of the enumeration values of self.default_draw_mode.