tahoma2d/toonz/sources/include/timageinfo.h

94 lines
2.4 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef TIMAGEINFO_H
#define TIMAGEINFO_H
#undef DVAPI
#undef DVVAR
#ifdef TNZCORE_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
//================================================
// Forward declarations
class TPropertyGroup;
//================================================
//*************************************************************************
// TImageInfo class
//*************************************************************************
/*!
\brief Stores description data about a generic image.
\todo Stores useless/redundant/improper data which should be moved or
removed.
*/
2016-06-15 18:43:10 +12:00
class DVAPI TImageInfo {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
// NOTE: Fields ordered by type size - minimizes padding
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
double m_dpix, //!< Horizontal image dpi.
m_dpiy, //!< Vertical image dpi.
m_frameRate; //!< Movie frame rate. \deprecated Should not be here. An
2016-06-20 14:23:05 +12:00
//! image has \a no frame rate!
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TPropertyGroup *m_properties; //!< Format-specific image data.
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int m_lx, //!< Image width.
m_ly, //!< Image height.
m_x0, //!< Image contents rect's left coordinate.
m_y0, //!< Image contents rect's bottom coordinate.
m_x1, //!< Image contents rect's right coordinate.
m_y1, //!< Image contents rect's top coordinate.
m_samplePerPixel, //!< Number of samples (channels) per pixel.
m_bitsPerSample, //!< Number of bits per sample (channel).
m_fileSize; //!< Total size (in bytes) of the image file. \deprecated
2016-06-20 14:23:05 +12:00
//! Possibly useless.
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
bool m_valid; //!< \a Deprecated. \deprecated Just... wrong.
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
TImageInfo()
: m_dpix(0)
, m_dpiy(0)
, m_frameRate(12)
, m_properties(0)
, m_lx(0)
, m_ly(0)
, m_x0(0)
, m_y0(0)
, m_x1(-1)
, m_y1(-1)
, m_samplePerPixel(0)
, m_bitsPerSample(8)
, m_fileSize(0)
, m_valid(false) {}
TImageInfo(int lx, int ly)
: m_dpix(0)
, m_dpiy(0)
, m_frameRate(12)
, m_properties(0)
, m_lx(lx)
, m_ly(ly)
, m_x0(0)
, m_y0(0)
, m_x1(-1)
, m_y1(-1)
, m_samplePerPixel(0)
, m_bitsPerSample(8)
, m_fileSize(0)
, m_valid(false) {}
2016-03-19 06:57:51 +13:00
};
2016-06-15 18:43:10 +12:00
#endif // TIMAGEINFO_H