Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "toonz/txshcell.h"
Toshihiro Shimizu 890ddd
#include "toonz/txshsimplelevel.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TImageP TXshCell::getImage(bool toBeModified, int subsampling) const {
Shinya Kitaoka 120a6e
  if (TXshSimpleLevel *sl = getSimpleLevel())
Shinya Kitaoka 120a6e
    return sl->getFrame(m_frameId, toBeModified ? ImageManager::toBeModified
Shinya Kitaoka 120a6e
                                                : ImageManager::none,
Shinya Kitaoka 120a6e
                        subsampling);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  return TImageP();
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TXshSimpleLevel *TXshCell::getSimpleLevel() const {
Shinya Kitaoka 120a6e
  return m_level ? m_level->getSimpleLevel() : 0;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TXshSoundLevel *TXshCell::getSoundLevel() const {
Shinya Kitaoka 120a6e
  return m_level ? m_level->getSoundLevel() : 0;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TXshSoundTextLevel *TXshCell::getSoundTextLevel() const {
Shinya Kitaoka 120a6e
  return m_level ? m_level->getSoundTextLevel() : 0;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TXshPaletteLevel *TXshCell::getPaletteLevel() const {
Shinya Kitaoka 120a6e
  return m_level ? m_level->getPaletteLevel() : 0;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TXshZeraryFxLevel *TXshCell::getZeraryFxLevel() const {
Shinya Kitaoka 120a6e
  return m_level ? m_level->getZeraryFxLevel() : 0;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TXshChildLevel *TXshCell::getChildLevel() const {
Shinya Kitaoka 120a6e
  return m_level ? m_level->getChildLevel() : 0;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TPalette *TXshCell::getPalette() const {
Shinya Kitaoka 120a6e
  TXshSimpleLevel *sl = getSimpleLevel();
Shinya Kitaoka 120a6e
  if (sl)
Shinya Kitaoka 120a6e
    return sl->getPalette();
Shinya Kitaoka 120a6e
  else
Shinya Kitaoka 120a6e
    return 0;
Toshihiro Shimizu 890ddd
}