misc.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #pragma once
11 
12 #include <dbcolor.h>
13 #include <dbents.h>
14 #include <gevec3d.h>
15 #include <hc.h>
16 
17 #include <set>
18 #include <map>
19 
20 HC_KEY My_Insert_Circle(double const * ip1, double const * ip2, double const * ip3);
21 void copy_dwg_matrix(double matrix[16], AcGeMatrix3d const & autocad_matrix);
22 bool get_single_precision_matrix(int const attribute_precision_mode, bool * generated_double, const double in_matrix[16], float out_matrix[16]);
23 void calculate_alignment(AcDbText * in_text, char * out_alignment);
24 void calculate_alignment(AcDbMText::AttachmentPoint attachmentPoint, char * out_alignment);
25 void insert_arrow(AcGePoint3d startPoint, AcGePoint3d endPoint);
26 void generate_glyph_definitions();
27 
28 #define DWG_HASH_BYTES 16
29 #define DWG_HASH_SIZE 2*DWG_HASH_BYTES+1
30 
31 struct mTextData
32 {
33 public:
34  std::map<AcDbHandle, HC_KEY> mtext_handles;
35  std::set<HC_KEY> mtext_segments;
36 };
37 
38 class DWG_HASH
39 {
40 private:
41  char m_str[DWG_HASH_SIZE];
42 public:
43  DWG_HASH(void const * input, size_t const len);
44  ~DWG_HASH();
45 
46  operator const char* () const;
47 };
48 
49 bool applyColor(AcCmEntityColor const & color, bool open_segment = false);
Definition: misc.h:38
Definition: misc.h:31