A3DSDKMarkup.h

Header file for the markup module.

Author

Tech Soft 3D

Version

23.0

Date

January 2023

Copyright (c) 2010 - 2023 by Tech Soft 3D, Inc. All rights reserved.

Content

Data Structures

A3DMkpLeaderData

Markup Leader structure.

A3DMkpAnnotationItemData

Annotation Item structure.

A3DMkpAnnotationSetData

Annotation Set structure.

A3DMkpAnnotationReferenceData

Annotation Reference structure.

A3DMkpViewData

View structure.

A3DMkpViewFlagsData

The set of activated components in a View.

A3DMiscMarkupLinkedItemData

Markup Linked Item structure.

A3DMkpMarkupData

Markup structure.

A3DMkpRTFFieldData

Structure used to parse RTF strings.

A3DFontKeyData

Font key structure.

A3DFontData

Font structure.

Type definitions

A3DMkpRTFField

Entity type for RTF Field.

A3DRTFFieldData

Functions

A3DMkpLeaderGet()

Populates the A3DMkpLeaderData structure.

A3DMkpLeaderCreate()

Creates an A3DMkpLeader from an A3DMkpLeaderData structure.

A3DMkpAnnotationItemGet()

Populates the A3DMkpAnnotationItemData structure.

A3DMkpAnnotationItemCreate()

Creates an A3DMkpAnnotationItem from an A3DMkpAnnotationItemData structure.

A3DMkpAnnotationSetGet()

Populates the A3DMkpAnnotationSetData structure.

A3DMkpAnnotationSetCreate()

Creates an A3DMkpAnnotationSet from an A3DMkpAnnotationSetData structure.

A3DMkpAnnotationReferenceGet()

Populates the A3DMkpAnnotationReferenceData structure.

A3DMkpAnnotationReferenceCreate()

Creates an A3DMkpAnnotationReference from an A3DMkpAnnotationReferenceData structure.

A3DMkpViewGet()

Populates the A3DMkpViewData structure.

A3DMkpViewCreate()

Creates an A3DMkpView from an A3DMkpViewData structure.

A3DMkpViewGetFlags()

Returns the set of components for a view using a A3DMkpViewFlagsData .

A3DMiscMarkupLinkedItemGet()

Populates the A3DMiscMarkupLinkedItemData structure.

A3DMiscMarkupLinkedItemCreate()

Creates an A3DMiscMarkupLinkedItem from an A3DMiscMarkupLinkedItemData structure.

A3DMkpMarkupGet()

Populates the A3DMkpMarkupData structure.

A3DMkpMarkupCreate()

Creates the A3DMkpMarkup from A3DMkpMarkupData structure.

A3DMkpLinkForMarkupReferenceGet()

Get links corresponding to the A3DMkpMarkup references This function allocates and returns an array of A3DMiscMarkupLinkedItem .

A3DMkpLinkForAdditionalMarkupReferenceGet()

Get links corresponding to the A3DMkpMarkup additional references such as element defining the toleranced line for line profile.

A3DMkpRTFFieldCreate()

Initialize RTF data for parsing Previously A3DMkpRTFInit.

A3DMkpRTFInit()

Initialize RTF data for parsing.

A3DMkpRTFFieldGet()

Get each independent field of a RTF data Previously A3DMkpRTFGetField.

A3DMkpRTFGetField()

Get each independent field of a RTF data.

A3DMkpRTFFieldDelete()

delete RTF data created by A3DMkpRTFInit Previously A3DMkpRTFDelete.

A3DMkpRTFDelete()

delete RTF data created by A3DMkpRTFInit

A3DGlobalFontKeyGet()

Retrieves font information ( A3DFontData ) from the A3DFontKeyData structure.

A3DGlobalFontTextBoxGet()

Gets text bounding box according to the font.

A3DGlobalFontTextBoxAndScaleGet()

Gets text bounding box and scale according to the font.

A3DGlobalFontKeyCreate()

Creates the A3DFontKeyData structure from the A3DFontData structure.

A3DGlobalFontTextTessellationGet()

Gets text tessellation as wireframe.

Type definitions

typedef void A3DMkpRTFField

Entity type for RTF Field.

Data is A3DMkpRTFFieldData

typedef A3DMkpRTFFieldData A3DRTFFieldData

