mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 09:55:34 -05:00
Compare commits
2 commits
c1413eb521
...
76f6ce8104
Author | SHA1 | Date | |
---|---|---|---|
|
76f6ce8104 | ||
|
d95a43be0b |
1 changed files with 4 additions and 4 deletions
|
@ -29,11 +29,11 @@ void ScrollLayer::visit() {
|
|||
glEnable(GL_SCISSOR_TEST);
|
||||
|
||||
if (this->getParent()) {
|
||||
CCPoint const offset = this->isIgnoreAnchorPointForPosition()
|
||||
? ccp(0, 0) : CCPoint(this->getContentSize() * -this->getAnchorPoint());
|
||||
// CCPoint const offset = this->isIgnoreAnchorPointForPosition()
|
||||
// ? ccp(0, 0) : CCPoint(this->getContentSize() * -this->getAnchorPoint());
|
||||
|
||||
auto const bottomLeft = this->convertToWorldSpace(ccp(0, 0) - offset);
|
||||
auto const topRight = this->convertToWorldSpace(this->getContentSize() - offset);
|
||||
auto const bottomLeft = this->convertToWorldSpace(ccp(0, 0));
|
||||
auto const topRight = this->convertToWorldSpace(this->getContentSize());
|
||||
CCSize const size = topRight - bottomLeft;
|
||||
|
||||
CCEGLView::get()->setScissorInPoints(bottomLeft.x, bottomLeft.y, size.width, size.height);
|
||||
|
|
Loading…
Reference in a new issue