Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:30

0001 // Created on: 2013-01-28
0002 // Created by: Kirill GAVRILOV
0003 // Copyright (c) 2013-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef Font_FTLibrary_HeaderFile
0017 #define Font_FTLibrary_HeaderFile
0018 
0019 #include <Standard_Type.hxx>
0020 #include <Standard_Transient.hxx>
0021 
0022 // forward declarations to avoid including of FreeType headers
0023 typedef struct FT_LibraryRec_ *FT_Library;
0024 
0025 //! Wrapper over FT_Library. Provides access to FreeType library.
0026 class Font_FTLibrary : public Standard_Transient
0027 {
0028 
0029 public:
0030 
0031   //! Initialize new FT_Library instance.
0032   Standard_EXPORT Font_FTLibrary();
0033 
0034   //! Release FT_Library instance.
0035   Standard_EXPORT ~Font_FTLibrary();
0036 
0037   //! This method should always return true.
0038   //! @return true if FT_Library instance is valid.
0039   bool IsValid() const
0040   {
0041     return myFTLib != NULL;
0042   }
0043 
0044   //! Access FT_Library instance.
0045   FT_Library Instance() const
0046   {
0047     return myFTLib;
0048   }
0049 
0050 private:
0051 
0052   FT_Library myFTLib;
0053 
0054 private:
0055 
0056   Font_FTLibrary            (const Font_FTLibrary& );
0057   Font_FTLibrary& operator= (const Font_FTLibrary& );
0058 
0059 public:
0060 
0061   DEFINE_STANDARD_RTTIEXT(Font_FTLibrary,Standard_Transient) // Type definition
0062 
0063 };
0064 
0065 DEFINE_STANDARD_HANDLE(Font_FTLibrary, Standard_Transient)
0066 
0067 #endif // _Font_FTLibrary_H__