×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Can't draw gif animations..plz help

    Dear All,

    I am trying to draw gif animations in my N82 phone.Such that my program can display predefined .gif animation. So I am trying to get help following wiki reseource

    http://wiki.forum.nokia.com/index.ph...edition_phones

    But here coding is very short for me. I can not understand.specially what should be declaration of iGifFileDataprovider, igifanimationconfig,iGifAnimatior? Which class should be declared from ICLAnimationDataProvider.h & BasicAnimation.h into my header file.

    So can any one help me in details coding of this or any other example for drawing gif animation?

    Thanks

    Sabera

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Can't draw gif animations..plz help

    maybe you could use other gif exmples then, something like this for example: http://wiki.forum.nokia.com/index.ph...GIF_animations

  3. #3
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: Can't draw gif animations..plz help

    Quote Originally Posted by symbianyucca View Post
    maybe you could use other gif exmples then, something like this for example: http://wiki.forum.nokia.com/index.ph...GIF_animations
    Thanks for reply...

    But I already have seen this example.But I can not find the "CExampleTimer.h" header file in S60 3rd SDK which is include in Gif_Reader.h of this example.

    Regards

    Sabera

  4. #4
    archerabi
    Guest

    Re: Can't draw gif animations..plz help

    In Class Declaration
    Code:
    CICLAnimationDataProvider*  iGifFileDataprovider;
    	TAnimationConfig igifanimationconfig;
    	CBasicAnimation* igifAnimator;
    Initialize
    Code:
    iGifFileDataprovider = new (ELeave) CICLAnimationDataProvider;
    		iGifFileDataprovider->SetFileL(CCoeEnv::Static()->FsSession(),_L("C:\\data\\images\\loader.gif")); 
    		 
    		igifanimationconfig.iFlags = TAnimationConfig::ELoop;
    		igifanimationconfig.iData = 10000;
    		TPoint gifpoint = TPoint((aRect.Width()-K_LOADER_WIDTH)/2,aRect.Height()-20);
    		igifAnimator = CBasicAnimation::NewL(iGifFileDataprovider,gifpoint,CEikonEnv::Static()->WsSession(),Window());
    		igifAnimator->Start(igifanimationconfig);

    In Draw

    Code:
    igifAnimator->Draw(gc);
    Destroy
    Code:
    igifAnimator->Stop();
    	delete iGifFileDataprovider;

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Can't draw gif animations..plz help

    for the timer you could use other example: http://wiki.forum.nokia.com/index.ph...implementation

  6. #6
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: Can't draw gif animations..plz help

    [QUOTE=archerabi;720165]In Class Declaration
    Code:
    CICLAnimationDataProvider*  iGifFileDataprovider;
    	TAnimationConfig igifanimationconfig;
    	CBasicAnimation* igifAnimator;
    Thanks for your reply..My coding is like that:

    #include <GLES/gl.h> // OpenGL ES header file
    #include <ICLAnimationDataProvider.h> //CICLAnimationDataProvider
    #include <BasicAnimation.h> //CBasicAnimation


    ******************** SimpleCube.h *********************

    class CSimpleCube : public CFiniteStateMachine, public MTextureLoadingListener
    {
    public: // Constructors and destructor


    static CSimpleCube* NewL( TUint aWidth, TUint aHeight);'

    .......
    ......
    ......

    private: // Data

    CTextureManager * iTextureManager;

    TUint iScreenWidth;

    TUint iScreenHeight;

    CICLAnimationDataProvider* iGifFileDataprovider;
    TAnimationConfig igifanimationconfig;//Shows error: igifanimationconfig has incomplete type
    CBasicAnimation* igifAnimator;

    .....
    .....

    }


    ****************** simplecube.cpp ****************************

    ............
    ............

    CSimpleCube* CSimpleCube::NewL( TUint aWidth, TUint aHeight )
    {
    /* Symbian 2-phase constructor. Calls both the default C++ constructor
    and Symbian ConstructL methods. */
    CSimpleCube* self = new (ELeave) CSimpleCube( aWidth, aHeight );
    CleanupStack::PushL( self );
    ....

    }

    void CSimpleCube::AppInitL( void )
    {
    iGifFileDataprovider = new (ELeave) CICLAnimationDataProvider;
    ...........
    iGifFileDataprovider->SetFileL(CCoeEnv::Static()->FsSession(),_L("C:\\data\\images\\loader.gif"));
    .......
    igifanimationconfig.iFlags = TAnimationConfig::ELoop;\\Error: TAnimationConfig used in nested specifier name//
    igifanimationconfig.iData = 10000;
    TPoint gifpoint = TPoint((aRect.Width()-K_LOADER_WIDTH)/2,aRect.Height()-20);//Error: aRect,K_LOADER_WIDTH undeclared //
    igifAnimator = CBasicAnimation::NewL(iGifFileDataprovider,gifpoint,CEikonEnv::Static()->WsSession(),Window());//Error: Window undeclared
    igifAnimator->Start(igifanimationconfig);
    ...
    }

    void CSimpleCube::AppCycle( TInt aFrame )
    {
    igifAnimator->Draw(gc);//Error: gc undeclared
    }

    Basically I am trying to implement gif animation in openGLES enviroment such that simplecube(Nokia's openglES example) program. But it is giving so many errors.

    So plz see my coding ...suggest me where is the problem?

    Regards

    Sabera

  7. #7
    archerabi
    Guest

    Re: Can't draw gif animations..plz help

    The code provided is to be used in a subclass of CCoeControl.Search for TAnimConfig in the docs you need to include a header for that.

  8. #8
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: Can't draw gif animations..plz help

    [QUOTE=archerabi;720165]In Class Declaration
    Code:
    CICLAnimationDataProvider*  iGifFileDataprovider;
    	TAnimationConfig igifanimationconfig;
    	CBasicAnimation* igifAnimator;
    Okay...I declared class following way as you mentioned:

    **********simplecube.h*********************
    #include <ICLAnimationDataProvider.h>
    #include <BasicAnimation.h>
    #include <coecntrl.h>

    class CGif_Reader : public CCoeControl
    {
    public:
    void AppInitL( void );

    void AppCycle(void);

    void Draw(void);

    private:

    CICLAnimationDataProvider* iGifFileDataprovider;
    TAnimationConfig igifanimationconfig;//Error:igifanimationconfig has incomplete type
    CBasicAnimation* igifAnimator;

    };


    I have written cpp follwoing way:

    ************************* simplecube.cpp*********************

    void CGif_Reader::AppInitL()
    {
    iGifFileDataprovider = new (ELeave) CICLAnimationDataProvider;
    GifFileDataprovider->SetFileL(CCoeEnv::Static()->FsSession(),_("C:\\data\\images\\loader.gif"));

    igifanimationconfig.iFlags = TAnimationConfig::ELoop;//Error: igifanimationconfig undeclared ;TAnimationConfig incomplete type
    igifanimationconfig.iData = 10000;
    TPoint gifpoint = TPoint((aRect.Width()-K_LOADER_WIDTH)/2,aRect.Height()-20);//Error:Undeclared aRect,Width,K_LOADER_WIDTH,Height

    igifAnimator = CBasicAnimation::NewL(iGifFileDataprovider,gifpoint,CEikonEnv::Static()->WsSession(),Window());
    igifAnimator->Start(igifanimationconfig);

    }

    void CGif_Reader::AppCycle()
    {

    igifAnimator->Draw(gc);// Error: gc undeclared


    }

    plz check my coding & suggest me how I fix this errors to play gif file.

    thanks
    Sabera

  9. #9
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,086

    Re: Can't draw gif animations..plz help

    declare the following:

    TAnimationConfig igifanimationconfig;

    in AppInitL();
    & include the header AnimationConfig.h in this cpp.

    & give the following statement in your Draw() method:

    igifAnimator->Draw(gc)

  10. #10
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: Can't draw gif animations..plz help

    Quote Originally Posted by vineet.jain View Post
    declare the following:

    TAnimationConfig igifanimationconfig;

    in AppInitL();
    & include the header AnimationConfig.h in this cpp.

    & give the following statement in your Draw() method:

    igifAnimator->Draw(gc)
    ok..thanks for reply..seems problem is solving...

    I already include AnimationConfig.h in cpp & added follwoing line in AppInitL()

    TAnimationConfig igifanimationconfig;

    but still getting 1 error:

    igifAnimator->Draw(gc);`gc' undeclared (first use this function)


    Plz help me to solve this error..I am almost near of my success..

    Note : I implementing this gif coding in SimpleCube(Nokia OpenglES example) program.

    Regards
    Sabera
    Last edited by sabera_mina; 2010-04-05 at 09:41.

  11. #11
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,086

    Re: Can't draw gif animations..plz help

    As i said give the following line:

    gifAnimator->Draw(gc);in your Draw() method, as gc is declared in Draw()

  12. #12
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: Can't draw gif animations..plz help

    Quote Originally Posted by vineet.jain View Post
    As i said give the following line:

    gifAnimator->Draw(gc);in your Draw() method, as gc is declared in Draw()
    ok I understood. but I already mentioned here I try to implementing this gif coding in openGLES enviroment such that in Simplecube program(Nokia openGLES sdk example)where I want to call Draw(gc)in AppCycle function in simplecube.cpp. like that:

    void CSimpleCube::AppCycle( TInt aFrame)
    {
    gifAnimator->Draw(gc);Error: gc undeclared

    }

    But I also do not sure this way(openGLES enviroment) gif can work or not...So any suggestions/comments...


    Thanks
    Sabera

Similar Threads

  1. how to draw a gif on fullscreen?
    By sumit.rathi in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-01-13, 05:32
  2. how to draw a gif?
    By sumit.rathi in forum Symbian
    Replies: 3
    Last Post: 2009-01-12, 12:22
  3. Downloading GIF animations on 6230
    By LimpingFish in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2006-12-01, 18:08
  4. How draw an image from a file Gif or Jpeg?
    By yaney in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-08-29, 12:29
  5. MMS and framerate in Gif animations
    By Popfugl in forum General Messaging
    Replies: 1
    Last Post: 2002-08-01, 11:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×