Loading...
Searching...
No Matches
Rectangle Class Reference

A rectangle with specified origin and size. More...

Public Member Functions

 Rectangle (this.x, this.y, this.width, this.height)
 Default constructor.
 

Public Attributes

int x
 rectangle's origin x coordinate.
 
int y
 rectangle's origin y coordinate.
 
int width
 rectangle's width.
 
int height
 rectangle's height.
 

Detailed Description

A rectangle with specified origin and size.

Dart code snippet:

// Create rectangle with x, y, width, height
Rectangle rect1 = Rectangle(10, 20, 100, 150);
print(
"Created rectangle: x=${rect1.x}, y=${rect1.y}, width=${rect1.width}, height=${rect1.height}",
);

Definition at line 23 of file rectangle.dart.

Constructor & Destructor Documentation

◆ Rectangle()

Rectangle.Rectangle ( this. x,
this. y,
this. width,
this. height )

Default constructor.

Member Data Documentation

◆ height

int Rectangle.height

rectangle's height.

Definition at line 48 of file rectangle.dart.

◆ width

int Rectangle.width

rectangle's width.

Definition at line 42 of file rectangle.dart.

◆ x

int Rectangle.x

rectangle's origin x coordinate.

Definition at line 31 of file rectangle.dart.

◆ y

int Rectangle.y

rectangle's origin y coordinate.

Definition at line 36 of file rectangle.dart.


The documentation for this class was generated from the following file: