Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/AIS_ColorScale.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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