Report bug for CCScrollView

Report bug for CCScrollView
0.0 0


I have a CCScrollView is a child of CCLayer.
The problem:
When CCLayer scaled, the CCScrollView’s clip bound is wrong. Can anyone support me for it?


Can anyone support me this problem?


I have this problem.


I guess the problem is with the setScissorInPoints points.

I’m using the following code in a class I’ve made for my internal purposes but it works for me.

Try using something similar to this code:

    CCPoint screenPos = this->getParent()->convertToWorldSpace(this->getPosition());

    CCPoint scalePos = this->getParent()->convertToWorldSpace(ccp(1,1));

    float sx = scalePos.x;
    float sy = scalePos.y;

    float w =  this->boundingBox().size.width * sx;
    float h =  this->boundingBox().size.height * sy;

    screenPos.x -= w / 2.0f;
    screenPos.y -= h / 2.0f;

    CCEGLView::sharedOpenGLView()->setScissorInPoints(screenPos.x , screenPos.y, w, h);