Loading...
Searching...
No Matches
com.navigine.idl.java.Rectangle Class Reference

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

Public Member Functions

 Rectangle (int x, int y, int width, int height)
 Default constructor for class Rectangle.
 
int getX ()
 rectangle's origin x coordinate.
 
int getY ()
 rectangle's origin y coordinate.
 
int getWidth ()
 rectangle's width.
 
int getHeight ()
 rectangle's height.
 
String toString ()
 

Detailed Description

A rectangle with specified origin and size.

Java code snippet:

// Create rectangle with x, y, width, height
Rectangle rect1 = new Rectangle(10, 20, 100, 150);
System.out.println("Created rectangle: x=" + rect1.getX() + ", y=" + rect1.getY() +
", width=" + rect1.getWidth() + ", height=" + rect1.getHeight());

Kotlin code snippet:

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

Definition at line 23 of file Rectangle.java.

Constructor & Destructor Documentation

◆ Rectangle()

com.navigine.idl.java.Rectangle.Rectangle ( int x,
int y,
int width,
int height )
inline

Default constructor for class Rectangle.

Definition at line 37 of file Rectangle.java.

Member Function Documentation

◆ getHeight()

int com.navigine.idl.java.Rectangle.getHeight ( )
inline

rectangle's height.

Returns

Definition at line 79 of file Rectangle.java.

◆ getWidth()

int com.navigine.idl.java.Rectangle.getWidth ( )
inline

rectangle's width.

Returns

Definition at line 70 of file Rectangle.java.

◆ getX()

int com.navigine.idl.java.Rectangle.getX ( )
inline

rectangle's origin x coordinate.

Returns

Definition at line 53 of file Rectangle.java.

◆ getY()

int com.navigine.idl.java.Rectangle.getY ( )
inline

rectangle's origin y coordinate.

Returns

Definition at line 61 of file Rectangle.java.

◆ toString()

String com.navigine.idl.java.Rectangle.toString ( )
inline

Definition at line 84 of file Rectangle.java.


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