| 159 | } |
| 160 | |
| 161 | void ImageView::setTextureRect(const Rect& rect) |
| 162 | { |
| 163 | // This API should be refactor |
| 164 | if (_scale9Enabled) |
| 165 | {} |
| 166 | else |
| 167 | { |
| 168 | auto sprite = _imageRenderer->getSprite(); |
| 169 | if (sprite) |
| 170 | { |
| 171 | sprite->setTextureRect(rect); |
| 172 | } |
| 173 | else |
| 174 | { |
| 175 | AXLOGD("Warning!! you should load texture before set the texture's rect!"); |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | void ImageView::setScale9Enabled(bool able) |
| 181 | { |
no test coverage detected