1 // Created on: 1993-01-11
2 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESGraph_Color_HeaderFile
18 #define _IGESGraph_Color_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Real.hxx>
24 #include <IGESData_ColorEntity.hxx>
25 #include <Standard_Boolean.hxx>
26 class TCollection_HAsciiString;
29 class IGESGraph_Color;
30 DEFINE_STANDARD_HANDLE(IGESGraph_Color, IGESData_ColorEntity)
32 //! defines IGESColor, Type <314> Form <0>
33 //! in package IGESGraph
35 //! The Color Definition Entity is used to communicate the
36 //! relationship of primary colors to the intensity level of
37 //! the respective graphics devices as a percent of full
39 class IGESGraph_Color : public IGESData_ColorEntity
45 Standard_EXPORT IGESGraph_Color();
47 //! This method is used to set the fields of the class Color
48 //! - red : Red color intensity (range 0.0 to 100.0)
49 //! - green : Green color intensity (range 0.0 to 100.0)
50 //! - blue : Blue color intensity (range 0.0 to 100.0)
51 //! - aColorName : Name of the color (optional)
52 Standard_EXPORT void Init (const Standard_Real red, const Standard_Real green, const Standard_Real blue, const Handle(TCollection_HAsciiString)& aColorName);
54 Standard_EXPORT void RGBIntensity (Standard_Real& Red, Standard_Real& Green, Standard_Real& Blue) const;
56 Standard_EXPORT void CMYIntensity (Standard_Real& Cyan, Standard_Real& Magenta, Standard_Real& Yellow) const;
58 Standard_EXPORT void HLSPercentage (Standard_Real& Hue, Standard_Real& Lightness, Standard_Real& Saturation) const;
60 //! returns True if optional character string is assigned,
62 Standard_EXPORT Standard_Boolean HasColorName() const;
64 //! if HasColorName() is True returns the Verbal description of
66 Standard_EXPORT Handle(TCollection_HAsciiString) ColorName() const;
71 DEFINE_STANDARD_RTTIEXT(IGESGraph_Color,IGESData_ColorEntity)
82 Standard_Real theGreen;
83 Standard_Real theBlue;
84 Handle(TCollection_HAsciiString) theColorName;
95 #endif // _IGESGraph_Color_HeaderFile