Deprecated:

This type is deprecated. Please use the A3DRTFFieldData to implement the same behaviour.

Functions

A3DStatus A3DMkpLeaderGet(const A3DMkpLeader *pLeader, A3DMkpLeaderData *pData)

Populates the A3DMkpLeaderData structure.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpLeaderCreate(const A3DMkpLeaderData *pData, A3DMkpLeader **ppLeader)

Creates an A3DMkpLeader from an A3DMkpLeaderData structure.

Version

2.0

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpAnnotationItemGet(const A3DMkpAnnotationItem *pAnnotation, A3DMkpAnnotationItemData *pData)

Populates the A3DMkpAnnotationItemData structure.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpAnnotationItemCreate(const A3DMkpAnnotationItemData *pData, A3DMkpAnnotationItem **ppAnnotation)

Creates an A3DMkpAnnotationItem from an A3DMkpAnnotationItemData structure.

Version

2.0

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpAnnotationSetGet(const A3DMkpAnnotationSet *pAnnotation, A3DMkpAnnotationSetData *pData)

Populates the A3DMkpAnnotationSetData structure.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpAnnotationSetCreate(const A3DMkpAnnotationSetData *pData, A3DMkpAnnotationSet **ppAnnotation)

Creates an A3DMkpAnnotationSet from an A3DMkpAnnotationSetData structure.

Version

2.0

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_ANNOTATIONSET_WITH_NULL_ELEMENT

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpAnnotationReferenceGet(const A3DMkpAnnotationReference *pAnnotation, A3DMkpAnnotationReferenceData *pData)

Populates the A3DMkpAnnotationReferenceData structure.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpAnnotationReferenceCreate(const A3DMkpAnnotationReferenceData *pData, A3DMkpAnnotationReference **ppAnnotation)

Creates an A3DMkpAnnotationReference from an A3DMkpAnnotationReferenceData structure.

Version

2.0

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpViewGet(const A3DMkpView *pView, A3DMkpViewData *pData)

Populates the A3DMkpViewData structure.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpViewCreate(const A3DMkpViewData *pData, A3DMkpView **ppView)

Creates an A3DMkpView from an A3DMkpViewData structure.

Version

2.0

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpViewGetFlags(const A3DMkpView *pView, A3DMkpViewFlagsData *pFlags)

Returns the set of components for a view using a A3DMkpViewFlagsData.

Version

7.1

Parameters
  • pView[in] The view to get components info from.

  • pFlags[out] The set of flags to write in.

Return values
  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMiscMarkupLinkedItemGet(const A3DMiscMarkupLinkedItem *pLinkedItem, A3DMiscMarkupLinkedItemData *pData)

Populates the A3DMiscMarkupLinkedItemData structure.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMiscMarkupLinkedItemCreate(const A3DMiscMarkupLinkedItemData *pData, A3DMiscMarkupLinkedItem **ppLinkedItem)

Creates an A3DMiscMarkupLinkedItem from an A3DMiscMarkupLinkedItemData structure.

Version

2.0

Return values
Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpMarkupGet(const A3DMkpMarkup *pMarkup, A3DMkpMarkupData *pData)

Populates the A3DMkpMarkupData structure.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpMarkupCreate(const A3DMkpMarkupData *pData, A3DMkpMarkup **ppMarkup)

Creates the A3DMkpMarkup from A3DMkpMarkupData structure.

Version

2.0

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpLinkForMarkupReferenceGet(const A3DMkpMarkup *pMarkup, A3DUns32 *puiLinkedItemsSize, A3DMiscMarkupLinkedItem ***ppLinkedItems)

Get links corresponding to the A3DMkpMarkup references This function allocates and returns an array of A3DMiscMarkupLinkedItem.

To free the allocated array, the function must be called again with pMarkup as NULL.

Remark

Internally there are several types of links such as reference, position, additional reference, owner or datum.This function only returns the reference links.

Version

6.0

Parameters
  • pMarkup[in] The A3DMkpMarkup entity to get linked item list from. If NULL, pppLinkedItems is freed instead of being allocated.

  • puiLinkedItemsSize[out] The number of A3DMiscMarkupLinkedItem in the resulting array.

  • ppLinkedItems[out] The resulting array.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpLinkForAdditionalMarkupReferenceGet(const A3DMkpMarkup *pMarkup, A3DUns32 *puiLinkedItemsSize, A3DMiscMarkupLinkedItem ***pppLinkedItems)

