MCPcopy Create free account
hub / github.com/axmolengine/axmol / setTextureRect

Method setTextureRect

core/ui/UIImageView.cpp:161–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void 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
180void ImageView::setScale9Enabled(bool able)
181{

Callers 6

setCapInsetsMethod · 0.45
updateProgressBarMethod · 0.45
MediaPlayerMethod · 0.45
updateVisualSliderMethod · 0.45

Calls 1

getSpriteMethod · 0.45

Tested by

no test coverage detected