|
|
|||
File indexing completed on 2026-09-22 08:58:22
0001 // Created on: 1993-01-11 0002 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA ) 0003 // Copyright (c) 1993-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _IGESGraph_LineFontDefPattern_HeaderFile 0018 #define _IGESGraph_LineFontDefPattern_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <NCollection_Array1.hxx> 0023 #include <NCollection_HArray1.hxx> 0024 #include <IGESData_LineFontEntity.hxx> 0025 #include <Standard_Integer.hxx> 0026 #include <Standard_Real.hxx> 0027 class TCollection_HAsciiString; 0028 0029 //! defines IGESLineFontDefPattern, Type <304> Form <2> 0030 //! in package IGESGraph 0031 //! 0032 //! Line Font may be defined by repetition of a basic pattern 0033 //! of visible-blank(or, on-off) segments superimposed on 0034 //! a line or a curve. The line or curve is then displayed 0035 //! according to the basic pattern. 0036 class IGESGraph_LineFontDefPattern : public IGESData_LineFontEntity 0037 { 0038 0039 public: 0040 Standard_EXPORT IGESGraph_LineFontDefPattern(); 0041 0042 //! This method is used to set the fields of the class 0043 //! LineFontDefPattern 0044 //! - allSegLength : Containing lengths of respective segments 0045 //! - aPattern : HAsciiString indicating visible-blank segments 0046 Standard_EXPORT void Init(const occ::handle<NCollection_HArray1<double>>& allSegLength, 0047 const occ::handle<TCollection_HAsciiString>& aPattern); 0048 0049 //! returns the number of segments in the visible-blank pattern 0050 Standard_EXPORT int NbSegments() const; 0051 0052 //! returns the Length of Index'th segment of the basic pattern 0053 //! raises exception if Index <= 0 or Index > NbSegments 0054 Standard_EXPORT double Length(const int Index) const; 0055 0056 //! returns the string indicating which segments of the basic 0057 //! pattern are visible and which are blanked. 0058 //! e.g: 0059 //! theNbSegments = 5 and if Bit Pattern = 10110, which means that 0060 //! segments 2, 3 and 5 are visible, whereas segments 1 and 4 are 0061 //! blank. The method returns "2H16" as the HAsciiString. 0062 //! Note: The bits are right justified. (16h = 10110) 0063 Standard_EXPORT occ::handle<TCollection_HAsciiString> DisplayPattern() const; 0064 0065 //! The Display Pattern is decrypted to 0066 //! return True if the Index'th basic pattern is Visible, 0067 //! False otherwise. 0068 //! If Index > NbSegments or Index <= 0 then return value is 0069 //! False. 0070 Standard_EXPORT bool IsVisible(const int Index) const; 0071 0072 DEFINE_STANDARD_RTTIEXT(IGESGraph_LineFontDefPattern, IGESData_LineFontEntity) 0073 0074 private: 0075 occ::handle<NCollection_HArray1<double>> theSegmentLengths; 0076 occ::handle<TCollection_HAsciiString> theDisplayPattern; 0077 }; 0078 0079 #endif // _IGESGraph_LineFontDefPattern_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|