b311480e |
1 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
b311480e |
5 | // |
d5f74e42 |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
b311480e |
14 | |
7fd59977 |
15 | #include <Prs3d_PointAspect.ixx> |
16 | |
7fd59977 |
17 | Prs3d_PointAspect::Prs3d_PointAspect (const Aspect_TypeOfMarker aType, |
18 | const Quantity_Color &aColor, |
19 | const Standard_Real aScale) { |
20 | myAspect = new Graphic3d_AspectMarker3d(aType,aColor,aScale); |
21 | } |
7fd59977 |
22 | |
23 | Prs3d_PointAspect::Prs3d_PointAspect (const Aspect_TypeOfMarker aType, |
24 | const Quantity_NameOfColor aColor, |
25 | const Standard_Real aScale) { |
26 | myAspect = new Graphic3d_AspectMarker3d |
27 | (aType,Quantity_Color(aColor),aScale); |
28 | } |
29 | |
30 | Prs3d_PointAspect::Prs3d_PointAspect (const Quantity_Color &aColor, |
7fd59977 |
31 | const Standard_Integer aWidth, |
32 | const Standard_Integer aHeight, |
33 | const Handle(TColStd_HArray1OfByte)& aTexture |
34 | ) |
35 | { |
36 | myAspect = new Graphic3d_AspectMarker3d |
a577aaab |
37 | (aColor,aWidth,aHeight,aTexture); |
7fd59977 |
38 | } |
39 | |
1a75746e |
40 | Prs3d_PointAspect::Prs3d_PointAspect( const Handle( Graphic3d_AspectMarker3d )& theAspect ) |
41 | { |
42 | myAspect = theAspect; |
43 | } |
44 | |
45 | |
7fd59977 |
46 | void Prs3d_PointAspect::SetColor(const Quantity_Color &aColor) { |
47 | myAspect->SetColor(aColor); |
48 | } |
7fd59977 |
49 | |
1a75746e |
50 | |
7fd59977 |
51 | void Prs3d_PointAspect::SetColor(const Quantity_NameOfColor aColor) { |
52 | myAspect->SetColor(Quantity_Color(aColor)); |
53 | } |
54 | |
55 | void Prs3d_PointAspect::SetTypeOfMarker(const Aspect_TypeOfMarker aType){ |
56 | myAspect->SetType(aType); |
57 | } |
58 | |
59 | void Prs3d_PointAspect::SetScale(const Standard_Real aScale){ |
60 | myAspect->SetScale(aScale); |
61 | } |
62 | |
63 | Handle (Graphic3d_AspectMarker3d) Prs3d_PointAspect::Aspect () const { |
64 | return myAspect; |
65 | } |
7fd59977 |
66 | |
1a75746e |
67 | void Prs3d_PointAspect::SetAspect( const Handle( Graphic3d_AspectMarker3d )& theAspect ) |
68 | { |
69 | myAspect = theAspect; |
70 | } |
71 | |
7fd59977 |
72 | void Prs3d_PointAspect::GetTextureSize(Standard_Integer& AWidth, Standard_Integer& AHeight) |
73 | { |
74 | myAspect->GetTextureSize( AWidth, AHeight); |
75 | } |
76 | |
a577aaab |
77 | const Handle(Graphic3d_MarkerImage)& Prs3d_PointAspect::GetTexture() |
7fd59977 |
78 | { |
a577aaab |
79 | return myAspect->GetMarkerImage(); |
7fd59977 |
80 | } |