0024428: Implementation of LGPL license
[occt.git] / src / Aspect / Aspect_AspectMarker.cxx
CommitLineData
b311480e 1// Created by: NW,JPB,CAL
2// Copyright (c) 1991-1999 Matra Datavision
973c2be1 3// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
973c2be1 7// This library is free software; you can redistribute it and / or modify it
8// under the terms of the GNU Lesser General Public version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
16//-Version
17
0d969553
Y
18//-Design Declaration of variables specific to the context
19// of tracing of markers
7fd59977 20
0d969553
Y
21//-Warning Context of tracing of markers is defined by :
22// - the color
23// - the type
24// - the scale
7fd59977 25
26//-References
27
28//-Language C++ 2.0
29
30//-Declarations
31
32// for the class
33#include <Aspect_AspectMarker.ixx>
34
35//-Aliases
36
37//-Global data definitions
38
0d969553 39// -- color
7fd59977 40// MyColor : Color;
41
0d969553 42// -- type
7fd59977 43// MyType : TypeOfMarker;
44
0d969553 45// -- scale
7fd59977 46// MyScale : Standard_Real;
47
48//-Constructors
49
50//-Destructors
51
52//-Methods, in order
53
54Aspect_AspectMarker::Aspect_AspectMarker () {
55
56 MyColor = Quantity_NOC_YELLOW;
57 MyType = Aspect_TOM_X;
58 MyScale = 1.0;
59
60}
61
62Aspect_AspectMarker::Aspect_AspectMarker (const Quantity_Color& AColor, const Aspect_TypeOfMarker AType, const Standard_Real AScale) {
63
64 if (AScale <= 0.0)
65 Aspect_AspectMarkerDefinitionError::Raise
66 ("Bad value for MarkerScale");
67
68 MyColor = AColor;
69 MyType = AType;
70 MyScale = AScale;
71
72}
73
74void Aspect_AspectMarker::SetColor (const Quantity_Color& AColor) {
75
76 MyColor = AColor;
77
78}
79
80void Aspect_AspectMarker::SetType (const Aspect_TypeOfMarker AType) {
81
82 MyType = AType;
83
84}
85
86void Aspect_AspectMarker::SetScale (const Standard_Real AScale) {
87
88 if (AScale <= 0.0)
89 Aspect_AspectMarkerDefinitionError::Raise
90 ("Bad value for MarkerScale");
91
92 MyScale = AScale;
93
94}
95
96void Aspect_AspectMarker::Values (Quantity_Color& AColor, Aspect_TypeOfMarker& AType, Standard_Real& AScale) const {
97
98 AColor = MyColor;
99 AType = MyType;
100 AScale = MyScale;
101
102}