Functions providing conversion between different measurement units and different image types.
More...
|
enum | API_UnitConversionPrefID {
APIUnitConv_WorkModel
, APIUnitConv_WorkLayout
, APIUnitConv_WorkAngle
, APIUnitConv_DimLinear
,
APIUnitConv_DimAngle
, APIUnitConv_DimRadial
, APIUnitConv_DimLevel
, APIUnitConv_DimElevation
,
APIUnitConv_DimDoorWindow
, APIUnitConv_DimParapet
, APIUnitConv_DimArea
, APIUnitConv_CalcLength
,
APIUnitConv_CalcArea
, APIUnitConv_CalcVolume
, APIUnitConv_CalcAngle
} |
| Describes the supported Project Preferences to use with ACAPI_Conversion_GetConvertedUnitValue.
|
|
Functions providing conversion between different measurement units and different image types.
◆ ACAPI_Conversion_ConvertMimePicture()
GSErrCode ACAPI_Conversion_ConvertMimePicture |
( |
API_MimePicture * |
mimePicture | ) |
|
Converts a picture into another image format using MIME types.
- Parameters
-
mimePicture | [in/out] Parameters of the source and the destination picture. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - The input parameters are not given correctly (see API_MimePicture)
- APIERR_MEMFULL - Not enough memory to create the new pictHdl
You can pass a special output type "vnd/DIB" to create a device independent bitmap on Windows. Conversion from one pixel depth to another is not supported at the moment. You can use the ACAPI_Conversion_ConvertPicture goody function for converting images with API_PictureFormat identifiers rather than MIME types. Remember to dispose the returned outputHdl when it is not needed any more. See more options at the description of the API_MimePicture structure.
- Example
Converting a TIFF figure placed on the floorplan into a PNG format image:
◆ ACAPI_Conversion_ConvertPicture()
Converts a picture into another image format.
- Parameters
-
oldPict | [in] Parameters of the source picture. The old format and data must be passed in the storageFormat and pictHdl fields, respectively. |
newPict | [in/out] Parameters of the destination picture. The new format of the picture must be passed in the storageFormat field. The pictHdl field will be returned according to the specified format. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - parameters are nullptr or storage formats are invalid
- APIERR_MEMFULL - Not enough memory to create the new pictHdl
◆ ACAPI_Conversion_GetConvertedUnitValue()
Returns the value of a physical property (length/area/volume/angle) in the unit of the given Project Preference.
- Parameters
-
api_unitConvData | [in/out] You can specify in it the value to convert, and the Project Preference with which to convert. The environment function returns the converted value, extra accuracy and unit string in the same struct. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - api_unitConvData is nullptr, or api_unitConvData->unitConvPref is invalid.
◆ APIGuid2GSGuid() [1/2]
GS::Guid & APIGuid2GSGuid |
( |
API_Guid & |
guid | ) |
|
|
inline |
Converting from API_Guid to a GS::Guid.
- Parameters
-
- Returns
- Converted guid.
◆ APIGuid2GSGuid() [2/2]
const GS::Guid & APIGuid2GSGuid |
( |
const API_Guid & |
guid | ) |
|
|
inline |
Converting from API_Guid to GS::Guid.
- Parameters
-
- Returns
- Converted guid.
◆ APIGuidFromString()
API_Guid APIGuidFromString |
( |
const char * |
str | ) |
|
|
inline |
Converting from a string to an API_Guid.
- Parameters
-
str | String representation of guid. |
- Returns
- Converted guid.
◆ APIGuidToString()
GS::UniString APIGuidToString |
( |
const API_Guid & |
guid | ) |
|
|
inline |
Converting the API_Guid to a GS::UniString.
- Parameters
-
- Returns
- Guid represented in GS::UniString.
◆ GSGuid2APIGuid() [1/2]
const API_Guid & GSGuid2APIGuid |
( |
const GS::Guid & |
guid | ) |
|
|
inline |
Converting from GS::Guid to API_Guid.
- Parameters
-
guid | The GS::Guid to convert. |
- Returns
- Converted guid.
◆ GSGuid2APIGuid() [2/2]
API_Guid & GSGuid2APIGuid |
( |
GS::Guid & |
guid | ) |
|
|
inline |
Converting from GS::Guid to API_Guid.
- Parameters
-
guid | The GS::Guid to convert. |
- Returns
- Converted guid.