shun_iwasawa c0bf38
#pragma once
shun_iwasawa c0bf38
shun_iwasawa c0bf38
#ifndef IWA_TIMECODEFX_H
shun_iwasawa c0bf38
#define IWA_TIMECODEFX_H
shun_iwasawa c0bf38
shun_iwasawa c0bf38
#include "stdfx.h"
shun_iwasawa c0bf38
#include "tfxparam.h"
shun_iwasawa c0bf38
#include "tparamset.h"
shun_iwasawa c0bf38
shun_iwasawa c0bf38
//******************************************************************
shun_iwasawa c0bf38
//	Iwa_TimeCode Fx  class
shun_iwasawa c0bf38
//******************************************************************
shun_iwasawa c0bf38
shun_iwasawa c0bf38
class Iwa_TimeCodeFx final : public TStandardZeraryFx {
shun_iwasawa c0bf38
  FX_PLUGIN_DECLARATION(Iwa_TimeCodeFx)
shun_iwasawa c0bf38
shun_iwasawa c0bf38
public:
shun_iwasawa c0bf38
  TIntEnumParamP m_displayType;  // - SMPTE HH;MM;SS;FF
shun_iwasawa c0bf38
                                 // - FrameNumber [######]
shun_iwasawa c0bf38
  TIntParamP m_frameRate;
shun_iwasawa c0bf38
  TIntParamP m_startFrame;
shun_iwasawa c0bf38
  TPointParamP m_position;
shun_iwasawa c0bf38
  TDoubleParamP m_size;
shun_iwasawa c0bf38
  TPixelParamP m_textColor;
shun_iwasawa c0bf38
  TBoolParamP m_showBox;
shun_iwasawa c0bf38
  TPixelParamP m_boxColor;
shun_iwasawa c0bf38
shun_iwasawa c0bf38
  QString getTimeCodeStr(double frame, const TRenderSettings &ri);
shun_iwasawa c0bf38
shun_iwasawa c0bf38
  template <typename pixel="" raster,="" typename=""></typename>
shun_iwasawa c0bf38
  void putTimeCodeImage(const RASTER srcRas, TPoint &pos, QImage &img);
shun_iwasawa c0bf38
shun_iwasawa c0bf38
public:
shun_iwasawa c0bf38
  enum { TYPE_HHMMSSFF, TYPE_FRAME };
shun_iwasawa c0bf38
shun_iwasawa c0bf38
  Iwa_TimeCodeFx();
shun_iwasawa c0bf38
shun_iwasawa c0bf38
  bool isZerary() const override { return true; }
shun_iwasawa c0bf38
shun_iwasawa c0bf38
  bool canHandle(const TRenderSettings &info, double frame) override {
shun_iwasawa c0bf38
    return true;
shun_iwasawa c0bf38
  }
shun_iwasawa c0bf38
shun_iwasawa c0bf38
  bool doGetBBox(double frame, TRectD &bBox,
shun_iwasawa c0bf38
                 const TRenderSettings &ri) override;
shun_iwasawa c0bf38
  void doCompute(TTile &tile, double frame, const TRenderSettings &ri) override;
shun_iwasawa c0bf38
  void getParamUIs(TParamUIConcept *&concepts, int &length) override;
shun_iwasawa c0bf38
shun_iwasawa c0bf38
  std::string getAlias(double frame,
shun_iwasawa c0bf38
                       const TRenderSettings &info) const override;
shun_iwasawa c0bf38
};
shun_iwasawa c0bf38
shun_iwasawa c0bf38
#endif