Defines the Label class.
A label used by overlays.
Label is not a Component; it’s just an object encapsulating text settings and appearance attributes. It can be used by components that need text labels to store state, perform layout, and render the text.
The background color of the label.
The color of the border.
Whether or not the border is visible
The width of the label border. If it is 0, then it is not shown.
The color of the label text.
Draws the label.
This method assumes the graphics context has been translated to the correct position such that the origin is at the lower left-hand corner of this text label’s box.
font= KivaFont("modern 10")¶
The font of the label text.
Returns a rectangular bounding box for the Label as (width,height).
Returns a list [(x0,y0), (x1,y1),…] of tuples representing a polygon that bounds the label.
Returns the width and height of the label, in the rotated frame of reference.
Number of pixels of spacing between lines of text.
Number of pixels of margin around the label, for both X and Y dimensions.
Number of pixels to limit the width of the label to. Lines which are too long will be broken to fit on word boundaries. Line width is calculated without considering the value of margin. A max_width of 0.0 means that lines will not be broken.
The angle of rotation of the label.
The label text. Carriage returns (n) are always connverted into line breaks.