Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:54

0001 // Created on: 2015-02-03
0002 // Copyright (c) 2015 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _AIS_ColorScale_HeaderFile
0016 #define _AIS_ColorScale_HeaderFile
0017 
0018 #include <AIS_InteractiveObject.hxx>
0019 #include <Aspect_TypeOfColorScaleData.hxx>
0020 #include <Aspect_TypeOfColorScalePosition.hxx>
0021 #include <Aspect_SequenceOfColor.hxx>
0022 #include <Standard.hxx>
0023 #include <Standard_DefineHandle.hxx>
0024 #include <TCollection_ExtendedString.hxx>
0025 #include <TColStd_SequenceOfExtendedString.hxx>
0026 
0027 class AIS_ColorScale;
0028 DEFINE_STANDARD_HANDLE(AIS_ColorScale, AIS_InteractiveObject)
0029 //! Class for drawing a custom color scale.
0030 //!
0031 //! The color scale consists of rectangular color bar (composed of fixed
0032 //! number of color intervals), optional labels, and title.
0033 //! The labels can be positioned either at the boundaries of the intervals,
0034 //! or at the middle of each interval.
0035 //! Colors and labels can be either defined automatically or set by the user.
0036 //! Automatic labels are calculated from numerical limits of the scale,
0037 //! its type (logarithmic or plain), and formatted by specified format string.
0038 class AIS_ColorScale : public AIS_InteractiveObject
0039 {
0040   DEFINE_STANDARD_RTTIEXT(AIS_ColorScale, AIS_InteractiveObject)
0041 public:
0042 
0043   //! Calculate color according passed value; returns true if value is in range or false, if isn't
0044   Standard_EXPORT static Standard_Boolean FindColor (const Standard_Real theValue,
0045                                                      const Standard_Real theMin,
0046                                                      const Standard_Real theMax,
0047                                                      const Standard_Integer theColorsCount,
0048                                                      const Graphic3d_Vec3d& theColorHlsMin,
0049                                                      const Graphic3d_Vec3d& theColorHlsMax,
0050                                                      Quantity_Color& theColor);
0051 
0052   //! Calculate color according passed value; returns true if value is in range or false, if isn't
0053   static Standard_Boolean FindColor (const Standard_Real theValue,
0054                                      const Standard_Real theMin,
0055                                      const Standard_Real theMax,
0056                                      const Standard_Integer theColorsCount,
0057                                      Quantity_Color& theColor)
0058   {
0059     return FindColor (theValue, theMin, theMax, theColorsCount,
0060                       Graphic3d_Vec3d (230.0, 1.0, 1.0),
0061                       Graphic3d_Vec3d (0.0,   1.0, 1.0),
0062                       theColor);
0063   }
0064 
0065   //! Shift hue into valid range.
0066   //! Lightness and Saturation should be specified in valid range [0.0, 1.0],
0067   //! however Hue might be given out of Quantity_Color range to specify desired range for interpolation.
0068   static Standard_Real hueToValidRange (const Standard_Real theHue)
0069   {
0070     Standard_Real aHue = theHue;
0071     while (aHue <   0.0) { aHue += 360.0; }
0072     while (aHue > 360.0) { aHue -= 360.0; }
0073     return aHue;
0074   }
0075 
0076 public:
0077 
0078   //! Default constructor.
0079   Standard_EXPORT AIS_ColorScale();
0080 
0081   //! Calculate color according passed value; returns true if value is in range or false, if isn't
0082   Standard_EXPORT Standard_Boolean FindColor (const Standard_Real theValue, Quantity_Color& theColor) const;
0083 
0084   //! Returns minimal value of color scale, 0.0 by default.
0085   Standard_Real GetMin() const { return myMin; }
0086 
0087   //! Sets the minimal value of color scale.
0088   void SetMin (const Standard_Real theMin) { SetRange (theMin, GetMax()); }
0089 
0090   //! Returns maximal value of color scale, 1.0 by default.
0091   Standard_Real GetMax() const { return myMax; }
0092 
0093   //! Sets the maximal value of color scale.
0094   void SetMax (const Standard_Real theMax) { SetRange (GetMin(), theMax); }
0095 
0096   //! Returns minimal and maximal values of color scale, 0.0 to 1.0 by default.
0097   void GetRange (Standard_Real& theMin, Standard_Real& theMax) const
0098   {
0099     theMin = myMin;
0100     theMax = myMax;
0101   }
0102 
0103   //! Sets the minimal and maximal value of color scale.
0104   //! Note that values order will be ignored - the minimum and maximum values will be swapped if needed.
0105   //! ::SetReversed() should be called to swap displaying order.
0106   Standard_EXPORT void SetRange (const Standard_Real theMin, const Standard_Real theMax);
0107 
0108   //! Returns the hue angle corresponding to minimum value, 230 by default (blue).
0109   Standard_Real HueMin() const { return myColorHlsMin[0]; }
0110 
0111   //! Returns the hue angle corresponding to maximum value, 0 by default (red).
0112   Standard_Real HueMax() const { return myColorHlsMax[0]; }
0113 
0114   //! Returns the hue angle range corresponding to minimum and maximum values, 230 to 0 by default (blue to red).
0115   void HueRange (Standard_Real& theMinAngle,
0116                  Standard_Real& theMaxAngle) const
0117   {
0118     theMinAngle = myColorHlsMin[0];
0119     theMaxAngle = myColorHlsMax[0];
0120   }
0121 
0122   //! Sets hue angle range corresponding to minimum and maximum values.
0123   //! The valid angle range is [0, 360], see Quantity_Color and Quantity_TOC_HLS for more details.
0124   void SetHueRange (const Standard_Real theMinAngle,
0125                     const Standard_Real theMaxAngle)
0126   {
0127     myColorHlsMin[0] = theMinAngle;
0128     myColorHlsMax[0] = theMaxAngle;
0129   }
0130 
0131   //! Returns color range corresponding to minimum and maximum values, blue to red by default.
0132   void ColorRange (Quantity_Color& theMinColor,
0133                    Quantity_Color& theMaxColor) const
0134   {
0135     theMinColor.SetValues (hueToValidRange (myColorHlsMin[0]), myColorHlsMin[1], myColorHlsMin[2], Quantity_TOC_HLS);
0136     theMaxColor.SetValues (hueToValidRange (myColorHlsMax[0]), myColorHlsMax[1], myColorHlsMax[2], Quantity_TOC_HLS);
0137   }
0138 
0139   //! Sets color range corresponding to minimum and maximum values.
0140   void SetColorRange (const Quantity_Color& theMinColor,
0141                       const Quantity_Color& theMaxColor)
0142   {
0143     theMinColor.Values (myColorHlsMin[0], myColorHlsMin[1], myColorHlsMin[2], Quantity_TOC_HLS);
0144     theMaxColor.Values (myColorHlsMax[0], myColorHlsMax[1], myColorHlsMax[2], Quantity_TOC_HLS);
0145   }
0146 
0147   //! Returns the type of labels, Aspect_TOCSD_AUTO by default.
0148   //! Aspect_TOCSD_AUTO - labels as boundary values for intervals
0149   //! Aspect_TOCSD_USER - user specified label is used
0150   Aspect_TypeOfColorScaleData GetLabelType() const { return myLabelType; }
0151 
0152   //! Sets the type of labels.
0153   //! Aspect_TOCSD_AUTO - labels as boundary values for intervals
0154   //! Aspect_TOCSD_USER - user specified label is used
0155   void SetLabelType (const Aspect_TypeOfColorScaleData theType) { myLabelType = theType; }
0156 
0157   //! Returns the type of colors, Aspect_TOCSD_AUTO by default.
0158   //! Aspect_TOCSD_AUTO - value between Red and Blue
0159   //! Aspect_TOCSD_USER - user specified color from color map
0160   Aspect_TypeOfColorScaleData GetColorType() const { return myColorType; }
0161 
0162   //! Sets the type of colors.
0163   //! Aspect_TOCSD_AUTO - value between Red and Blue
0164   //! Aspect_TOCSD_USER - user specified color from color map
0165   void SetColorType (const Aspect_TypeOfColorScaleData theType) { myColorType = theType; }
0166 
0167   //! Returns the number of color scale intervals, 10 by default.
0168   Standard_Integer GetNumberOfIntervals() const { return myNbIntervals; }
0169 
0170   //! Sets the number of color scale intervals.
0171   Standard_EXPORT void SetNumberOfIntervals (const Standard_Integer theNum);
0172 
0173   //! Returns the color scale title string, empty string by default.
0174   const TCollection_ExtendedString& GetTitle() const { return myTitle; }
0175 
0176   //! Sets the color scale title string.
0177   void SetTitle (const TCollection_ExtendedString& theTitle) { myTitle = theTitle; }
0178 
0179   //! Returns the format for numbers, "%.4g" by default.
0180   //! The same like format for function printf().
0181   //! Used if GetLabelType() is TOCSD_AUTO;
0182   const TCollection_AsciiString& GetFormat() const { return myFormat; }
0183 
0184   //! Returns the format of text.
0185   const TCollection_AsciiString& Format() const { return myFormat; }
0186 
0187   //! Sets the color scale auto label format specification.
0188   void SetFormat (const TCollection_AsciiString& theFormat) { myFormat = theFormat; }
0189 
0190   //! Returns the user specified label with index theIndex.
0191   //! Index is in range from 1 to GetNumberOfIntervals() or to
0192   //! GetNumberOfIntervals() + 1 if IsLabelAtBorder() is true.
0193   //! Returns empty string if label not defined.
0194   Standard_EXPORT TCollection_ExtendedString GetLabel (const Standard_Integer theIndex) const;
0195 
0196   //! Returns the user specified color from color map with index (starts at 1).
0197   //! Returns default color if index is out of range in color map.
0198   Standard_EXPORT Quantity_Color GetIntervalColor (const Standard_Integer theIndex) const;
0199 
0200   //! Sets the color of the specified interval. 
0201   //! Note that list is automatically resized to include specified index.
0202   //! @param theColor color value to set
0203   //! @param theIndex index in range [1, GetNumberOfIntervals()];
0204   //!                 appended to the end of list if -1 is specified
0205   Standard_EXPORT void SetIntervalColor (const Quantity_Color& theColor, const Standard_Integer theIndex);
0206 
0207   //! Returns the user specified labels.
0208   Standard_EXPORT void GetLabels (TColStd_SequenceOfExtendedString& theLabels) const;
0209 
0210   //! Returns the user specified labels.
0211   const TColStd_SequenceOfExtendedString& Labels() const { return myLabels; }
0212 
0213   //! Sets the color scale labels.
0214   //! The length of the sequence should be equal to GetNumberOfIntervals() or to GetNumberOfIntervals() + 1 if IsLabelAtBorder() is true.
0215   //! If length of the sequence does not much the number of intervals,
0216   //! then these labels will be considered as "free" and will be located
0217   //! at the virtual intervals corresponding to the number of labels
0218   //! (with flag IsLabelAtBorder() having the same effect as in normal case).
0219   Standard_EXPORT void SetLabels (const TColStd_SequenceOfExtendedString& theSeq);
0220 
0221   //! Returns the user specified colors.
0222   Standard_EXPORT void GetColors (Aspect_SequenceOfColor& theColors) const;
0223 
0224   //! Returns the user specified colors.
0225   const Aspect_SequenceOfColor& GetColors() const { return myColors; }
0226 
0227   //! Sets the color scale colors.
0228   //! The length of the sequence should be equal to GetNumberOfIntervals().
0229   Standard_EXPORT void SetColors (const Aspect_SequenceOfColor& theSeq);
0230 
0231   //! Populates colors scale by colors of the same lightness value in CIE Lch
0232   //! color space, distributed by hue, with perceptually uniform differences
0233   //! between consequent colors.
0234   //! See MakeUniformColors() for description of parameters.
0235   void SetUniformColors (Standard_Real theLightness, 
0236                          Standard_Real theHueFrom, Standard_Real theHueTo)
0237   {
0238     SetColors (MakeUniformColors (myNbIntervals, theLightness, theHueFrom, theHueTo));
0239     SetColorType (Aspect_TOCSD_USER);
0240   }
0241 
0242   //! Generates sequence of colors of the same lightness value in CIE Lch
0243   //! color space (see #Quantity_TOC_CIELch), with hue values in the specified range.
0244   //! The colors are distributed across the range such as to have perceptually
0245   //! same difference between neighbour colors.
0246   //! For each color, maximal chroma value fitting in sRGB gamut is used.
0247   //!
0248   //! @param theNbColors - number of colors to generate
0249   //! @param theLightness - lightness to be used (0 is black, 100 is white, 32 is
0250   //!        lightness of pure blue)
0251   //! @param theHueFrom - hue value at the start of the scale
0252   //! @param theHueTo - hue value defining the end of the scale
0253   //! 
0254   //! Hue value can be out of the range [0, 360], interpreted as modulo 360.
0255   //! The colors of the scale will be in the order of increasing hue if
0256   //! theHueTo > theHueFrom, and decreasing otherwise.
0257   Standard_EXPORT static Aspect_SequenceOfColor
0258     MakeUniformColors (Standard_Integer theNbColors, Standard_Real theLightness,
0259                        Standard_Real theHueFrom, Standard_Real theHueTo);
0260 
0261   //! Returns the position of labels concerning color filled rectangles, Aspect_TOCSP_RIGHT by default.
0262   Aspect_TypeOfColorScalePosition GetLabelPosition() const { return myLabelPos; }
0263 
0264   //! Sets the color scale labels position relative to color bar.
0265   void SetLabelPosition (const Aspect_TypeOfColorScalePosition thePos) { myLabelPos = thePos; }
0266 
0267   //! Returns the position of color scale title, Aspect_TOCSP_LEFT by default.
0268   Aspect_TypeOfColorScalePosition GetTitlePosition() const { return myTitlePos; }
0269 
0270   //! Sets the color scale title position.
0271   Standard_DEPRECATED("AIS_ColorScale::SetTitlePosition() has no effect!")
0272   void SetTitlePosition (const Aspect_TypeOfColorScalePosition thePos) { myTitlePos = thePos; }
0273 
0274   //! Returns TRUE if the labels and colors used in reversed order, FALSE by default.
0275   //!  - Normal,   bottom-up order with Minimal value on the Bottom and Maximum value on Top.
0276   //!  - Reversed, top-down  order with Maximum value on the Bottom and Minimum value on Top.
0277   Standard_Boolean IsReversed() const { return myIsReversed; }
0278 
0279   //! Sets true if the labels and colors used in reversed order.
0280   void SetReversed (const Standard_Boolean theReverse) { myIsReversed = theReverse; }
0281 
0282   //! Return TRUE if color transition between neighbor intervals
0283   //! should be linearly interpolated, FALSE by default.
0284   Standard_Boolean IsSmoothTransition() const { return myIsSmooth; }
0285 
0286   //! Setup smooth color transition.
0287   void SetSmoothTransition (const Standard_Boolean theIsSmooth) { myIsSmooth = theIsSmooth; }
0288 
0289   //! Returns TRUE if the labels are placed at border of color intervals, TRUE by default.
0290   //! The automatically generated label will show value exactly on the current position:
0291   //!  - value connecting two neighbor intervals (TRUE)
0292   //!  - value in the middle of interval (FALSE)
0293   Standard_Boolean IsLabelAtBorder() const { return myIsLabelAtBorder; }
0294 
0295   //! Sets true if the labels are placed at border of color intervals (TRUE by default).
0296   //! If set to False, labels will be drawn at color intervals rather than at borders.
0297   void SetLabelAtBorder (const Standard_Boolean theOn) { myIsLabelAtBorder = theOn; }
0298 
0299   //! Returns TRUE if the color scale has logarithmic intervals, FALSE by default.
0300   Standard_Boolean IsLogarithmic() const { return myIsLogarithmic; }
0301 
0302   //! Sets true if the color scale has logarithmic intervals.
0303   void SetLogarithmic (const Standard_Boolean isLogarithmic) { myIsLogarithmic = isLogarithmic; }
0304 
0305   //! Sets the color scale label at index.
0306   //! Note that list is automatically resized to include specified index.
0307   //! @param theLabel new label text
0308   //! @param theIndex index in range [1, GetNumberOfIntervals()] or [1, GetNumberOfIntervals() + 1] if IsLabelAtBorder() is true;
0309   //!                 label is appended to the end of list if negative index is specified
0310   Standard_EXPORT void SetLabel (const TCollection_ExtendedString& theLabel, const Standard_Integer theIndex);
0311 
0312   //! Returns the size of color bar, 0 and 0 by default
0313   //! (e.g. should be set by user explicitly before displaying).
0314   void GetSize (Standard_Integer& theBreadth, Standard_Integer& theHeight) const
0315   {
0316     theBreadth = myBreadth;
0317     theHeight  = myHeight;
0318   }
0319 
0320   //! Sets the size of color bar.
0321   void SetSize (const Standard_Integer theBreadth, const Standard_Integer theHeight)
0322   {
0323     myBreadth = theBreadth;
0324     myHeight  = theHeight;
0325   }
0326 
0327   //! Returns the breadth of color bar, 0 by default
0328   //! (e.g. should be set by user explicitly before displaying).
0329   Standard_Integer GetBreadth() const { return myBreadth; }
0330 
0331   //! Sets the width of color bar.
0332   void SetBreadth (const Standard_Integer theBreadth) { myBreadth = theBreadth; }
0333 
0334   //! Returns the height of color bar, 0 by default
0335   //! (e.g. should be set by user explicitly before displaying).
0336   Standard_Integer GetHeight() const { return myHeight; }
0337 
0338   //! Sets the height of color bar.
0339   void SetHeight (const Standard_Integer theHeight) { myHeight  = theHeight; }
0340 
0341   //! Returns the bottom-left position of color scale, 0x0 by default.
0342   void GetPosition (Standard_Real& theX, Standard_Real& theY) const
0343   {
0344     theX = myXPos;
0345     theY = myYPos;
0346   }
0347 
0348   //! Sets the position of color scale.
0349   void SetPosition (const Standard_Integer theX, const Standard_Integer theY)
0350   {
0351     myXPos = theX;
0352     myYPos = theY;
0353   }
0354 
0355   //! Returns the left position of color scale, 0 by default.
0356   Standard_Integer GetXPosition() const { return myXPos; }
0357 
0358   //! Sets the left position of color scale.
0359   void SetXPosition (const Standard_Integer theX) { myXPos = theX; }
0360 
0361   //! Returns the bottom position of color scale, 0 by default.
0362   Standard_Integer GetYPosition() const { return myYPos; }
0363 
0364   //! Sets the bottom position of color scale.
0365   void SetYPosition (const Standard_Integer theY) { myYPos = theY; }
0366 
0367   //! Returns the font height of text labels, 20 by default.
0368   Standard_Integer GetTextHeight() const { return myTextHeight; }
0369 
0370   //! Sets the height of text of color scale.
0371   void SetTextHeight (const Standard_Integer theHeight) { myTextHeight = theHeight; }
0372 
0373 public:
0374 
0375   //! Returns the width of text.
0376   //! @param theText [in] the text of which to calculate width.
0377   Standard_EXPORT Standard_Integer TextWidth (const TCollection_ExtendedString& theText) const;
0378 
0379   //! Returns the height of text.
0380   //! @param theText [in] the text of which to calculate height.
0381   Standard_EXPORT Standard_Integer TextHeight (const TCollection_ExtendedString& theText) const;
0382 
0383   Standard_EXPORT void TextSize (const TCollection_ExtendedString& theText,
0384                                  const Standard_Integer theHeight,
0385                                  Standard_Integer& theWidth,
0386                                  Standard_Integer& theAscent,
0387                                  Standard_Integer& theDescent) const;
0388 
0389 public:
0390 
0391   //! Return true if specified display mode is supported.
0392   virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
0393 
0394   //! Compute presentation.
0395   Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0396                                         const Handle(Prs3d_Presentation)& thePresentation,
0397                                         const Standard_Integer theMode) Standard_OVERRIDE;
0398 
0399   //! Compute selection - not implemented for color scale.
0400   virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/,
0401                                  const Standard_Integer /*aMode*/) Standard_OVERRIDE {}
0402 
0403 private:
0404 
0405   //! Returns the size of color scale.
0406   //! @param theWidth [out] the width of color scale.
0407   //! @param theHeight [out] the height of color scale.
0408   void SizeHint (Standard_Integer& theWidth, Standard_Integer& theHeight) const;
0409 
0410   //! Returns the upper value of given interval, or minimum for theIndex = 0.
0411   Standard_Real GetIntervalValue (const Standard_Integer theIndex) const;
0412 
0413   //! Returns the color for the given value in the given interval.
0414   //! @param theValue [in] the current value of interval
0415   //! @param theMin   [in] the min value of interval
0416   //! @param theMax   [in] the max value of interval
0417   Quantity_Color colorFromValue (const Standard_Real theValue,
0418                                  const Standard_Real theMin,
0419                                  const Standard_Real theMax) const;
0420 
0421   //! Initialize text aspect for drawing the labels.
0422   void updateTextAspect();
0423 
0424   //! Simple alias for Prs3d_Text::Draw().
0425   //! @param theGroup [in] presentation group
0426   //! @param theText  [in] text to draw
0427   //! @param theX     [in] X coordinate of text position
0428   //! @param theY     [in] Y coordinate of text position
0429   //! @param theVertAlignment [in] text vertical alignment
0430   void drawText (const Handle(Graphic3d_Group)& theGroup,
0431                  const TCollection_ExtendedString& theText,
0432                  const Standard_Integer theX, const Standard_Integer theY,
0433                  const Graphic3d_VerticalTextAlignment theVertAlignment);
0434 
0435   //! Determine the maximum text label width in pixels.
0436   Standard_Integer computeMaxLabelWidth (const TColStd_SequenceOfExtendedString& theLabels) const;
0437 
0438   //! Draw labels.
0439   void drawLabels (const Handle(Graphic3d_Group)& theGroup,
0440                    const TColStd_SequenceOfExtendedString& theLabels,
0441                    const Standard_Integer theBarBottom,
0442                    const Standard_Integer theBarHeight,
0443                    const Standard_Integer theMaxLabelWidth,
0444                    const Standard_Integer theColorBreadth);
0445 
0446   //! Draw a color bar.
0447   void drawColorBar (const Handle(Prs3d_Presentation)& thePrs,
0448                      const Standard_Integer theBarBottom,
0449                      const Standard_Integer theBarHeight,
0450                      const Standard_Integer theMaxLabelWidth,
0451                      const Standard_Integer theColorBreadth);
0452 
0453   //! Draw a frame.
0454   //! @param theX [in] the X coordinate of frame position.
0455   //! @param theY [in] the Y coordinate of frame position.
0456   //! @param theWidth [in] the width of frame.
0457   //! @param theHeight [in] the height of frame.
0458   //! @param theColor [in] the color of frame.
0459   void drawFrame (const Handle(Prs3d_Presentation)& thePrs,
0460                   const Standard_Integer theX, const Standard_Integer theY,
0461                   const Standard_Integer theWidth, const Standard_Integer theHeight,
0462                   const Quantity_Color& theColor);
0463 
0464 private:
0465 
0466   Standard_Real                    myMin;             //!< values range - minimal value
0467   Standard_Real                    myMax;             //!< values range - maximal value
0468   Graphic3d_Vec3d                  myColorHlsMin;     //!< HLS color corresponding to minimum value
0469   Graphic3d_Vec3d                  myColorHlsMax;     //!< HLS color corresponding to maximum value
0470   TCollection_ExtendedString       myTitle;           //!< optional title string     
0471   TCollection_AsciiString          myFormat;          //!< sprintf() format for generating label from value
0472   Standard_Integer                 myNbIntervals;     //!< number of intervals
0473   Aspect_TypeOfColorScaleData      myColorType;       //!< color type
0474   Aspect_TypeOfColorScaleData      myLabelType;       //!< label type
0475   Standard_Boolean                 myIsLabelAtBorder; //!< at border
0476   Standard_Boolean                 myIsReversed;      //!< flag indicating reversed order
0477   Standard_Boolean                 myIsLogarithmic;   //!< flag indicating logarithmic scale
0478   Standard_Boolean                 myIsSmooth;        //!< flag indicating smooth transition between the colors
0479   Aspect_SequenceOfColor           myColors;          //!< sequence of custom colors
0480   TColStd_SequenceOfExtendedString myLabels;          //!< sequence of custom text labels
0481   Aspect_TypeOfColorScalePosition  myLabelPos;        //!< label position relative to the color scale
0482   Aspect_TypeOfColorScalePosition  myTitlePos;        //!< title position
0483   Standard_Integer                 myXPos;            //!< left   position
0484   Standard_Integer                 myYPos;            //!< bottom position
0485   Standard_Integer                 myBreadth;         //!< color scale breadth
0486   Standard_Integer                 myHeight;          //!< height of the color scale
0487   Standard_Integer                 mySpacing;         //!< extra spacing between element
0488   Standard_Integer                 myTextHeight;      //!< label font height
0489 
0490 };
0491 
0492 #endif