00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkLogoRepresentation.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 =========================================================================*/ 00031 #ifndef __vtkLogoRepresentation_h 00032 #define __vtkLogoRepresentation_h 00033 00034 #include "vtkBorderRepresentation.h" 00035 00036 class vtkImageData; 00037 class vtkImageProperty; 00038 class vtkTexture; 00039 class vtkPolyData; 00040 class vtkPoionts; 00041 class vtkPolyDataMapper2D; 00042 class vtkActor2D; 00043 class vtkProperty2D; 00044 00045 00046 class VTK_WIDGETS_EXPORT vtkLogoRepresentation : public vtkBorderRepresentation 00047 { 00048 public: 00050 static vtkLogoRepresentation *New(); 00051 00053 00054 vtkTypeMacro(vtkLogoRepresentation,vtkBorderRepresentation); 00055 void PrintSelf(ostream& os, vtkIndent indent); 00057 00059 00060 virtual void SetImage(vtkImageData *img); 00061 vtkGetObjectMacro(Image,vtkImageData); 00063 00065 00066 virtual void SetImageProperty(vtkProperty2D *p); 00067 vtkGetObjectMacro(ImageProperty,vtkProperty2D); 00069 00071 virtual void BuildRepresentation(); 00072 00074 00076 virtual void GetActors2D(vtkPropCollection *pc); 00077 virtual void ReleaseGraphicsResources(vtkWindow*); 00078 virtual int RenderOverlay(vtkViewport*); 00080 00081 protected: 00082 vtkLogoRepresentation(); 00083 ~vtkLogoRepresentation(); 00084 00085 // data members 00086 vtkImageData *Image; 00087 vtkProperty2D *ImageProperty; 00088 00089 // Represent the image 00090 vtkTexture *Texture; 00091 vtkPoints *TexturePoints; 00092 vtkPolyData *TexturePolyData; 00093 vtkPolyDataMapper2D *TextureMapper; 00094 vtkActor2D *TextureActor; 00095 00096 // Helper methods 00097 void AdjustImageSize(double o[2], double borderSize[2], double imageSize[2]); 00098 00099 private: 00100 vtkLogoRepresentation(const vtkLogoRepresentation&); //Not implemented 00101 void operator=(const vtkLogoRepresentation&); //Not implemented 00102 }; 00103 00104 #endif