VTK
vtkContextTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContextItem.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
28 #ifndef __vtkContextTransform_h
29 #define __vtkContextTransform_h
30 
31 #include "vtkAbstractContextItem.h"
32 #include "vtkSmartPointer.h" // Needed for SP ivars.
33 
34 class vtkTransform2D;
35 
37 {
38 public:
40  virtual void PrintSelf(ostream &os, vtkIndent indent);
41 
43  static vtkContextTransform *New();
44 
48  virtual void Update();
49 
51  virtual bool Paint(vtkContext2D *painter);
52 
55  virtual void Translate(float dx, float dy);
56 
59  virtual void Scale(float dx, float dy);
60 
62  virtual void Rotate(float angle);
63 
65  virtual vtkTransform2D* GetTransform();
66 
68  virtual vtkVector2f MapToParent(const vtkVector2f& point);
69 
71  virtual vtkVector2f MapFromParent(const vtkVector2f& point);
72 
73 //BTX
74 protected:
77 
79 
80 private:
81  vtkContextTransform(const vtkContextTransform &); // Not implemented.
82  void operator=(const vtkContextTransform &); // Not implemented.
83 //ETX
84 };
85 
86 #endif //__vtkContextTransform_h
#define VTK_CHARTS_EXPORT
virtual vtkVector2f MapFromParent(const vtkVector2f &point)
virtual vtkVector2f MapToParent(const vtkVector2f &point)
virtual bool Paint(vtkContext2D *painter)
all children of this item are transformed by the vtkTransform2D of this item.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:54
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkSmartPointer< vtkTransform2D > Transform
describes linear transformations via a 3x3 matrix
base class for items that are part of a vtkContextScene.
static vtkObject * New()
virtual void Update()
virtual void PrintSelf(ostream &os, vtkIndent indent)