Loading...
Searching...
No Matches

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

#include <com/navigine/idl/objc/NCRectangle.h>

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithX:y:width:height:
 Default constructor for class NCRectangle.
 

Class Methods

(nonnull instancetype) + rectangleWithX:y:width:height:
 Factory method for class NCRectangle.
 

Properties

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

Detailed Description

A rectangle with specified origin and size.

Swift code snippet:

// Create rectangle with x, y, width, height
let rect1 = Rectangle(x: 10, y: 20, width: 100, height: 150)
print("Created rectangle: x=\‍(rect1.x), y=\‍(rect1.y), width=\‍(rect1.width), height=\‍(rect1.height)")

Objective C code snippet:

// Create rectangle with x, y, width, height
NCRectangle *rect1 = [[NCRectangle alloc] initWithX:10 y:20 width:100 height:150];
NSLog(@"Created rectangle: x=%d, y=%d, width=%d, height=%d", rect1.x, rect1.y, rect1.width, rect1.height);

Definition at line 25 of file NCRectangle.h.

Method Documentation

◆ initWithX:y:width:height:

- (nonnull instancetype) initWithX: (int32_t) x
y: (int32_t) y
width: (int32_t) width
height: (int32_t) height 

Default constructor for class NCRectangle.

◆ rectangleWithX:y:width:height:

+ (nonnull instancetype) rectangleWithX: (int32_t) x
y: (int32_t) y
width: (int32_t) width
height: (int32_t) height 

Factory method for class NCRectangle.

Property Documentation

◆ height

- (int32_t) height
readnonatomicassign

rectangle's height.

Definition at line 68 of file NCRectangle.h.

◆ width

- (int32_t) width
readnonatomicassign

rectangle's width.

Definition at line 61 of file NCRectangle.h.

◆ x

- (int32_t) x
readnonatomicassign

rectangle's origin x coordinate.

Definition at line 48 of file NCRectangle.h.

◆ y

- (int32_t) y
readnonatomicassign

rectangle's origin y coordinate.

Definition at line 54 of file NCRectangle.h.


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