1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0028441: Coding Rules - move out nested Image_PixMap::ImgFormat enumeration to dedicated enum Image_Format

Enumeration Image_PixMap::ImgFormat, previously declared as nested
enumeration within class *Image_PixMap*,
has been moved to global namespace as Image_Format following OCCT coding rules.

The enumeration values have suffix Image_Format_ and preserve
previous name scheme for easy renaming of old values.
E.g. Image_PixMap::ImgGray become Image_Format_Gray.
Old definitions are preserved as depreacated aliases to the new ones.
This commit is contained in:
kgv
2017-02-05 13:47:27 +03:00
committed by bugmaster
parent e6afb53983
commit dc858f4c5a
25 changed files with 307 additions and 274 deletions

View File

@@ -757,7 +757,7 @@ Standard_Boolean Draw_Window::Save (const char* theFileName) const
Image_AlienPixMap anImage;
bool isBigEndian = Image_PixMap::IsBigEndianHost();
const Standard_Size aSizeRowBytes = Standard_Size(winAttr.width) * 4;
if (!anImage.InitTrash (isBigEndian ? Image_PixMap::ImgRGB32 : Image_PixMap::ImgBGR32,
if (!anImage.InitTrash (isBigEndian ? Image_Format_RGB32 : Image_Format_BGR32,
Standard_Size(winAttr.width), Standard_Size(winAttr.height), aSizeRowBytes))
{
return Standard_False;
@@ -1796,7 +1796,7 @@ static Standard_Boolean SaveBitmap (HBITMAP theHBitmap,
Image_AlienPixMap anImage;
const Standard_Size aSizeRowBytes = Standard_Size(aBitmap.bmWidth) * 4;
if (!anImage.InitTrash (Image_PixMap::ImgBGR32, Standard_Size(aBitmap.bmWidth), Standard_Size(aBitmap.bmHeight), aSizeRowBytes))
if (!anImage.InitTrash (Image_Format_BGR32, Standard_Size(aBitmap.bmWidth), Standard_Size(aBitmap.bmHeight), aSizeRowBytes))
{
return Standard_False;
}