Welcome to mirror list, hosted at ThFree Co, Russian Federation.

AppCanvas.h « app_blender « intern « freestyle « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0eb1faa254927cf0173fc506cb0052844856270f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef ARTCANVAS_H
#define ARTCANVAS_H

#include "../stroke/Canvas.h"

//class AppGLWidget;
class AppCanvas : public Canvas
{
private:
  mutable AppGLWidget *_pViewer;
  bool _blendEquation;
public:
  AppCanvas();
  AppCanvas(AppGLWidget *iViewer);
  AppCanvas(const AppCanvas& iBrother);
  virtual ~AppCanvas();

  /*! operations that need to be done before a draw */
  virtual void preDraw();
  
  /*! operations that need to be done after a draw */
  virtual void postDraw();
  
  /*! Erases the layers and clears the canvas */
  virtual void Erase(); 
  
  /* init the canvas */
  virtual void init();
  
  /*! Reads a pixel area from the canvas */
  virtual void readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const;
  /*! Reads a depth pixel area from the canvas */
  virtual void readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const;

  virtual BBox<Vec3r> scene3DBBox() const ;

  /*! update the canvas (display) */
  virtual void update() ;

  /*! Renders the created strokes */
  virtual void Render(const StrokeRenderer *iRenderer);
  virtual void RenderBasic(const StrokeRenderer *iRenderer);
  virtual void RenderStroke(Stroke *iStroke) ;

  /*! accessors */
  virtual int width() const ;
  virtual int height() const ;
  inline const AppGLWidget * viewer() const {return _pViewer;}

  /*! modifiers */
  void setViewer(AppGLWidget *iViewer) ;
};


#endif