Copy link to clipboard
Copied
Using the PDETextIsAtRect function I discovered that if returns element that are not part of bounding box. So I wanted to know if I have two bounding boxes is it possible to check if the bounding box of one element can be found within the bounding bx of another element.
1 Correct answer
That's not valid C. Well, clearly it compiles but it very much doesn't do what you think. You cannot use the form a <= b <= c, only compare TWO things, not three.
Copy link to clipboard
Copied
Just use standard polygon containment to determine that.
Copy link to clipboard
Copied
Can you explain more? I'm still a little confused. Do you mean that I can use the x y coordinated?
Copy link to clipboard
Copied
So I tried to use the following if statement with newRect being the ASFixedRect element I'm checking to see is within boundingRect, however I am getting addition text run
if((boundingRect.left <= newRect.left <= boundingRect.right) && (boundingRect.left <= newRect.right <= boundingRect.right) && (boundingRect.bottom <= newRect.bottom <= boundingRect.top) && (boundingRect.bottom <= newRect.top <= boundingRect.top))
Copy link to clipboard
Copied
That's not valid C. Well, clearly it compiles but it very much doesn't do what you think. You cannot use the form a <= b <= c, only compare TWO things, not three.

