📄 libmng_chunk_xs.c
字号:
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_BASI
mng_retcode MNG_DECL mng_getchunk_basi (mng_handle hHandle,
mng_handle hChunk,
mng_uint32 *iWidth,
mng_uint32 *iHeight,
mng_uint8 *iBitdepth,
mng_uint8 *iColortype,
mng_uint8 *iCompression,
mng_uint8 *iFilter,
mng_uint8 *iInterlace,
mng_uint16 *iRed,
mng_uint16 *iGreen,
mng_uint16 *iBlue,
mng_uint16 *iAlpha,
mng_uint8 *iViewable)
{
mng_datap pData;
mng_basip pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_BASI, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_basip)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_BASI)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iWidth = pChunk->iWidth; /* fill the fields */
*iHeight = pChunk->iHeight;
*iBitdepth = pChunk->iBitdepth;
*iColortype = pChunk->iColortype;
*iCompression = pChunk->iCompression;
*iFilter = pChunk->iFilter;
*iInterlace = pChunk->iInterlace;
*iRed = pChunk->iRed;
*iGreen = pChunk->iGreen;
*iBlue = pChunk->iBlue;
*iAlpha = pChunk->iAlpha;
*iViewable = pChunk->iViewable;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_BASI, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_CLON
mng_retcode MNG_DECL mng_getchunk_clon (mng_handle hHandle,
mng_handle hChunk,
mng_uint16 *iSourceid,
mng_uint16 *iCloneid,
mng_uint8 *iClonetype,
mng_uint8 *iDonotshow,
mng_uint8 *iConcrete,
mng_bool *bHasloca,
mng_uint8 *iLocationtype,
mng_int32 *iLocationx,
mng_int32 *iLocationy)
{
mng_datap pData;
mng_clonp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_CLON, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_clonp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_CLON)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iSourceid = pChunk->iSourceid; /* fill the fields */
*iCloneid = pChunk->iCloneid;
*iClonetype = pChunk->iClonetype;
*iDonotshow = pChunk->iDonotshow;
*iConcrete = pChunk->iConcrete;
*bHasloca = pChunk->bHasloca;
*iLocationtype = pChunk->iLocationtype;
*iLocationx = pChunk->iLocationx;
*iLocationy = pChunk->iLocationy;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_CLON, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_PAST
mng_retcode MNG_DECL mng_getchunk_past (mng_handle hHandle,
mng_handle hChunk,
mng_uint16 *iDestid,
mng_uint8 *iTargettype,
mng_int32 *iTargetx,
mng_int32 *iTargety,
mng_uint32 *iCount)
{
mng_datap pData;
mng_pastp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_PAST, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_pastp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_PAST)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iDestid = pChunk->iDestid; /* fill the fields */
*iTargettype = pChunk->iTargettype;
*iTargetx = pChunk->iTargetx;
*iTargety = pChunk->iTargety;
*iCount = pChunk->iCount;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_PAST, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_PAST
mng_retcode MNG_DECL mng_getchunk_past_src (mng_handle hHandle,
mng_handle hChunk,
mng_uint32 iEntry,
mng_uint16 *iSourceid,
mng_uint8 *iComposition,
mng_uint8 *iOrientation,
mng_uint8 *iOffsettype,
mng_int32 *iOffsetx,
mng_int32 *iOffsety,
mng_uint8 *iBoundarytype,
mng_int32 *iBoundaryl,
mng_int32 *iBoundaryr,
mng_int32 *iBoundaryt,
mng_int32 *iBoundaryb)
{
mng_datap pData;
mng_pastp pChunk;
mng_past_sourcep pEntry;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_PAST_SRC, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_pastp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_PAST)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
if (iEntry >= pChunk->iCount) /* valid index ? */
MNG_ERROR (pData, MNG_INVALIDENTRYIX)
/* address the entry */
pEntry = pChunk->pSources + iEntry;
*iSourceid = pEntry->iSourceid; /* fill the fields */
*iComposition = pEntry->iComposition;
*iOrientation = pEntry->iOrientation;
*iOffsettype = pEntry->iOffsettype;
*iOffsetx = pEntry->iOffsetx;
*iOffsety = pEntry->iOffsety;
*iBoundarytype = pEntry->iBoundarytype;
*iBoundaryl = pEntry->iBoundaryl;
*iBoundaryr = pEntry->iBoundaryr;
*iBoundaryt = pEntry->iBoundaryt;
*iBoundaryb = pEntry->iBoundaryb;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_PAST_SRC, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_DISC
mng_retcode MNG_DECL mng_getchunk_disc (mng_handle hHandle,
mng_handle hChunk,
mng_uint32 *iCount,
mng_uint16p *pObjectids)
{
mng_datap pData;
mng_discp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_DISC, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_discp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_DISC)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iCount = pChunk->iCount; /* fill the fields */
*pObjectids = pChunk->pObjectids;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_DISC, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_BACK
mng_retcode MNG_DECL mng_getchunk_back (mng_handle hHandle,
mng_handle hChunk,
mng_uint16 *iRed,
mng_uint16 *iGreen,
mng_uint16 *iBlue,
mng_uint8 *iMandatory,
mng_uint16 *iImageid,
mng_uint8 *iTile)
{
mng_datap pData;
mng_backp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_BACK, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_backp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_BACK)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iRed = pChunk->iRed; /* fill the fields */
*iGreen = pChunk->iGreen;
*iBlue = pChunk->iBlue;
*iMandatory = pChunk->iMandatory;
*iImageid = pChunk->iImageid;
*iTile = pChunk->iTile;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_BACK, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_FRAM
mng_retcode MNG_DECL mng_getchunk_fram (mng_handle hHandle,
mng_handle hChunk,
mng_bool *bEmpty,
mng_uint8 *iMode,
mng_uint32 *iNamesize,
mng_pchar *zName,
mng_uint8 *iChangedelay,
mng_uint8 *iChangetimeout,
mng_uint8 *iChangeclipping,
mng_uint8 *iChangesyncid,
mng_uint32 *iDelay,
mng_uint32 *iTimeout,
mng_uint8 *iBoundarytype,
mng_int32 *iBoundaryl,
mng_int32 *iBoundaryr,
mng_int32 *iBoundaryt,
mng_int32 *iBoundaryb,
mng_uint32 *iCount,
mng_uint32p *pSyncids)
{
mng_datap pData;
mng_framp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_FRAM, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_framp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_FRAM)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*bEmpty = pChunk->bEmpty; /* fill the fields */
*iMode = pChunk->iMode;
*iNamesize = pChunk->iNamesize;
*zName = pChunk->zName;
*iChangedelay = pChunk->iChangedelay;
*iChangetimeout = pChunk->iChangetimeout;
*iChangeclipping = pChunk->iChangeclipping;
*iChangesyncid = pChunk->iChangesyncid;
*iDelay = pChunk->iDelay;
*iTimeout = pChunk->iTimeout;
*iBoundarytype = pChunk->iBoundarytype;
*iBoundaryl = pChunk->iBoundaryl;
*iBoundaryr = pChunk->iBoundaryr;
*iBoundaryt = pChunk->iBoundaryt;
*iBoundaryb = pChunk->iBoundaryb;
*iCount = pChunk->iCount;
*pSyncids = pChunk->pSyncids;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_FRAM, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_MOVE
mng_retcode MNG_DECL mng_getchunk_move (mng_handle hHandle,
mng_handle hChunk,
mng_uint16 *iFirstid,
mng_uint16 *iLastid,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -