1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| Quintiq file version 2.0
| #parent: #root
| Method Overlap (
| Number x,
| Number y,
| Number width,
| Number height
| ) declarative remote as Boolean
| {
| Description: 'Determine if a node is overlapping with an area'
| TextBody:
| [*
| ulx := maxvalue( this.X(), x );
| uly := maxvalue( this.Y(), y );
| lrx := minvalue( this.X() + this.Width(), x + width );
| lry := minvalue( this.Y() + this.Height(), y + height );
|
| return ulx <= lrx and uly <= lry;
| *]
| }
|
|