1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

5 Commits

Author SHA1 Message Date
kgv
aaf8d6a98d 0030969: Coding Rules - refactor Quantity_Color.cxx color table definition
The table of named colors has been compressed and moved out
from Quantity_Color.cxx into Quantity_ColorTable.pxx.

Quantity_NameOfColor - grayscale enumeration values have been re-ordered to fix discontinuity.
Duplicating colors has been merged within enumeration:
  CHARTREUSE=CHARTREUSE1, GOLD=GOLD1, GREEN=GREEN1, ORANGE=ORANGE1,
  ORANGERED=ORANGERED1, RED=RED1, TOMATO=TOMATO1, YELLOW=YELLOW1.
Added aliases to several other common colors:
  BLUE=BLUE1, CYAN=CYAN1, LIGHTCYAN=LIGHTCYAN1, MAGENTA=MAGENTA1.

Quantity_Color class definition has been cleaned to follow OCCT coding style.
Quantity_Color now stores NCollection_Vec3<float> as class field instead of separate components.
Removed unused class Quantity_ColorDefinitionError.

New methods Quantity_Color::Convert_LinearRGB_To_sRGB() and Quantity_Color::Convert_sRGB_To_LinearRGB()
converting RGB components from linear to non-linear sRGB colorspace and vice versa.
Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended
with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats.

Draw Harness command AISColor has been corrected to take color name instead of enumeration index.
2019-10-22 15:15:51 +03:00
kgv
4b3d6eb1d2 0028004: Visualization, AIS_ColorScale - allow defining labels list not equal to intervals list
Cosmetics, code clean up.

AIS_ColorScale now draw labels using Graphic3d_VTA_CENTER
vertical alignment flag, instead of incorrect own alignment logic.
The color bar now adds margin on the top simmetrical to the bottom.

AIS_ColorScale::SetSmoothTransition() - added new property
for displaying colorscale with smooth transition between color intervals.

AIS_ColorScale::SetHueRange() - added new property defining the hue angles
corresponding to minimal and maximum values on the color scale.

AIS_ColorScale::SetLabels() now allows setting the sequence of free labels,
which number does not match the number of intervals.
In this case the labels will be displayed at positions of virtual
intervals corresponding to the number of labels.
2016-12-22 12:39:35 +03:00
abv
180f89a29e 0027058: AIS_ColorScale defines methods SetColor and SetWidth hiding inherited methods
Interface of AIS_ColorScale is revised to make it more consistent:

- Methods SetBgColor()/GetBGColor(), and corresponding field, are removed. It was used to select white or black color for the color bar frame (by contrast). That color can now be set explicitly by inherited method SetColor().
- Own methods Get/SetColor() are renamed to Get/SetIntervalColor(), to avoid confusion with inherited method SetColor()
- Methods Get/SetWidth() are renamed to Get/SetBreadth(), to avoid confusion with inherited method SetWidth()
- Method Get/Set for labels and colors, and DRAW command vcolorscale, now all accept index starting at 1
- Comments added to explain indexation rules
2016-01-12 01:55:33 +03:00
isz
7a324550c8 0025785: Visualization - introduce AIS_ColorScale presentation for Color Scale
Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale.
In a qt sample VoxelDemo there was added a field AIS_ColorScale myColorsScale to control a color scale. Method displayColorScale and other methods were changed in order to work with this field.
2015-08-13 11:00:58 +03:00
isz
7121535194 0025136: Visualization - fix multiple Aspect_ColorScale usage issues
Update documentat if the class.
SetColor() and SetLabel() now work with 0-based index.
SetColor() now checks length of myColors.
Remove methods GetCurrentColor() and GetCurrentLabel().
Methods GetColor() and GetLabel() now can be used to get user-specified and default colors / labels.
Round down IntervNumber in FindColor().
DrawScale() - show labels even for one interval.

Redesign Draw Harness command vcolorscale, provide new options.
Update test cases which use vcolorscale command.
2015-02-19 15:16:19 +03:00