## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# cstool/uberscreenshot.h

    00001 /*
    00002   Copyright (C) 2006 by Frank Richter
    00003
    00004   This library is free software; you can redistribute it and/or
    00005   modify it under the terms of the GNU Library General Public
    00006   License as published by the Free Software Foundation; either
    00007   version 2 of the License, or (at your option) any later version.
    00008
    00009   This library is distributed in the hope that it will be useful,
    00010   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012   Library General Public License for more details.
    00013
    00014   You should have received a copy of the GNU Library General Public
    00015   License along with this library; if not, write to the Free
    00016   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00017 */
    00018
    00019 #ifndef __CSTOOL_UBERSCREENSHOT_H__
    00020 #define __CSTOOL_UBERSCREENSHOT_H__
    00021
    00022 #include "iengine/engine.h"
    00023 #include "igraphic/image.h"
    00024 #include "ivaria/view.h"
    00025 #include "ivideo/graph2d.h"
    00026 #include "ivideo/graph3d.h"
    00027
    00028 class csImageMemory;
    00029
    00030 namespace CS
    00031 {
    00046   class CS_CRYSTALSPACE_EXPORT UberScreenshotMaker
    00047   {
    00048   protected:
    00050     uint ubershotW;
    00052     uint ubershotH;
    00054     uint screenW;
    00056     uint screenH;
    00057
    00058     csRef<iGraphics3D> g3d;
    00059     csRef<iGraphics2D> g2d;
    00060     csRef<iEngine> engine;
    00062     csRef<iView> shotView;
    00063
    00067     virtual bool DrawTile3D (uint tileLeft, uint tileTop,
    00068       uint tileRight, uint tileBottom);
    00072     virtual csRef<iImage> TakeScreenshot (uint tileLeft, uint tileTop,
    00073       uint tileRight, uint tileBottom);
    00081     virtual csRef<iImage> ShootTile (uint tileLeft, uint tileTop,
    00082       uint tileRight, uint tileBottom)
    00083     {
    00084       if (!DrawTile3D (tileLeft, tileTop, tileRight, tileBottom))
    00085         return 0;
    00086       return TakeScreenshot (tileLeft, tileTop, tileRight, tileBottom);
    00087     }
    00088
    00093     virtual csRef<iImage> PostProcessImage (csImageMemory* img);
    00094
    00096     void Setup (iCamera* camera, iEngine* engine, iGraphics3D* g3d);
    00097   public:
    00099     UberScreenshotMaker (uint width, uint height, iCamera* camera,
    00100       iEngine* engine, iGraphics3D* g3d);
    00102     UberScreenshotMaker (uint width, uint height, iView* view);
    00104     virtual ~UberScreenshotMaker() {}
    00105
    00107     csPtr<iImage> Shoot ();
    00108   };
    00109 }
    00110
    00111 #endif // __CSTOOL_UBERSCREENSHOT_H__