Links |
---|
Indicates whether a Region is sufficiently and logically defined to represent a particular place on the screen.
isValid = IsRectValid()
Returns
- isValid
- boolean - True if sufficient, non-contradictory information is provided to position a region on the screen; otherwise false.
Notes
- Validly defined regions must have any of the following:
- Two opposing corners defined using Region:SetPoint or Region:SetAllPoints
- One corner defined using Region:SetPoint, and a size (width, height) defined using Region:SetSize or Region:SetWidth and Region:SetHeight
- Any of the above, substituting a corner with the center or two adjoining sides defined using Region:SetPoint
- However, regions become invalid if:
- The left corners are further across than the right ones
- The bottom corners are higher than the top ones
- One or more points are defined relative to another invalidly defined region
- Conflicts between Region:SetPoint and Region:SetSize resolve in favour of the former (ie, the explicit size is ignored) so these do not prevent a region from being validly defined.
See also
- Region:GetRect - Returns the lower-left corner, width and height of a region