0023024: Update headers of OCCT files
[occt.git] / src / DsgPrs / DsgPrs_SymbPresentation.cxx
1 // Created on: 1995-12-08
2 // Created by: Jean-Pierre COMBE
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 //
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
10 //
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 //
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
20
21
22
23 #include <DsgPrs_SymbPresentation.ixx>
24
25 #include <Prs3d_LineAspect.hxx>
26 #include <Prs3d_LengthAspect.hxx>
27 #include <Prs3d_TextAspect.hxx>
28 #include <Prs3d_PointAspect.hxx>
29 #include <Geom_CartesianPoint.hxx>
30 #include <StdPrs_Point.hxx>
31 #include <TCollection_AsciiString.hxx>
32 #include <Prs3d_Text.hxx>
33 #include <Aspect_TypeOfMarker.hxx>
34
35 void DsgPrs_SymbPresentation::Add (const Handle(Prs3d_Presentation)& aPresentation,
36                                    const Handle(Prs3d_Drawer)& aDrawer,
37                                    const TCollection_ExtendedString& aText,
38                                    const gp_Pnt& OffsetPoint) 
39 {
40   Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
41   Handle(Prs3d_TextAspect) TA = LA->TextAspect();
42   TA->SetColor(Quantity_NOC_GREEN);
43   Prs3d_Text::Draw(aPresentation,TA,aText, OffsetPoint);
44   
45   // 2eme groupe : marker
46   Handle(Geom_CartesianPoint) theP = new Geom_CartesianPoint(OffsetPoint);
47   Handle(Prs3d_PointAspect) PA = aDrawer->PointAspect();
48   PA->SetTypeOfMarker(Aspect_TOM_RING2);
49   StdPrs_Point::Add(aPresentation,theP,aDrawer);
50 }
51
52