mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028876: Tests, Image_Diff - the image difference is unavailable for test case bugs vis bug28205_1
Quantity_ColorRGBA - added method SetValues(). Image_PixMap::PixelColor() now returns Quantity_ColorRGBA instead of Quantity_Color. Image_PixMap::SetPixelColor() now takes Quantity_ColorRGBA instead of NCollection_Vec4<float>. Image_Diff has been improved to support Image_Format_Gray. Image_Diff::SaveDiffImage() now saves image difference in Image_Format_Gray format to reduce size of image file. Image_Diff now uses TColStd_HPackedMapOfInteger instead of TColStd_MapOfInteger with manual memory allocation.
This commit is contained in:
@@ -5848,17 +5848,16 @@ static int VReadPixel (Draw_Interpretor& theDI,
|
||||
return 1;
|
||||
}
|
||||
|
||||
Standard_Real anAlpha;
|
||||
Quantity_Color aColor = anImage.PixelColor (anX, anY, anAlpha);
|
||||
Quantity_ColorRGBA aColor = anImage.PixelColor (anX, anY);
|
||||
if (toShowName)
|
||||
{
|
||||
if (aBufferType == Graphic3d_BT_RGBA)
|
||||
{
|
||||
theDI << Quantity_Color::StringName (aColor.Name()) << " " << anAlpha;
|
||||
theDI << Quantity_Color::StringName (aColor.GetRGB().Name()) << " " << aColor.Alpha();
|
||||
}
|
||||
else
|
||||
{
|
||||
theDI << Quantity_Color::StringName (aColor.Name());
|
||||
theDI << Quantity_Color::StringName (aColor.GetRGB().Name());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5870,22 +5869,22 @@ static int VReadPixel (Draw_Interpretor& theDI,
|
||||
{
|
||||
if (toShowHls)
|
||||
{
|
||||
theDI << aColor.Hue() << " " << aColor.Light() << " " << aColor.Saturation();
|
||||
theDI << aColor.GetRGB().Hue() << " " << aColor.GetRGB().Light() << " " << aColor.GetRGB().Saturation();
|
||||
}
|
||||
else
|
||||
{
|
||||
theDI << aColor.Red() << " " << aColor.Green() << " " << aColor.Blue();
|
||||
theDI << aColor.GetRGB().Red() << " " << aColor.GetRGB().Green() << " " << aColor.GetRGB().Blue();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Graphic3d_BT_RGBA:
|
||||
{
|
||||
theDI << aColor.Red() << " " << aColor.Green() << " " << aColor.Blue() << " " << anAlpha;
|
||||
theDI << aColor.GetRGB().Red() << " " << aColor.GetRGB().Green() << " " << aColor.GetRGB().Blue() << " " << aColor.Alpha();
|
||||
break;
|
||||
}
|
||||
case Graphic3d_BT_Depth:
|
||||
{
|
||||
theDI << aColor.Red();
|
||||
theDI << aColor.GetRGB().Red();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user