0022627: Change OCCT memory management defaults
[occt.git] / src / Prs3d / Prs3d_PointAspect.cxx
1 #define GER61351                //GG_171199     Enable to set an object RGB color
2 //                                                instead a restricted object NameOfColor.
3
4 #include <Prs3d_PointAspect.ixx>
5
6 #ifdef GER61351
7 Prs3d_PointAspect::Prs3d_PointAspect (const Aspect_TypeOfMarker aType,
8                                   const Quantity_Color &aColor,
9                                   const Standard_Real aScale) {
10   myAspect = new Graphic3d_AspectMarker3d(aType,aColor,aScale);
11 }
12 #endif
13
14 Prs3d_PointAspect::Prs3d_PointAspect (const Aspect_TypeOfMarker aType,
15                                   const Quantity_NameOfColor aColor,
16                                   const Standard_Real aScale) {
17   myAspect = new Graphic3d_AspectMarker3d
18     (aType,Quantity_Color(aColor),aScale);
19 }
20
21 Prs3d_PointAspect::Prs3d_PointAspect (const Quantity_Color &aColor,
22                                       const Standard_Real anId,
23                                       const Standard_Integer aWidth,
24                                       const Standard_Integer aHeight,
25                                       const Handle(TColStd_HArray1OfByte)& aTexture
26                                       ) 
27 {
28   myAspect = new Graphic3d_AspectMarker3d
29     (Aspect_TOM_USERDEFINED,aColor,anId,aWidth,aHeight,aTexture);
30 }
31
32 #ifdef GER61351
33 void Prs3d_PointAspect::SetColor(const Quantity_Color &aColor) {
34   myAspect->SetColor(aColor);
35 }
36 #endif
37
38 void Prs3d_PointAspect::SetColor(const Quantity_NameOfColor aColor) {
39   myAspect->SetColor(Quantity_Color(aColor));
40 }
41
42 void Prs3d_PointAspect::SetTypeOfMarker(const Aspect_TypeOfMarker aType){
43   myAspect->SetType(aType);
44 }
45
46 void Prs3d_PointAspect::SetScale(const Standard_Real aScale){
47   myAspect->SetScale(aScale);
48 }
49
50 Handle (Graphic3d_AspectMarker3d) Prs3d_PointAspect::Aspect () const {
51   return myAspect;
52 }
53
54 void Prs3d_PointAspect::GetTextureSize(Standard_Integer& AWidth, Standard_Integer& AHeight)
55 {
56   myAspect->GetTextureSize( AWidth, AHeight);
57 }
58
59 const Handle(TColStd_HArray1OfByte)& Prs3d_PointAspect::GetTexture()
60 {
61   return myAspect->GetTexture();
62 }