1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00
occt/src/IGESGraph/IGESGraph_Color.cdl
abv d5f74e42d6 0024624: Lost word in license statement in source files
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast
Wrong license statements corrected in several files.
Copyright and license statements added in XSD and GLSL files.
Copyright year updated in some files.
Obsolete documentation files removed from DrawResources.
2014-02-20 16:15:17 +04:00

107 lines
3.7 KiB
Plaintext

-- Created on: 1993-01-11
-- Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Color from IGESGraph inherits ColorEntity
---Purpose : defines IGESColor, Type <314> Form <0>
-- in package IGESGraph
--
-- The Color Definition Entity is used to communicate the
-- relationship of primary colors to the intensity level of
-- the respective graphics devices as a percent of full
-- intensity range.
uses
IGESEntity from IGESData,
HAsciiString from TCollection
is
Create returns mutable Color;
-- Specific Methods pertaining to class
Init (me : mutable;
red : Real;
green : Real;
blue : Real;
aColorName : HAsciiString);
---Purpose : This method is used to set the fields of the class Color
-- - red : Red color intensity (range 0.0 to 100.0)
-- - green : Green color intensity (range 0.0 to 100.0)
-- - blue : Blue color intensity (range 0.0 to 100.0)
-- - aColorName : Name of the color (optional)
RGBIntensity (me; Red, Green, Blue : out Real);
-- returns the RGB intensities in the Red, Green, Blue
-- fields respectively
CMYIntensity (me; Cyan, Magenta, Yellow : out Real);
-- returns the CMY equivalents of RGB intensities.
--
-- The algorithm used for getting CMY from RGB is :
--
-- C = 100.0 - R where : R = red C = cyan
-- G = 100.0 - M G = green M = magenta
-- B = 100.0 - Y B = blue Y = yellow
--
HLSPercentage (me; Hue, Lightness, Saturation : out Real);
-- returns the HLS equivalents of RGB intensities.
--
-- The algorithm used for getting HLS from RGB is :
--
-- H = (1/(2*PI))*ARCTAN((2*R - G - B) / (SQUAREROOT(3)*(G - B)))
-- L = (1 / 3)*(R + G + B)
-- S = SQUAREROOT(R*R + G*G + B*B - R*G - R*B - B*G)
--
-- where H = Hue, L = Lightness, S = Saturation,
-- PI = 3.14... (constant)
--
HasColorName (me) returns Boolean;
---Purpose : returns True if optional character string is assigned,
-- False otherwise.
ColorName (me) returns HAsciiString from TCollection;
---Purpose : if HasColorName() is True returns the Verbal description of
-- the Color.
fields
--
-- Class : IGESGraph_Color
--
-- Purpose : Declaration of the variables specific to Color
--
-- Reminder : A Color is defined by :
-- - Red color intensity
-- - Green color intensity
-- - Blue color intensity
-- - Optional name of the color
--
theRed : Real;
theGreen : Real;
theBlue : Real;
theColorName : HAsciiString;
end Color;