Markup definition
4.0
The A3DMkpAnnotationItemData structure references an A3DMkpMarkup. This markup contains tessellation, leaders, and linked item information that is available by using the function A3DMkpMarkupGet(). In addition this markup can contain also definition and specific data. Those data are stored in common structure A3DMarkupDefinitionData and in a specific structure corresponding to the type return by the function A3DEntityGetType(). For the structures corresponding to markups with definition, only access functions are defined. In other words, the customer can only create A3DMkpMarkup.
The following illustration shows the available methods to retrieve all the data. In yellow, the data stored in the structure; in blue, the access function defined for corresponding structure.
Here, it samples of the two ways to obtain markup data. In the first case, the markup contains only a tessellation, a type, and a sub type, in the second case, considering a markup text creation, the markup contains specific data (text, text properties (font…), position definition, display options, with a tessellation, a type, and a sub type.
See the following sample code:
//markupdata
A3DEEntityTypeeType;
A3DInt32iRet=A3DEntityGetType(pMarkup,&eType);
//if(iRet!=A3D_SUCCESS)exit
if(eType==kA3DTypeMkpMarkup)
{
//nodefinitionisset,noinformationtoretrieve
//terminate...
}
//markupdefinitiondata
A3DMarkupDefinitionDatasDataDefinition;
A3D_INITIALIZE_DATA(A3DMarkupDefinitionData,sDataDefinition);
A3DInt32iRet=A3DMarkupDefinitionGet((A3DMarkupDefinition*)pMarkup,&sDataDefinition);//sDataDefinitioncontainsbasicdefinitioninformation
//specificdata
A3DMarkupTextDatasTextData;
A3DMarkupDimensionDatasDimensionData;
switch(eType)
{
casekA3DTypeMarkupText:
A3DMarkupTextDatasTextData;
A3D_INITIALIZE_DATA(A3DMarkupTextData,sTextData);
A3DInt32iRet=A3DMarkupTextGet((A3DMarkupText*)pMarkup,&sTextData);
break;
casekA3DTypeMarkupDimension:
A3DMarkupDimensionDatasDimensionData;
A3D_INITIALIZE_DATA(A3DMarkupDimensionData,sDimensionData);
A3DInt32iRet=A3DMarkupTextGet((A3DMarkupDimension*)pMarkup,&sDimensionData);
break;
casekA3DTypeMarkupGDT:
A3DMarkupGDTDatasGDTData;
A3D_INITIALIZE_DATA(A3DMarkupGDTData,sGDTData);
A3DInt32iRet=A3DMarkupGDTGet((A3DMarkupGDT*)pMarkup,&sGDTData);
break;
...samethingforalltypes
default:
break;
}
Parameters
pMarkupDefinition: is the markup.
pIsScreenLocation: true if the position of the markup is a screen position.
pPosition: is the 2D position of the markup.
pOffsetAnchorPoint: is the offset of position of the markup.
Returns
A3D_SUCCESSon success, or an error code on failure
Topics
Structures
Functions
A3DMDTextPropertiesGet()A3DMarkupDefinitionGet()A3DMarkupPositionIsScreenLocation()A3DMDTextPropertiesCreate()A3DMDTextPositionCreate()A3DMDLeaderDefinitionSet()A3DMarkupDefinitionSet()