BlinkenArea - GitList
Repositories
Blog
Wiki
BlinkenLib
Code
Commits
Branches
Tags
Search
Tree:
c3d5a66
Branches
Tags
master
v0.1
v0.2
v0.3
v0.3.1
v0.4
v0.4.1
v0.5
v0.5.1
v0.5.2
v0.5.3
v0.5.4
v0.5.5
v0.6.0
v0.6.1
v0.6.2
v0.6.3
v0.6.4
v0.6.5
v0.6.6
v0.6.7
v0.6.8
v0.6.9
v0.7.0
v0.7.1
v0.7.10
v0.7.2
v0.7.3
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.7.9
v0.8.0
v0.8.1
BlinkenLib
BlinkenLib
BlinkenFrame.h
update email address of author
Stefan Schuermans
commited
c3d5a66
at 2014-05-10 10:31:10
BlinkenFrame.h
Blame
History
Raw
/* BlinkenLib Copyright 2004-2014 Stefan Schuermans <stefan@schuermans.info> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef INC_BlinkenLib_BlinkenFrame #define INC_BlinkenLib_BlinkenFrame #include <BlinkenLib/BlinkenProto.h> #ifdef __cplusplus extern "C" { #endif typedef struct sBlinkenFrame stBlinkenFrame; stBlinkenFrame *BlinkenFrameNew(int height, int width, int channels, int maxval, int duration); stBlinkenFrame *BlinkenFrameClone(stBlinkenFrame *pSrcFrame); void BlinkenFrameFree(stBlinkenFrame *pFrame); void BlinkenFrameClear(stBlinkenFrame *pFrame); int BlinkenFrameGetHeight(stBlinkenFrame *pFrame); int BlinkenFrameGetWidth(stBlinkenFrame *pFrame); int BlinkenFrameGetChannels(stBlinkenFrame *pFrame); int BlinkenFrameGetMaxval(stBlinkenFrame *pFrame); int BlinkenFrameGetDuration(stBlinkenFrame *pFrame); void BlinkenFrameSetDuration(stBlinkenFrame *pFrame, int duration); unsigned char BlinkenFrameGetPixel(stBlinkenFrame *pFrame, int y, int x, int c); void BlinkenFrameSetPixel(stBlinkenFrame *pFrame, int y, int x, int c, unsigned char val); unsigned long BlinkenFrameGetColor(stBlinkenFrame *pFrame, int y, int x); void BlinkenFrameSetColor(stBlinkenFrame *pFrame, int y, int x, unsigned long color); int BlinkenFrameIsEmpty(stBlinkenFrame *pFrame); // returns 1 if frame is empty (i.e. black), returns 0 otherwise int BlinkenFrameCompare(stBlinkenFrame *pFrame1, stBlinkenFrame *pFrame2); // returns -1 for frame1 smaller, 0 for equal, 1 for frame2 smaller void BlinkenFrameResize(stBlinkenFrame *pFrame, int height, int width, int channels, int maxval); void BlinkenFrameScale(stBlinkenFrame *pFrame, int height, int width); void BlinkenFrameColorize(stBlinkenFrame *pFrame, int channels, int mode, int step); void BlinkenFrameCopyRect(stBlinkenFrame *pDest, int destY, int destX, stBlinkenFrame *pSrc, int srcY, int srcX, int height, int width); void BlinkenFrameRotateCw(stBlinkenFrame *pFrame); void BlinkenFrameRotateCcw(stBlinkenFrame *pFrame); void BlinkenFrameRotateHalf(stBlinkenFrame *pFrame); void BlinkenFrameMirrorHor(stBlinkenFrame *pFrame); void BlinkenFrameMirrorVer(stBlinkenFrame *pFrame); void BlinkenFrameMirrorDiag(stBlinkenFrame *pFrame); void BlinkenFrameMirrorDiag2(stBlinkenFrame *pFrame); char *BlinkenFrameToString(stBlinkenFrame *pFrame); int BlinkenFrameToNetwork(stBlinkenFrame *pFrame, etBlinkenProto proto, char *pData, int maxLength); // returns length or -1 on error stBlinkenFrame *BlinkenFrameFromNetwork(const char *pData, int length, etBlinkenProto * pProto); // returns protocol in *pProto if pProto not NULL #ifdef __cplusplus } // extern "C" #endif #endif // #ifndef INC_BlinkenLib_BlinkenFrame