#ifndef _ImageMT_ImageMT_h #define _ImageMT_ImageMT_h #include using namespace Upp; #define LAYOUTFILE #include class Layer { public: Layer(){} Layer(Layer* pSource,double op,void* pMain); static void MakeLayerAsThread(Layer* pLayer,double op,void* pMain,int n); const RGBA* GetImage(int i){return m_img[i];} Rectf m_rc; Image m_img; }; class ImageMT : public WithImageMTLayout { public: typedef ImageMT CLASSNAME; ImageMT(); ~ImageMT(); Atomic threads; static void SquareImage(); void LoadImage(); void Square(); void AddLayer(Layer* pLayer){m_pLayers.Add(pLayer);} void StartProg(int Steps) {m_prog.SetTotal(Steps);} void Step() {m_prog++;} void EndProg() {m_prog.Set(0);} protected: void Paint(Draw& w); Array m_pLayers; }; #endif