ContentMode¶
- class pyto_ui.ContentMode(*values)¶
Options to specify how a view adjusts its content when its size changes.
- BOTTOM = 6¶
The option to center the content aligned at the bottom in the view’s bounds.
- BOTTOM_LEFT = 11¶
The option to align the content in the bottom-left corner of the view.
- BOTTOM_RIGHT = 12¶
The option to align the content in the bottom-right corner of the view.
- CENTER = 4¶
The option to center the content in the view’s bounds, keeping the proportions the same.
- LEFT = 7¶
The option to align the content on the left of the view.
- REDRAW = 3¶
The option to redisplay the view when the bounds change by invoking the
setNeedsDisplay()method.
- RIGHT = 8¶
The option to align the content on the right of the view.
- SCALE_ASPECT_FILL = 2¶
The option to scale the content to fill the size of the view. Some portion of the content may be clipped to fill the view’s bounds.
- SCALE_ASPECT_FIT = 1¶
The option to scale the content to fit the size of the view by maintaining the aspect ratio. Any remaining area of the view’s bounds is transparent.
- SCALE_TO_FILL = 0¶
The option to scale the content to fit the size of itself by changing the aspect ratio of the content if necessary.
- TOP = 5¶
The option to center the content aligned at the top in the view’s bounds.
- TOP_LEFT = 9¶
The option to align the content in the top-left corner of the view.
- TOP_RIGHT = 10¶
The option to align the content in the top-right corner of the view.