| 297 | } |
| 298 | |
| 299 | IntVar |
| 300 | pairWithOffsets(Home home, IntVar x, int xoff, int w, IntVar y, int yoff, int h) { |
| 301 | IntVar xy(home,0,w*h-1); |
| 302 | if (xoff==0 && yoff==0) { |
| 303 | if (Int::Element::Pair::post(home,x,y,xy,w,h) != ES_OK) |
| 304 | home.fail(); |
| 305 | } else { |
| 306 | Int::OffsetView xo(x,xoff); |
| 307 | Int::OffsetView yo(y,yoff); |
| 308 | if (Int::Element::PairWithOffsets::post(home,xo,yo,xy,w,h) != ES_OK) |
| 309 | home.fail(); |
| 310 | } |
| 311 | return xy; |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | void |