MKI_ENUMDEF_DATA (Basic Classes) Changed in Version 2024.1 |
www.CAD6.com |
C++ Syntaxclass MKI_ENUMDEF_DATA { public:
__int32 m_nEnumData, m_nEnumCount, m_nEnumFlag1, m_nEnumFlag2;
__int64 m_nEnumResult, m_nEnumMode; bool m_fEnumStopped;
MKI_XPROPERTY m_cOriginalXProperty, m_cResolvedXProperty; double m_dLineLengthScale; MKI_FONTDEF m_cFont; double m_dCharDistance, m_dTabDistance, m_dLineDistance; __int32 m_nTextMode, m_nTextVertical, m_nTextOrder, m_nSystem; MKI_BITMAP_EFFECT m_cBitmapEffect; MKI_POINTDATA_PTR m_pPointData; MKI_MATRIX_PTR m_pMatrix; MKI_POINT m_cTextPos; __int32 m_nChar; LPCWSTR m_pszText, m_pszTitle, m_pszName;
MKI_ENTITY_OBJECT_PTR m_pObj; MKI_ENTITY_INSTANCE_PTR m_pInst; MKI_ENTITY_BLOCK_PTR m_pBlock; MKI_ENTITY_CLIP_PTR m_pClip; MKI_ENTITY_REF_PTR m_pRef; MKI_ENTITY_PATCH_PTR m_pPatch; MKI_ENTITY_MAPPING_PTR m_pMap; MKI_ENTITY_GROUP_PTR m_pGroup; MKI_ENTITY_HATCH_PTR m_pHatch; MKI_ENTITY_EXT_PTR m_pExt;
MKI_RECT m_cEntityRect; __int32 m_nObjectType;
MKI_HIDELAYERS m_afHideLayers; MKI_LAYERDATA m_cLayerData;
void Init( void ); New in Version 2022.1
__int32 MKI_CONST_RECT_REF f_rRect );
__int32 MKI_CONST_RECT_REF f_rRect, MKI_POINTDATA_PTR f_pResult, __int32 f_nSize );
__int32 __int32 f_nStartIndex ) const;
__int32 __int32 f_nStartIndex, MKI_CONST_POINT_REF f_rPoint ) const;
__int32 __int32 f_nStartIndex, MKI_CONST_POINT_REF f_rPoint ) const; };
This structure contains a complete enumeration data description.
Element DescriptionEnumData [__int32] This value indicates what type of data is coded in this structure, see MKI_ENUMDATA_*. EnumCount [__int32] Number of elements currently available. What type of elements are currently available depends on the the value of EnumData. Be sure never to access more elements than stated here! EnumFlag1 [__int32] First enumeration flag as passed to the enumeration procedure that produced this structure (see e.g. MKI_EnumerateAll). EnumFlag2 [__int32] Second enumeration flag as passed to the enumeration procedure that produced this structure (see e.g. MKI_EnumerateAll). EnumResult New in Version 2022.1 [__int64] Current enumeration warnings (see MKI_WARNING_*). You can set bits here to report problems to your calling procedure. EnumMode [__int64] Enumeration mode as passed to the enumeration procedure that produced this structure (see e.g. MKI_EnumerateAll). EnumStopped [bool] Indicates whether the enumeration has been stopped by a callback procedure returning false. OriginalXProperty [MKI_XPROPERTY] Extended properties of the original object that is currently being enumerated (valid for MKI_ENUMDATA_CURVE, MKI_ENUMDATA_SURFACE, MKI_ENUMDATA_MARK, MKI_ENUMDATA_CHAR, MKI_ENUMDATA_TEXT and MKI_ENUMDATA_INST). This property set does not contain the final properties of the enumeration data, but the set of extended properties that were used to calculate those final properties. Use these properties if you want to create a new drawing object that has the same or similar properties as the original object. ResolvedXProperty [MKI_XPROPERTY] Final extended properties of the current enumeration data resulting from pen and layer property resolving (valid for MKI_ENUMDATA_CURVE, MKI_ENUMDATA_SURFACE, MKI_ENUMDATA_MARK, MKI_ENUMDATA_CHAR, MKI_ENUMDATA_TEXT, MKI_ENUMDATA_INST, MKI_ENUMDATA_INST_START, MKI_ENUMDATA_INST_END, MKI_ENUMDATA_EMBED_START, and MKI_ENUMDATA_EMBED_END). This property set contains the final properties and has been calculated based on the original object properties and the according pen and layer settings. Use these properties if you want to interpret the properties e.g. during export to a different file format. LineLengthScale New in Version 2010.2 [double] Relative scaling of line-width-independent line type lengths, if any. Otherwise 1.0. Font [MKI_FONTDEF] Font description of the current enumeration data (valid for MKI_ENUMDATA_CHAR, MKI_ENUMDATA_TEXT and MKI_ENUMDATA_USED_FONT). CharDistance [double] The value CharDistance determines the gap between two characters (valid for MKI_ENUMDATA_TEXT). This gap is stated relative to the font size. A value of 0.1 at a font size of 10pt will result in a character gap of 1pt. Allowed values are -10.0 to +10.0. The default value for TrueType and device fonts should be 0.0, for internal fonts 0.125. TabDistance [double] The value TabDistance determines the distance between two tabulators (valid for MKI_ENUMDATA_TEXT). This distance is stated relative to the font size. A value of 4.0 at a font size of 5 mm will result in a tabulator distance of 20 mm. Allowed values are -100.0 to 100.0. The default value is 4.0. LineDistance [double] The value LineDistance determines the offset between two lines of text, measured from baseline to baseline (valid for MKI_ENUMDATA_TEXT). This offset is stated relative to the font size. A value of 1.2 at a font size of 10pt will lead to a line offset of 12pt. Allowed values are -10.0 to 10.0. The default value is 1.0. TextMode [__int32] The value TextMode states the position of the text relative to the insertion point (valid for MKI_ENUMDATA_TEXT) (see MKI_TEXTMODE_*). Block mode is not supported. TextVertical New in Version 6.50 [__int32] The value TextVertical states the vertical position of the text relative to the insertion point (see MKI_TEXTVERTICAL_*). TextOrder [__int32] The value TextOrder defines the reading order of the text (valid for MKI_ENUMDATA_TEXT) (see MKI_TEXTORDER_*). System New in Version 2017.0 [__int32] Index of the coordinate system the text shall be based on. BitmapEffect New in Version 2024.1 [MKI_BITMAP_EFFECT] Options for live image processing. PointData Changed in Version 2021.0 [MKI_POINTDATA_PTR] Definition point coordinates of a curve or mark list, plus point type, handle, and outline index (valid for MKI_ENUMDATA_CURVE, MKI_ENUMDATA_SURFACE and MKI_ENUMDATA_MARK). Matrix [MKI_MATRIX_PTR] Display matrix(es) (valid for MKI_ENUMDATA_CURVE, MKI_ENUMDATA_SURFACE, MKI_ENUMDATA_MARK, MKI_ENUMDATA_CHAR, MKI_ENUMDATA_TEXT, MKI_ENUMDATA_INST, MKI_ENUMDATA_INST_START, MKI_ENUMDATA_INST_END, MKI_ENUMDATA_EMBED_START, MKI_ENUMDATA_EMBED_END, MKI_ENUMDATA_REF, MKI_ENUMDATA_REF_START, MKI_ENUMDATA_REF_END, and MKI_ENUMDATA_BITMAP). Be sure to always apply this matrix if EnumMode includes the MKI_ENUM_MATRIX flag! TextPos New in Version 2024.1 [MKI_POINT] Current text output position (valid for MKI_ENUMDATA_TEXTPOS). Char Changed in Version 2019.1 [__int32] A single UTF-32 character (valid for MKI_ENUMDATA_CHAR). Valid range is 0x00000000 to 0x0010ffff. Text Changed in Version 2019.1 [LPCWSTR] Address of a null-terminated UTF-16 character string (valid for MKI_ENUMDATA_TEXT) or library name (valid for MKI_ENUMDATA_INST, MKI_ENUMDATA_INST_START, MKI_ENUMDATA_INST_END, MKI_ENUMDATA_USED_BLOCK, and MKI_ENUMDATA_USED_BITMAP). Title New in Version 2020.0 [LPCWSTR] Address of a null-terminated UTF-16 library title (valid for MKI_ENUMDATA_INST, MKI_ENUMDATA_INST_START, and MKI_ENUMDATA_INST_END). Name [LPCWSTR] Block name (valid for MKI_ENUMDATA_INST, MKI_ENUMDATA_INST_START, MKI_ENUMDATA_INST_END, MKI_ENUMDATA_EMBED_START, MKI_ENUMDATA_EMBED_END, and MKI_ENUMDATA_USED_BLOCK), address of a bitmap file name (valid for MKI_ENUMDATA_BITMAP), or address of a drawing file name (valid for MKI_ENUMDATA_DRAWING). Obj [MKI_ENTITY_OBJECT_PTR] Address of a native object (valid for MKI_ENUMDATA_NATIVE_OBJ). Inst [MKI_ENTITY_INSTANCE_PTR] Address of a native instance (valid for MKI_ENUMDATA_NATIVE_INST). Block [MKI_ENTITY_BLOCK_PTR] Address of a native block (valid for MKI_ENUMDATA_NATIVE_BLOCK). Clip [MKI_ENTITY_CLIP_PTR] Address of a native clipping surface object (valid for MKI_ENUMDATA_NATIVE_CLIP, MKI_ENUMDATA_CLIP_START, and MKI_ENUMDATA_CLIP_END). Ref New in Version 6.20 [MKI_ENTITY_REF_PTR] Address of a native drawing reference object (valid for MKI_ENUMDATA_NATIVE_REF). Patch New in Version 6.31 [MKI_ENTITY_PATCH_PTR] Address of a native patch (valid for MKI_ENUMDATA_NATIVE_PATCH). Map New in Version 6.61 [MKI_ENTITY_MAPPING_PTR] Address of a native mapping (valid for MKI_ENUMDATA_NATIVE_MAP). Group New in Version 2017.0 [MKI_ENTITY_GROUP_PTR] Address of a native group (valid for MKI_ENUMDATA_NATIVE_GROUP, MKI_ENUMDATA_GROUP_START, and MKI_ENUMDATA_GROUP_END). Hatch New in Version 2018.2 [MKI_ENTITY_HATCH_PTR] Address of a native hatching (valid for MKI_ENUMDATA_NATIVE_HATCH, MKI_ENUMDATA_HATCH_START, and MKI_ENUMDATA_HATCH_END). Ext [MKI_ENTITY_EXT_PTR] Address of a native extended object (valid for MKI_ENUMDATA_NATIVE_EXT). EntityRect New in Version 2021.1 [MKI_RECT] Surrounding frame of the top-level entity that resulted in this enumeration. This value is valid only if the enumeration was started by one of the following commands: MKI_EnumerateAll, MKI_EnumeratePageRect, MKI_EnumeratePage, MKI_EnumerateEntity. Otherwise, it is undefined. ObjectType New in Version 6.0 [__int32] Type of original object that created the given enumeration data. This value is valid only if EnumData has one of the following values: MKI_ENUMDATA_CURVE, MKI_ENUMDATA_SURFACE, MKI_ENUMDATA_MARK, MKI_ENUMDATA_CHAR, MKI_ENUMDATA_TEXT, MKI_ENUMDATA_ENDLESS, MKI_ENUMDATA_BITMAP. Otherwise, it is negative. See MKI_ObjectOpen for a list of all possible object types. HideLayers New in Version 6.61 [MKI_HIDELAYERS] This array contains one bit for each layer indicating if the layer shall be output or not. LayerData New in Version 2016.0 [MKI_LAYERDATA] This array contains currently valid property modifications for all layers as applied by mappings.
CommentIf EnumData is either MKI_ENUMDATA_CURVE, MKI_ENUMDATA_SURFACE, MKI_ENUMDATA_CLIP_START, MKI_ENUMDATA_CLIP_END, MKI_ENUMDATA_HATCH_START, MKI_ENUMDATA_HATCH_END, MKI_ENUMDATA_MAP_START, or MKI_ENUMDATA_MAP_END, this structure describes a "poly-curve". Such a curve is the standard representation form of all output data created be the serving application. Its structure is based on the structure of Object 12 "Curve" and Object 13 "Surface". Following is a short description of this object, adapted to the different circumstances. Each point type in PointData[].m_nType is directly corresponding to the point stored in PointData[].m_cPoint. This type of data is resulting from an EnumMode containing at least one of the values MKI_ENUM_LINES, MKI_ENUM_FILLS, MKI_ENUM_ARCS or MKI_ENUM_BEZIERS.
A poly-curve is a collection of several curves, each defining one (open or closed) area. A curve starts with a start-point (type MKI_DB_POINT_START) followed by a sequence of curve elements. Three types of curve elements are available:
Line A line is simply defined by stating its end-point (type MKI_DB_POINT_END). The line is drawn from the curve's current end-point to the line's end-point. The line's end-point then becomes the curve's current end-point.
Bézier curve A Bézier curve is defined by stating two pivot points (type MKI_DB_POINT_PIVOT1 and MKI_DB_POINT_PIVOT2) and an end-point (type MKI_DB_POINT_END). The Bézier curve is drawn from the curve's current end-point (named 'S') to the Bézier curve's end-point (named 'E'), influenced by the two pivot points (named P1 and P2). The Bézier curve's end-point then becomes the curve's current end-point. The points P of such a Bézier curve are calculated using the following equation: P = (1-t)³×S + 3t(1-t)²×P1 + 3t²(1-t)×P2 + t³×E (0<=t<=1)
Circular arc A circular arc is defined by two points. The first is of type MKI_DB_POINT_ARC and contains the end-point of the arc, the second is of type MKI_DB_ALL_CURVE and contains Curvature in the x-coordinate, Orientation in the y-coordinate of the point. The arc is drawn from the curve's current end-point (named 'S') to the arc's end-point (named 'E'), influenced by its orientation and curvature. The arc's end-point then becomes the curve's current end-point. The value Orientation determines whether to draw the arc in clockwise direction (Orientation < 0) or in counter-clockwise direction (Orientation >= 0). The value Curvature determines the radius of the arc in indirect manner. In can be handled in two ways. In geometrical view, the absolute value of Curvature is 1/(2 tan( ß/2 )), where ß is the arc-angle of the circular arc. The sign of Curvature determines, which of the two possible arcs to use. In practical use, this definition is not very handy. Instead, Curvature should be used to perform a simple vector calculation to obtain the arc's defining center-point M: x(M) = 0.5 * ( x(S) + x(E) ) - Curvature * ( y(E) - y(S) ) y(M) = 0.5 * ( y(S) + y(E) ) + Curvature * ( x(E) - x(S) ) After calculating the center-point, all points required to draw a standard circular arc are known. The allowed value range of Curvature is ±1e100.
Each curve ends if either a new curve is started by a new start-point (type MKI_DB_POINT_START) or the complete surface is ended. If EnumData is MKI_ENUMDATA_SURFACE, each curve is defined as closed, i.e. its start-point and end-point are to be connected by a line.
If a filled poly-curve consists of only one curve, simply the inside area of that curve will be filled:
If a filled poly-curve consists of multiple curves, they will be filled alternately, i.e. only areas overlapped by an odd number of curve's insides will be filled. If, e.g., a small round curve lies inside a large one, this small round curve will be transparent, as its inside in overlapped by two curves (even number!):
If a poly-curve is drawn with a non-solid line type, this line type has to be continued during each curve. A poly-curve may contain up to 100 nested curves.
|
CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH