0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[occt.git] / samples / mfc / standard / Common / Primitive / Sample2D_Image.h
CommitLineData
7fd59977 1#ifndef _Sample2D_Image_HeaderFile
2#define _Sample2D_Image_HeaderFile
3#include <Standard_Macro.hxx>
4#include <Standard_DefineHandle.hxx>
5
6#include <OSD_File.hxx>
7fd59977 7#include <Standard_Boolean.hxx>
8#include <Standard_CString.hxx>
7fd59977 9#include <Standard_Integer.hxx>
5c1f974e 10#include <SelectMgr_Selection.hxx>
7fd59977 11#include <Standard_OStream.hxx>
12#include <Standard_IStream.hxx>
9e3ca93a 13class Sample2D_Image;
5c1f974e 14DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS_TexturedShape)
15class Sample2D_Image : public AIS_TexturedShape {
7fd59977 16
17public:
18
5c1f974e 19Standard_EXPORT Sample2D_Image(TCollection_AsciiString& aFileName,
ee2be2a8 20 const Standard_Real X = 0.0,
21 const Standard_Real Y = 0.0,
22 const Standard_Real aScale = 1.0);
23Standard_EXPORT inline virtual void GetCoord(Standard_Real& X,Standard_Real& Y) const;
24Standard_EXPORT inline virtual void SetCoord(const Standard_Real X,const Standard_Real Y) ;
25Standard_EXPORT inline Standard_Real GetScale() const;
26Standard_EXPORT inline void SetScale(const Standard_Real aNewScale) ;
5c1f974e 27Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ;
7fd59977 28
92efcf78 29DEFINE_STANDARD_RTTIEXT(Sample2D_Image,AIS_TexturedShape)
5c1f974e 30private:
31 void MakeShape();
7fd59977 32protected:
5c1f974e 33TopoDS_Face myFace;
34TCollection_AsciiString myFilename;
ee2be2a8 35Standard_Real myX;
36Standard_Real myY;
37Standard_Real myScale;
7fd59977 38
39};
40
41// other inline functions and methods (like "C++: function call" methods)
42//
43
ee2be2a8 44inline void Sample2D_Image::GetCoord(Standard_Real& X, Standard_Real& Y) const
7fd59977 45{
46 X = myX;
47 Y = myY;
48}
49
ee2be2a8 50inline void Sample2D_Image::SetCoord(const Standard_Real X, const Standard_Real Y)
7fd59977 51{
52 myX = X;
53 myY = Y;
54}
55
ee2be2a8 56inline Standard_Real Sample2D_Image::GetScale() const
7fd59977 57{
58 return myScale;
59}
60
ee2be2a8 61inline void Sample2D_Image::SetScale(const Standard_Real aNewScale)
7fd59977 62{
63 myScale = aNewScale;
64}
65
7fd59977 66
67
68#endif