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

Method setStretchEnabled

core/2d/Sprite.cpp:1373–1386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1371}
1372
1373void Sprite::setStretchEnabled(bool enabled)
1374{
1375 if (_stretchEnabled != enabled)
1376 {
1377 _stretchEnabled = enabled;
1378
1379 // disabled centerrect / number of slices if disabled
1380 if (!enabled)
1381 setCenterRectNormalized(Rect(0, 0, 1, 1));
1382
1383 updateStretchFactor();
1384 updatePoly();
1385 }
1386}
1387
1388bool Sprite::isStretchEnabled() const
1389{

Callers 5

createControlsMethod · 0.80
copyToMethod · 0.80
setupMethod · 0.80
addChildStencilsMethod · 0.80
Issue17119Method · 0.80

Calls 1

RectClass · 0.70

Tested by 3

setupMethod · 0.64
addChildStencilsMethod · 0.64
Issue17119Method · 0.64