VTK
dox/Charts/vtkContextTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkContextItem.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00028 #ifndef __vtkContextTransform_h
00029 #define __vtkContextTransform_h
00030 
00031 #include "vtkAbstractContextItem.h"
00032 #include "vtkSmartPointer.h" // Needed for SP ivars.
00033 
00034 class vtkTransform2D;
00035 
00036 class VTK_CHARTS_EXPORT vtkContextTransform : public vtkAbstractContextItem
00037 {
00038 public:
00039   vtkTypeMacro(vtkContextTransform, vtkAbstractContextItem);
00040   virtual void PrintSelf(ostream &os, vtkIndent indent);
00041 
00043   static vtkContextTransform *New();
00044 
00048   virtual void Update();
00049 
00051   virtual bool Paint(vtkContext2D *painter);
00052 
00055   virtual void Translate(float dx, float dy);
00056 
00059   virtual void Scale(float dx, float dy);
00060 
00062   virtual void Rotate(float angle);
00063 
00065   virtual vtkTransform2D* GetTransform();
00066 
00068   virtual vtkVector2f MapToParent(const vtkVector2f& point);
00069 
00071   virtual vtkVector2f MapFromParent(const vtkVector2f& point);
00072 
00073 //BTX
00074 protected:
00075   vtkContextTransform();
00076   ~vtkContextTransform();
00077 
00078   vtkSmartPointer<vtkTransform2D> Transform;
00079 
00080 private:
00081   vtkContextTransform(const vtkContextTransform &); // Not implemented.
00082   void operator=(const vtkContextTransform &);   // Not implemented.
00083 //ETX
00084 };
00085 
00086 #endif //__vtkContextTransform_h