Get links corresponding to the A3DMkpMarkup additional references such as element defining the toleranced line for line profile.

This function allocates and returns an array of A3DMiscMarkupLinkedItem. To free the allocated array, the function must be called again with pMarkup as NULL.

Remark

Internally there are several types of links such as reference, position, additional reference, owner or datum.This function only returns the additional reference links.

Version

6.0

Version

9.0

Parameters
  • pMarkup[in] The A3DMkpMarkup entity to get linked item list from. If NULL, pppLinkedItems is freed instead of being allocated.

  • puiLinkedItemsSize[out] The number of A3DMiscMarkupLinkedItem in the resulting array.

  • pppLinkedItems[out] The resulting array.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpRTFFieldCreate(const A3DUTF8Char *pRTFString, A3DMkpRTFField **pRTFField)

Initialize RTF data for parsing Previously A3DMkpRTFInit.

Version

10.1

Return values
  • A3D_ERROR

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpRTFInit(const A3DUTF8Char *pRTF, A3DVoid **pRTFData)

Initialize RTF data for parsing.

Deprecated:

This function is deprecated. Please use the A3DMkpRTFFieldCreate to implement the same behaviour.

Version

4.2

Return values
  • A3D_ERROR

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpRTFFieldGet(const A3DMkpRTFField *pRTFField, A3DMkpRTFFieldData *pRTFFieldData)

Get each independent field of a RTF data Previously A3DMkpRTFGetField.

Version

10.1

Return values
  • A3D_ERROR

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpRTFGetField(A3DVoid *pRTFData, A3DRTFFieldData *pRTFField)

Get each independent field of a RTF data.

Deprecated:

This function is deprecated. Please use the A3DMkpRTFFieldGet to implement the same behaviour.

Version

4.2

Return values
  • A3D_ERROR

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpRTFFieldDelete(const A3DMkpRTFField *pRTFField)

delete RTF data created by A3DMkpRTFInit Previously A3DMkpRTFDelete.

Version

10.1

Return values
  • A3D_ERROR

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMkpRTFDelete(A3DVoid *pRTFData)

delete RTF data created by A3DMkpRTFInit

Deprecated:

This function is deprecated. Please use the A3DMkpRTFFieldDelete to implement the same behaviour.

Version

4.2

Return values
  • A3D_ERROR

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DGlobalFontKeyGet(const A3DFontKeyData *pFontKeyData, A3DFontData *pFontData)

Retrieves font information (A3DFontData) from the A3DFontKeyData structure.

This function is useful when reading markup tessellation.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_MARKUP_CANNOT_ACCESS_FONT

  • A3D_MARKUP_INVALID_FONTKEY

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DGlobalFontTextBoxGet(const A3DFontKeyData *psFontKeyData, A3DUTF8Char *pcText, A3DDouble *pdLength, A3DDouble *pdHeight)

Gets text bounding box according to the font.

Version

5.2

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_MARKUP_CANNOT_ACCESS_FONT

  • A3D_MARKUP_INVALID_FONTKEY

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DGlobalFontTextBoxAndScaleGet(const A3DFontKeyData *psFontKeyData, A3DUTF8Char *pcText, A3DDouble *pdLength, A3DDouble *pdHeight, A3DDouble *pdScale)

Gets text bounding box and scale according to the font.

Version

7.2

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_MARKUP_CANNOT_ACCESS_FONT

  • A3D_MARKUP_INVALID_FONTKEY

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DGlobalFontKeyCreate(const A3DFontData *pFontData, A3DFontKeyData *pFontKeyData)

Creates the A3DFontKeyData structure from the A3DFontData structure.

Version

2.0

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_MARKUP_CANNOT_CREATE_FONTKEY

  • A3D_MARKUP_INVALID_FONTKEY

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DGlobalFontTextTessellationGet(const A3DFontKeyData *psFontKeyData, const A3DUTF8Char *pcOneChar, A3DRiSet **ppset, A3DDouble *pdCharWidth)

Gets text tessellation as wireframe.

Version

6.1

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_MARKUP_CANNOT_ACCESS_FONT

  • A3D_MARKUP_INVALID_FONTKEY

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code