Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opentalking/gif-for-cocos2dx
A Gif lib for cocos2dx
https://github.com/opentalking/gif-for-cocos2dx
Last synced: 16 days ago
JSON representation
A Gif lib for cocos2dx
- Host: GitHub
- URL: https://github.com/opentalking/gif-for-cocos2dx
- Owner: opentalking
- Created: 2014-09-12T06:28:42.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-18T03:01:04.000Z (about 10 years ago)
- Last Synced: 2024-07-31T22:56:13.346Z (3 months ago)
- Language: C
- Size: 8.19 MB
- Stars: 37
- Watchers: 7
- Forks: 24
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gif-for-cocos2dx
===================This project is based on the gif_lib, and some codes reference to the android skia.
In my project, gif_lib library version is 5, and there are some changes to adapt android, ios, win32 platform.
The cocos2dx version number is 2.2.0##Use
`Gif widget` just like a `CCSprite`:std::string name = "g2.gif";
name = CCFileUtils::sharedFileUtils()->fullPathForFilename(name.c_str());
GifBase *gif = InstantGif::create(name);//InstantGif :While playing, while parsing
gif->setAnchorPoint(ccp(0,0));
gif->setPosition(ccp(0,0));
this->addChild(gif);gif = CacheGif::create(name);//CacheGif: onece parse, and cache.
gif->setPosition(ccp(500,0));
gif->setScale(2);
this->addChild(gif);
Special attention should be paid to gif path which must be a absolute path.## License
```
Copyright 2013 Chang ShuaiLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```