Skip to main content

Rect

Draws a rectangle.

Inherits: canvas.Shape

Properties

  • border_radius - The border radius of this rectangle.
  • height - The height of this rectangle.
  • paint - A style to draw this rectangle with.
  • width - The width of this rectangle.
  • x - The x-axis coordinate of this rectangle's top left point.
  • y - The y-axis coordinate of this rectangle's top left point.

Properties

border_radiusclass-attributeinstance-attribute

border_radius: BorderRadiusValue = field(default_factory=(lambda: BorderRadius.all(0)))

The border radius of this rectangle.

heightclass-attributeinstance-attribute

height: Number = 0

The height of this rectangle.

paintclass-attributeinstance-attribute

paint: Paint = field(default_factory=(lambda: Paint()))

A style to draw this rectangle with.

widthclass-attributeinstance-attribute

width: Number = 0

The width of this rectangle.

xinstance-attribute

x: Number

The x-axis coordinate of this rectangle's top left point.

yinstance-attribute

y: Number

The y-axis coordinate of this rectangle's top left point.