enable.label module

Defines the Label class.

class enable.label.Label(text='', **kwtraits)[source]

Bases: enable.component.Component

A text label

get_bounding_box(gc)[source]

Returns a rectangular bounding box for the Label as (width,height).

get_bounding_poly(gc)[source]

Returns a list [(x0,y0), (x1,y1),…] of tuples representing a polygon that bounds the label.

get_width_height(gc)[source]

Returns the width and height of the label, in the rotated frame of reference.