ASPiK SDK
coffscreencontext.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #ifndef __coffscreencontext__
6 #define __coffscreencontext__
7 
8 #include "vstguifwd.h"
9 #include "cdrawcontext.h"
10 
11 namespace VSTGUI {
12 
13 //-----------------------------------------------------------------------------
14 // COffscreenContext Declaration
16 
57 //-----------------------------------------------------------------------------
59 {
60 public:
61  static SharedPointer<COffscreenContext> create (CFrame* frame, CCoord width, CCoord height, double scaleFactor = 1.);
62 
63  //-----------------------------------------------------------------------------
65  //-----------------------------------------------------------------------------
67  void copyFrom (CDrawContext *pContext, CRect destRect, CPoint srcOffset = CPoint (0, 0));
68 
69  CCoord getWidth () const;
70  CCoord getHeight () const;
72 
73  CBitmap* getBitmap () const { return bitmap; }
74 
75 protected:
76  explicit COffscreenContext (CBitmap* bitmap);
77  explicit COffscreenContext (const CRect& surfaceRect);
78 
80 };
81 
82 } // namespace
83 
84 #endif // __coffscreencontext__
Rect structure.
Definition: crect.h:17
void copyFrom(CDrawContext *pContext, CRect destRect, CPoint srcOffset=CPoint(0, 0))
copy from offscreen to pContext
Definition: coffscreencontext.cpp:26
Definition: vstguibase.h:299
A drawing context encapsulates the drawing context of the underlying OS.
Definition: cdrawcontext.h:29
A draw context using a bitmap as it&#39;s back buffer.
Definition: coffscreencontext.h:58
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
Definition: customcontrols.cpp:8
Point structure.
Definition: cpoint.h:17
The CFrame is the parent container of all views.
Definition: cframe.h:32