| 206 | } |
| 207 | |
| 208 | void SubSkin::doRender() |
| 209 | { |
| 210 | if (!mVisible || mEmptyView) |
| 211 | return; |
| 212 | |
| 213 | VertexQuad* quad = reinterpret_cast<VertexQuad*>(mRenderItem->getCurrentVertexBuffer()); |
| 214 | |
| 215 | const RenderTargetInfo& info = mRenderItem->getRenderTarget()->getInfo(); |
| 216 | |
| 217 | float vertex_z = mNode->getNodeDepth(); |
| 218 | |
| 219 | float vertex_left = |
| 220 | ((info.pixScaleX * (float)(mCurrentCoord.left + mCroppedParent->getAbsoluteLeft() - info.leftOffset) + |
| 221 | info.hOffset) * |
| 222 | 2) - |
| 223 | 1; |
| 224 | float vertex_right = vertex_left + (info.pixScaleX * (float)mCurrentCoord.width * 2); |
| 225 | float vertex_top = |
| 226 | -(((info.pixScaleY * (float)(mCurrentCoord.top + mCroppedParent->getAbsoluteTop() - info.topOffset) + |
| 227 | info.vOffset) * |
| 228 | 2) - |
| 229 | 1); |
| 230 | float vertex_bottom = vertex_top - (info.pixScaleY * (float)mCurrentCoord.height * 2); |
| 231 | |
| 232 | quad->set( |
| 233 | vertex_left, |
| 234 | vertex_top, |
| 235 | vertex_right, |
| 236 | vertex_bottom, |
| 237 | vertex_z, |
| 238 | mCurrentTexture.left, |
| 239 | mCurrentTexture.top, |
| 240 | mCurrentTexture.right, |
| 241 | mCurrentTexture.bottom, |
| 242 | mCurrentColour); |
| 243 | |
| 244 | mRenderItem->setLastVertexCount(VertexQuad::VertexCount); |
| 245 | } |
| 246 | |
| 247 | void SubSkin::_setColour(const Colour& _value) |
| 248 | { |
no test coverage detected