Positioning System
The Arabic Animations library provides a flexible positioning system for placing text elements on the screen.
Position Types
The following position types are available through the Position
enum:
Position.TOP
: Center-aligned at the topPosition.BOTTOM
: Center-aligned at the bottomPosition.LEFT
: Left-aligned at vertical centerPosition.RIGHT
: Right-aligned at vertical centerPosition.CENTER
: Centered both horizontally and verticallyPosition.TOP_LEFT
: Aligned to top-left cornerPosition.TOP_RIGHT
: Aligned to top-right cornerPosition.BOTTOM_LEFT
: Aligned to bottom-left cornerPosition.BOTTOM_RIGHT
: Aligned to bottom-right corner
Padding
The Padding
class allows you to add space around text elements:
# Add padding to all sides
padding = Padding.all(20)
# Add horizontal padding only
padding = Padding.horizontal(50)
# Add vertical padding only
padding = Padding.vertical(30)
# Custom padding for each side
padding = Padding(top=20, right=40, bottom=20, left=40)