| 1048 | } |
| 1049 | |
| 1050 | void UINode::nodeDraw() { |
| 1051 | if ( mVisible ) { |
| 1052 | if ( mNodeFlags & NODE_FLAG_POSITION_DIRTY ) |
| 1053 | updateScreenPos(); |
| 1054 | |
| 1055 | if ( mNodeFlags & NODE_FLAG_POLYGON_DIRTY ) |
| 1056 | updateWorldPolygon(); |
| 1057 | |
| 1058 | matrixSet(); |
| 1059 | |
| 1060 | bool needsClipPlanes = |
| 1061 | mClip.getClipType() != ClipType::None && isMeOrParentTreeScaledOrRotatedOrFrameBuffer(); |
| 1062 | |
| 1063 | smartClipStart( ClipType::BorderBox, needsClipPlanes ); |
| 1064 | |
| 1065 | bool intersected = mWorldBounds.intersect( mSceneNode->getWorldBounds() ); |
| 1066 | |
| 1067 | if ( intersected ) { |
| 1068 | smartClipStart( ClipType::ContentBox, needsClipPlanes ); |
| 1069 | |
| 1070 | if ( 0.f != mAlpha ) { |
| 1071 | drawBackground(); |
| 1072 | |
| 1073 | drawSkin(); |
| 1074 | } |
| 1075 | |
| 1076 | smartClipStart( ClipType::PaddingBox, needsClipPlanes ); |
| 1077 | |
| 1078 | draw(); |
| 1079 | |
| 1080 | drawChildren(); |
| 1081 | |
| 1082 | smartClipEnd( ClipType::PaddingBox, needsClipPlanes ); |
| 1083 | |
| 1084 | if ( 0.f != mAlpha ) |
| 1085 | drawForeground(); |
| 1086 | |
| 1087 | smartClipEnd( ClipType::ContentBox, needsClipPlanes ); |
| 1088 | } else if ( !isClipped() ) { |
| 1089 | drawChildren(); |
| 1090 | } |
| 1091 | |
| 1092 | if ( intersected ) |
| 1093 | drawBorder(); |
| 1094 | |
| 1095 | if ( mNodeFlags & NODE_FLAG_DROPPABLE_HOVERING ) |
| 1096 | drawDroppableHovering(); |
| 1097 | |
| 1098 | if ( intersected ) { |
| 1099 | drawHighlightFocus(); |
| 1100 | |
| 1101 | drawOverNode(); |
| 1102 | |
| 1103 | updateDebugData(); |
| 1104 | |
| 1105 | drawBox(); |
| 1106 | } |
| 1107 |
no test coverage detected