|
|
|||
File indexing completed on 2026-07-04 08:32:31
0001 // Copyright (c) 2020 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _Image_SupportedFormats_HeaderFile 0015 #define _Image_SupportedFormats_HeaderFile 0016 0017 #include <Image_CompressedFormat.hxx> 0018 #include <NCollection_Array1.hxx> 0019 #include <Standard_Type.hxx> 0020 0021 //! Structure holding information about supported texture formats. 0022 class Image_SupportedFormats : public Standard_Transient 0023 { 0024 DEFINE_STANDARD_RTTIEXT(Image_SupportedFormats, Standard_Transient) 0025 public: 0026 //! Empty constructor. 0027 Standard_EXPORT Image_SupportedFormats(); 0028 0029 //! Return TRUE if image format is supported. 0030 bool IsSupported(Image_Format theFormat) const { return myFormats.Value(theFormat); } 0031 0032 //! Set if image format is supported or not. 0033 void Add(Image_Format theFormat) { myFormats.SetValue(theFormat, true); } 0034 0035 //! Return TRUE if there are compressed image formats supported. 0036 bool HasCompressed() const { return myHasCompressed; } 0037 0038 //! Return TRUE if compressed image format is supported. 0039 bool IsSupported(Image_CompressedFormat theFormat) const { return myFormats.Value(theFormat); } 0040 0041 //! Set if compressed image format is supported or not. 0042 void Add(Image_CompressedFormat theFormat) 0043 { 0044 myFormats.SetValue(theFormat, true); 0045 myHasCompressed = true; 0046 } 0047 0048 //! Reset flags. 0049 void Clear() 0050 { 0051 myFormats.Init(false); 0052 myHasCompressed = false; 0053 } 0054 0055 protected: 0056 NCollection_Array1<bool> myFormats; //!< list of supported formats 0057 // clang-format off 0058 Standard_Boolean myHasCompressed; //!< flag indicating that some compressed image formats are supported 0059 // clang-format on 0060 }; 0061 0062 #endif // _Image_SupportedFormats_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|