Sprites from spritesheet generated by TexturePacker are cropped

I used TexturePacker to create a spritesheet and a PLIST to contain them. The problem is that, it doesn’t show the whole sprite but only a part of it.

If you look at the trees, there are colored parts, the most obvious one is the one with G. It’s supposed to be a 96x96 circle.

Here’s how I draw them:

void Fruit::draw() {
    char l_file[24];
    sprintf( l_file, "fruit_%d_%d.png", getType(), getState() );

    CCSpriteFrameCache::sharedSpriteFrameCache() -> addSpriteFramesWithFile("fruits.plist");
    CCSpriteFrame * l_SpriteFrame = CCSpriteFrameCache::sharedSpriteFrameCache() -> spriteFrameByName( l_file );

    if ( l_SpriteFrame != NULL ) {
        std::cout << "[ TEST ] " << l_SpriteFrame -> getTexture() -> getName() << std::endl;
        this -> m_Sprite = CCSprite::create( l_SpriteFrame );
    } else {
        GGFGraphics::GGFLOG( "Cannot find sprite in spritesheet. Will use raw image instead.", 'w' );
        this -> m_Sprite = CCSprite::create( l_file );
    }

    this -> m_Sprite -> setScale( GGFGraphics::scalingFactor );
    this -> m_Sprite -> setPosition( GGFGraphics::treePos.at( Profile::garden ).at( m_Slot ) );
    this -> setDefaultPosition( m_Sprite -> getPosition( ).x, m_Sprite -> getPosition( ).y );
}

I have set a batch node in the main layer, too. Any help?

Solved it now. lol silly me.

I was using setTexture( ) on one of my update methods and that setTexture( ) is still using the raw PNG files and not the spritesheet files.
So the trick is to use getTexture( ) of the CCSpriteFrame object. Like so:

void Fruit::updateTexture( ) {
    char newskin[32];
    sprintf( newskin, "fruit_%d_%d.png", getType(), getState() );
    CCSpriteFrame * l_SpriteFrame = CCSpriteFrameCache::sharedSpriteFrameCache() -> spriteFrameByName( newskin );

    this -> getSprite() -> setTexture( l_SpriteFrame -> getTexture() );
    this -> getSprite() -> setTextureRect( l_SpriteFrame -> getRect( ) );
}

Hope this helps other people.