- clipw = min(max(clipx, parent == null ? 0 : globalx) + clipw, (parent == null ? 0 : globalx) + width) - globalx;
- cliph = min(max(clipy, parent == null ? 0 : globaly) + cliph, (parent == null ? 0 : globaly) + height) - globaly;
- clipx = max(clipx, parent == null ? 0 : globalx);
- clipy = max(clipy, parent == null ? 0 : globaly);
+ if ((flags & NOCLIP_FLAG) == 0) {
+ clipw = min(max(clipx, parent == null ? 0 : globalx) + clipw, (parent == null ? 0 : globalx) + width) - globalx;
+ cliph = min(max(clipy, parent == null ? 0 : globaly) + cliph, (parent == null ? 0 : globaly) + height) - globaly;
+ clipx = max(clipx, parent == null ? 0 : globalx);
+ clipy = max(clipy, parent == null ? 0 : globaly);
+ }