Functions
Raster Functions

Functions

RASTERLIB_EXPORT StatusInt mdlRaster_eventGroupEnd (int eventMode)
 End a ground of operation started by mdlRaster_eventGroupStart. More...
 
RASTERLIB_EXPORT StatusInt mdlRaster_eventGroupStart (int eventMode, int commandName)
 Start a group of operation. More...
 
RASTERCORE_EXPORT void mdlRaster_initialize (void)
 Must be the first call to mdlRaster for every application that wants to use mdlRaster API. More...
 
RASTERCORE_EXPORT void mdlRaster_terminate (void)
 Must be called by every application that has finished using mdlRaster API. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_clipBoundaryGet (MSElementDescrP *clipBoundary, int boundaryPlan, DgnRasterCP rasterHandle)
 Retrieves the clip boundary for the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_clipBoundarySet (MSElementDescrCP clipBoundary, int boundaryPlan, DgnRasterP rasterHandle, int eventMode)
 Sets the clip boundary for the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskAdd (MSElementDescrCP clipMask, int maskPlan, DgnRasterP rasterHandle, int eventMode)
 Adds a clip mask to the internal clip mask list for the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskCount (long *count, DgnRasterCP rasterHandle)
 Counts all clip mask associated to the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskGet (MSElementDescrH clipMask, int maskPlan, long clipMaskIndex, DgnRasterCP rasterHandle)
 Retrieves a specific clip mask for the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskRemove (long clipMaskIndex, DgnRasterP rasterHandle, int eventMode)
 Removes a specific clip mask for the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_clipElementValidate (MSElementDescrCP clipElement, DgnModelRefP modelRef)
 Validates an element used as a clipping mask or clipping boundary. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_systemStrokeToleranceCompute (double *preferedTolerance, MSElementDescrCP element)
 Compute the recommended tolerance value for stroking the specified element. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_attach (DgnRasterP rasterP, int eventMode)
 Attach a raster to the active dgn model. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_detach (DgnRasterP rasterP, int eventMode)
 Detach a raster from the active dgn model. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_extendedInfoGet (RasterExtendedInfo *extendedInfo, DgnRasterCP rasterHandle)
 Fills in a RasterExtendedInfo structure with the extended raster information corresponding to the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileOpen (DgnRasterP *rasterHandle, WCharCP filename, DgnModelRefR modelRef, DgnPlatform::Raster::RasterFileAccessMode accessMode, int eventMode)
 Opens the specified raster file. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileClose (DgnRasterP rasterHandle, int eventMode)
 If the file is attached, this function closes the raster file but the raster handle stays valide, which is equivalent to mdlRaster_sourceFileClose. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileReload (DgnRasterP rasterHandle, int eventMode)
 Rereads the file associated with the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_extendedInfoSet (const RasterExtendedInfo *extendedInfo, DgnRasterP rasterHandle, int eventMode)
 Modifies extended file information for the specified raster according to the content of the RasterExtendedInfo structure. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_bitmapGet (byte *pBitmap, size_t bitmapBufSize, BitmapColorDscr *pColorDscr, const BitmapRectDscr *pSrcRectDscr, const Point2d *pBitmapSize, DgnRasterCP rasterHandle)
 Fills an in memory buffer representing the portion of the image identified by "pSrcRecDscr". More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_bitmapSet (byte *pBitmap, size_t bitmapBufSize, const BitmapColorDscr *pColorDscr, const BitmapRectDscr *pDstRectDscr, const Point2d *pBitmapSize, DgnRasterP rasterHandle, int eventMode)
 Replace the bitmap of a raster image by the content of an in memory buffer represented by "pBuffer". More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileExport (WCharCP filename, RasterFileFormatCR rasterFileFormat, DgnPlatform::Raster::RasterSisterFileType sisterFile, RasterColorModeCR colorMode, unsigned maxColor, RasterCompressionTypeCR compressType, UInt8 compressionLevel, RasterTileMode tile, double gamma, bool invert, bool resize, DPoint2d *newSize, DgnGCSP pDgnGCS, bool resample, DgnRasterCP rasterHandle)
 Writes a copy of the specified raster to the designated file name and type. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_rasterExport (WCharCP filename, RasterFileFormatCR rasterFileFormat, DgnPlatform::Raster::RasterSisterFileType sisterFile, RasterColorModeCR colorMode, unsigned maxColor, RasterCompressionTypeCR compressType, UInt8 compressionLevel, RasterTileMode tile, bool resize, DPoint2d *newSize, bool resample, DgnRasterCP rasterHandle)
 Writes a copy of the specified raster to the designated file name and type. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_serverPortGet (unsigned *isHttp, unsigned short *port, WCharP extension, WCharCP hostName, UInt32 timeOut)
 This function is DEPRECATED. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileSourceClose (DgnRasterP rasterHandle, int eventMode)
 Close the raster source file but keep attachment information and handle available (RasterFileInfo.fileStatus==FILESTATUS_CLOSED). More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileSourceOpen (DgnRasterP rasterHandle, int eventMode)
 Open the raster source file for a raster handle that was closed by mdlRaster_fileSourceClose. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyBackgroundGet (UInt8 *pTransparencyLevel, DgnRasterCP rasterHandle)
 Get background transparency level. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyBackgroundSet (UInt8 transparencyLevel, DgnRasterP rasterHandle, int eventMode)
 Set background transparency level. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyColorGet (RgbColorDef *pRGBColor, UInt8 *pTransparencyLevel, DgnRasterCP rasterHandle)
 Get current transparent color and transparency level. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyColorSet (const RgbColorDef *pRGBColor, UInt8 transparencyLevel, DgnRasterP rasterHandle, int eventMode)
 Set transparent color and transparency level. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyForegroundGet (UInt8 *pTransparencyLevel, DgnRasterCP rasterHandle)
 Get foreground transparency level. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyForegroundSet (UInt8 transparencyLevel, DgnRasterP rasterHandle, int eventMode)
 Set foreground transparency level. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyReset (DgnRasterP rasterHandle, int eventMode)
 Remove all transparent colors. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_paletteGet (RgbColorDef *colorPalette, DgnRasterCP rasterHandle)
 Fills in an array of 256 RgbColorDef structures with the color palette information corresponding to the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoGet (RasterFileInfo *rasterFileInfo, DgnRasterCP rasterHandle)
 Fills a RasterFileInfo structure with information pertaining to the physical file for the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoMinimalGet (RasterFileQuickInfo *rasterFileInfo, WCharCP filename)
 Fills a RasterFileInfo structure with information pertaining to the specified physical file. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoQuickGet (RasterFileQuickInfo *rasterFileInfo, RasterThumbnailP rasterThumbnail, WCharCP filename)
 Fills a RasterFileInfo structure with information pertaining to the specified physical file. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoBlockTypeGet (int *pBlockType, DgnRasterCP rasterHandle)
 Retrieves raster block type. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_geoReferenceInfoGet (RasterGeoReferenceInfo *geoReferenceInfo, DgnRasterCP rasterHandle)
 Fills a RasterGeoRefInfo structure with information describing the geo reference for the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_geoReferenceInfoSet (const RasterGeoReferenceInfo *geoReferenceInfo, DgnRasterP rasterHandle, int eventMode)
 Modifies georeference information for the specified raster according to the content of the RasterGeoRefInfo structure. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_renderingInfoGet (RasterRenderingInfo *renderingInfo, DgnRasterCP rasterHandle)
 Fills a RasterRenderingInfo structure with information describing the rendering settings of the specified raster. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_renderingInfoSet (const RasterRenderingInfo *renderingInfo, DgnRasterP rasterHandle, int eventMode)
 Modifies rendering information for the specified raster according to the content of the RasterRenderingInfo structure. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatLabelGet (WCharP fileLabel, DgnPlatform::ImageFileFormat fileType)
 Get file format label. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatSupportedBlockTypesGet (RasterBlockTypeCollectionR collection, DgnPlatform::Raster::RasterFileAccessMode accessMode, DgnPlatform::ImageFileFormat fileType, DgnPlatform::ImageColorMode colorMode, DgnPlatform::CompressionType compressionType)
 Fills a collection describing the supported block types for the specified access mode, file format, color mode and compression type. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatSupportedColorModesGet (RasterColorModeCollectionR collection, DgnPlatform::Raster::RasterFileAccessMode accessMode, DgnPlatform::ImageFileFormat fileType)
 Fills a collection describing the supported color modes for the specified access mode and file format. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatSupportedCompressionModesGet (RasterCompressionTypeCollectionR collection, DgnPlatform::Raster::RasterFileAccessMode accessMode, DgnPlatform::ImageFileFormat fileType, DgnPlatform::ImageColorMode colorMode)
 Fills a collection describing the supported compression types for the specified access mode, file format and color mode. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatTypesGet (RasterFileFormatCollectionR fileFormatsCollection)
 Fills input RasterFileFormatCollection describing the supported file types. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_systemAllRasterContainerByModelGet (DgnRasterVectorR collection, DgnModelRefCP pRootModel, int iteratorType, int depth)
 Retrieves a list of all currently known raster handle that belong to a specific model and/or its child models according to the handle state flags specified. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_fileSave (DgnRasterP rasterHandle)
 Records info pertaining to this raster into the raster file. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_bringForward (DgnRasterP rasterHandle, int eventMode)
 Bring raster one position to front in display for its model. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_sendBackward (DgnRasterP rasterHandle, int eventMode)
 Send raster one position back in display for its model. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_sendToBack (DgnRasterP rasterHandle, int eventMode)
 Send raster to back in display for its model. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_bringToFront (DgnRasterP rasterHandle, int eventMode)
 Bring raster to front in display for its model. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_elementRefFromHandleGet (ElementRefP *pElementRef, DgnModelRefP *pModelRef, DgnRasterCP rasterHandle)
 Retrieves ElementRefP and ModelRef from a raster handle. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_handleFromElementRefGet (DgnRasterP *pRasterHandle, ElementRefP elementRef, DgnModelRefP modelRef)
 Retrieves raster unique identifier from ElementRefP and ModelRef. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_rotationAroundX (double radians, DPoint3dCP pivot, DgnRasterP rasterHandle, int eventMode)
 Apply a rotation around the X axis to the raster specified by the rasterhandle. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_rotationAroundY (double radians, DPoint3dCP pivot, DgnRasterP rasterHandle, int eventMode)
 Apply a rotation around the Y axis to the raster specified by the rasterhandle. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_rotationAroundZ (double radians, DPoint3dCP pivot, DgnRasterP rasterHandle, int eventMode)
 Apply a rotation around the Z axis to the raster specified by the rasterhandle. More...
 
RASTERCORE_EXPORT StatusInt mdlRaster_normalGet (DPoint3dP po_pNormal, DgnRasterCP rasterHandle)
 returns the normal vector to the raster More...
 

Detailed Description

Function Documentation

RASTERCORE_EXPORT StatusInt mdlRaster_attach ( DgnRasterP  rasterP,
int  eventMode 
)

Attach a raster to the active dgn model.

Parameters
rasterPIN raster unique identifier
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the raster is successfully attached. MDLERR_BADRASTER = Invalid raster handle. ERROR = An unknown error occured.
RASTERCORE_EXPORT StatusInt mdlRaster_bitmapGet ( byte pBitmap,
size_t  bitmapBufSize,
BitmapColorDscr pColorDscr,
const BitmapRectDscr pSrcRectDscr,
const Point2d *  pBitmapSize,
DgnRasterCP  rasterHandle 
)

Fills an in memory buffer representing the portion of the image identified by "pSrcRecDscr".

The caller is responsible for allocating and deallocating the buffer's memory. The caller is also responsible for initialising the buffer content because area outside the intersection of "pSrcRecDscr" and the image are left untouched by the function. The buffer's content returned is in the format as described by the "pColorDscr" parameter. For palette color modes, the caller can specify the maximum number of colors and the color palette to use with the bitmap. The caller can also let the system build a representative palette by passing 0 as the number of colors in pColorDscr->nbColor. The buffer returned is affected by any filters applied on the image.

Parameters
pBitmapOUT data, allocated by caller
bitmapBufSizeIN buffer size in bytes
pColorDscrIN color dscr for bitmap
pSrcRectDscrIN source rectangle in pixels
pBitmapSizeIN destination size in pixels
rasterHandleIN raster unique identifier
Returns
SUCCESS if the buffer was successfully filled or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid raster handle. ERROR = An unknown error occured.
RASTERCORE_EXPORT StatusInt mdlRaster_bitmapSet ( byte pBitmap,
size_t  bitmapBufSize,
const BitmapColorDscr pColorDscr,
const BitmapRectDscr pDstRectDscr,
const Point2d *  pBitmapSize,
DgnRasterP  rasterHandle,
int  eventMode 
)

Replace the bitmap of a raster image by the content of an in memory buffer represented by "pBuffer".

The area to replace is identified by the "pDstRectDscr" parameter. The caller is responsible for allocating and deallocating the buffer's memory. The buffer's content format is as described by the "pColorDscr" parameter. For palette color modes, the caller must specify the color palette to use with the bitmap.

Parameters
pBitmapIN pixels data to set in raster file
bitmapBufSizeIN buffer size in bytes
pColorDscrIN color dscr for bitmap
pDstRectDscrIN destination rectangle in pixels or UOR
pBitmapSizeIN destination size in pixels
rasterHandleIN raster unique identifier
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the bitmap was successfully replaced or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid raster handle.
MDLERR_INVALIDACCESSMODE = No write access.
ERROR = An unknown error occured.
RASTERCORE_EXPORT StatusInt mdlRaster_bringForward ( DgnRasterP  rasterHandle,
int  eventMode 
)

Bring raster one position to front in display for its model.

Parameters
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully updated or one of the following error codes otherwise: MDLERR_BADRASTER = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_bringToFront ( DgnRasterP  rasterHandle,
int  eventMode 
)

Bring raster to front in display for its model.

Parameters
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully updated or one of the following error codes otherwise: MDLERR_BADRASTER = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_clipBoundaryGet ( MSElementDescrP *  clipBoundary,
int  boundaryPlan,
DgnRasterCP  rasterHandle 
)

Retrieves the clip boundary for the specified raster.

Parameters
clipBoundaryOUT boundary used to clip the raster. NULL if there is no clip boundary.
boundaryPlanIN PLAN_DGN or PLAN_RASTER. Where PLAN_DGN means boundary is returned in DGN units (UOR in raster DgnModelRef) and PLAN_RASTER means it is returned in raster units (PIXELS).
rasterHandleIN raster unique identifier.
Returns
SUCCESS if the clip boundary is succesfully retrieved or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid raster handle.
RASTERCORE_EXPORT StatusInt mdlRaster_clipBoundarySet ( MSElementDescrCP  clipBoundary,
int  boundaryPlan,
DgnRasterP  rasterHandle,
int  eventMode 
)

Sets the clip boundary for the specified raster.

Parameters
clipBoundaryIN new boundary to set, NULL will remove any boundary.
boundaryPlanIN PLAN_DGN or PLAN_RASTER. Where PLAN_DGN means boundary is in DGN units (UOR) and PLAN_RASTER means it is in raster units (PIXELS).
rasterHandleIN raster unique identifier
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the new clip boundary is succesfully set or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid raster handle.
Remarks
Can also return all error codes returned by mdlRaster_clipElementValidate
RASTERCORE_EXPORT StatusInt mdlRaster_clipElementValidate ( MSElementDescrCP  clipElement,
DgnModelRefP  modelRef 
)

Validates an element used as a clipping mask or clipping boundary.

A valid element is closed, does not have any hole and doesn't intersect itself.

Parameters
clipElementIN element to validate
modelRefIN modelRef of the element to validate
Returns
SUCCESS if the clipping element is valid or one of the following error codes otherwise:
RASTER_BADELEMENTTYPE = Type of element is not valid.
RASTER_INTERSECTSITSELF = The element intersects itself.
RASTER_NONCLOSEDELM = The element is not closed.
RASTER_ELEMENTISHOLED = The element is holed.
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskAdd ( MSElementDescrCP  clipMask,
int  maskPlan,
DgnRasterP  rasterHandle,
int  eventMode 
)

Adds a clip mask to the internal clip mask list for the specified raster.

Parameters
clipMaskOUT new mask to set
maskPlanIN PLAN_DGN or PLAN_RASTER. Where PLAN_DGN means clipMask is in DGN units (UOR) and PLAN_RASTER means it is in raster units (PIXELS).
rasterHandleIN raster unique identifier
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the new clip mask is succesfully added or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid raster handle.
Remarks
Can also return all error codes returned by mdlRaster_clipElementValidate
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskCount ( long *  count,
DgnRasterCP  rasterHandle 
)

Counts all clip mask associated to the specified raster.

Parameters
countOUT number of clip mask.
rasterHandleIN raster unique identifier.
Returns
SUCCESS if succesful or one of the following error codes otherwise: MDLERR_BADRASTER = Invalid raster handle.
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskGet ( MSElementDescrH  clipMask,
int  maskPlan,
long  clipMaskIndex,
DgnRasterCP  rasterHandle 
)

Retrieves a specific clip mask for the specified raster.

Parameters
clipMaskOUT mask description.
maskPlanIN PLAN_DGN or PLAN_RASTER. Where PLAN_DGN means clipMask is in DGN units (UOR) and PLAN_RASTER means it is in raster units (PIXELS).
clipMaskIndexIN identifies the clip mask to retrieve.
rasterHandleIN raster unique identifier.
Returns
SUCCESS if the clip mask is succesfully retrieved one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid raster handle.
MDLERR_IDNOTFOUND = Invalid index.
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskRemove ( long  clipMaskIndex,
DgnRasterP  rasterHandle,
int  eventMode 
)

Removes a specific clip mask for the specified raster.

Parameters
clipMaskIndexOUT identifies the clip mask to remove.
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the clip mask is succesfully removed or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid raster handle.
MDLERR_IDNOTFOUND = Invalid index.
RASTERCORE_EXPORT StatusInt mdlRaster_detach ( DgnRasterP  rasterP,
int  eventMode 
)

Detach a raster from the active dgn model.

Parameters
rasterPIN raster unique identifier
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the raster is successfully detached. MDLERR_BADRASTER = Invalid raster handle. ERROR = An unknown error occured.
RASTERCORE_EXPORT StatusInt mdlRaster_elementRefFromHandleGet ( ElementRefP *  pElementRef,
DgnModelRefP *  pModelRef,
DgnRasterCP  rasterHandle 
)

Retrieves ElementRefP and ModelRef from a raster handle.

Parameters
pElementRefOUT ElementRefP.
pModelRefOUT Model in which the element resides.
rasterHandleIN Raster unique identifier.
Returns
SUCCESS or ERROR.
RASTERLIB_EXPORT StatusInt mdlRaster_eventGroupEnd ( int  eventMode)

End a ground of operation started by mdlRaster_eventGroupStart.

Parameters
[in]eventModeIdentifies the type of synchronization requested. Must be one of EVENT_ defines. This flag will be passed to the applications by the callback functions.
Returns
Always return SUCCESS.
See also
mdlRaster_eventGroupStart
Deprecated:
RASTERLIB_EXPORT StatusInt mdlRaster_eventGroupStart ( int  eventMode,
int  commandName 
)

Start a group of operation.

Remarks
mdlRaster_eventGroupStart and mdlRaster_eventGroupEnd let application groups operations so that they work like a single operation.
Parameters
[in]eventModeIdentifies the type of synchronization requested. Must be one of EVENT_ defines. This flag will be passed to the applications by the callback functions.
[in]commandNameThe command name associated with the group.
Returns
Always return SUCCESS
Deprecated:
RASTERCORE_EXPORT StatusInt mdlRaster_extendedInfoGet ( RasterExtendedInfo extendedInfo,
DgnRasterCP  rasterHandle 
)

Fills in a RasterExtendedInfo structure with the extended raster information corresponding to the specified raster.

Parameters
extendedInfoOUT will be filled with extended info.
rasterHandleIN raster unique identifier.
Returns
SUCCESS if the RasterExtendedInfo structure is successfully filled or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
See also
usmthmdlRaster_extendedInfoSetC
RASTERCORE_EXPORT StatusInt mdlRaster_extendedInfoSet ( const RasterExtendedInfo extendedInfo,
DgnRasterP  rasterHandle,
int  eventMode 
)

Modifies extended file information for the specified raster according to the content of the RasterExtendedInfo structure.

Parameters
extendedInfoOUT Extended information to set.
rasterHandleIN Raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully updated or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
MDLERR_INVALIDLOGICALNAME = LogicalName is invalid and was not changed.
Valid fields have been set.
See also
usmthmdlRaster_extendedInfoGetC usmthmdlRaster_fileOpenC usmthmdlRaster_fileCloseC usmthmdlRaster_attachC usmthmdlRaster_detachC
RASTERCORE_EXPORT StatusInt mdlRaster_fileClose ( DgnRasterP  rasterHandle,
int  eventMode 
)

If the file is attached, this function closes the raster file but the raster handle stays valide, which is equivalent to mdlRaster_sourceFileClose.

To Reopen the raster file you should use mdlRaster_sourceFileOpen. If the raster is not attached, it removes the raster completely from the list and the raster handle is not valid anymore.

Parameters
rasterHandleIN Handle of the raster to close.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the file is successfully closed or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
See also
usmthmdlRaster_fileOpenC usmthmdlRaster_extendedInfoSetC usmthmdlRaster_fileSourceCloseC
RASTERCORE_EXPORT StatusInt mdlRaster_fileExport ( WCharCP  filename,
RasterFileFormatCR  rasterFileFormat,
DgnPlatform::Raster::RasterSisterFileType  sisterFile,
RasterColorModeCR  colorMode,
unsigned  maxColor,
RasterCompressionTypeCR  compressType,
UInt8  compressionLevel,
RasterTileMode  tile,
double  gamma,
bool  invert,
bool  resize,
DPoint2d *  newSize,
DgnGCSP  pDgnGCS,
bool  resample,
DgnRasterCP  rasterHandle 
)

Writes a copy of the specified raster to the designated file name and type.

If the file already exist, it is overwritten.

Parameters
filenameIN Full destination filename.
rasterFileFormatIN Specifies the file format.
sisterFileIN RASTER_SISTERFILE_NONE, RASTER_SISTERFILE_HGR or RASTER_SISTERFILE_WORLDFILE. Ignored if no support for sister file available.
colorModeIN Specifies the color mode.
maxColorIN Limits the number of colors used in the destination raster. Valid with palleted color mode only except 1bit.
compressTypeIN Specifies the compression mode.
compressionLevelIN Level of compression when applicable. 0 min and 255 max
tileIN TILE_YES or TILE_NO.
gammaIN Gamma correction to apply. 1.0 means no gamma correction applied.
invertIN If true the raster's colors will be inverted.
resizeIN If true the raster will be resized to the size specified by "newSize".
newSizeIN Specifies the desired size of the destination raster. Ignored if "resize" is false.
pDgnGCSIN Specify the Geocoordinate System to set or NULL. This will not reproject the data.
resampleIN If true the raster will be resampled.
rasterHandleIN Identifies the raster to export.
Returns
SUCCESS if the raster was succesfully exported or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
MDLERR_ACCESSVIOLATION = Unable to create output file.
ERROR = An unknown error occured during export.
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatLabelGet ( WCharP  fileLabel,
DgnPlatform::ImageFileFormat  fileType 
)

Get file format label.

Parameters
fileLabelOUT Already allocated string of MAX_RASTERFILEFORMAT_LABEL_LEN
fileTypeIN File format ID.
Returns
returnValue SUCCESS or ERROR
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatSupportedBlockTypesGet ( RasterBlockTypeCollectionR  collection,
DgnPlatform::Raster::RasterFileAccessMode  accessMode,
DgnPlatform::ImageFileFormat  fileType,
DgnPlatform::ImageColorMode  colorMode,
DgnPlatform::CompressionType  compressionType 
)

Fills a collection describing the supported block types for the specified access mode, file format, color mode and compression type.

Parameters
collectionOUT collection that will be filled.
accessModeIN The accessMode value can be one of, or a combination of the FILE_ACCESSMODE_... flags with the | (or) operator. If more than one flag are specified, the returned block types support all of them. FILE_ACCESSMODE_READ –> File can be read. FILE_ACCESSMODE_WRITE –> File can be modified. FILE_ACCESSMODE_CREATE –> File can be created(exported).
filetypeIN One of the IMAGEFILE_ defines.
colorModeIN One of the COLORMODE_ define.
compressionTypeIN One of the COMPRESSTYPE_ define.
Returns
SUCCESS or ERROR.
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatSupportedColorModesGet ( RasterColorModeCollectionR  collection,
DgnPlatform::Raster::RasterFileAccessMode  accessMode,
DgnPlatform::ImageFileFormat  fileType 
)

Fills a collection describing the supported color modes for the specified access mode and file format.

Parameters
collectionOUT collection that will be filled.
accessModeIN The accessMode value can be one of, or a combination of the FILE_ACCESSMODE_... flags with the | (or) operator. If more than one flag are specified, the returned color modes support all of them. FILE_ACCESSMODE_READ –> File can be read. FILE_ACCESSMODE_WRITE –> File can be modified. FILE_ACCESSMODE_CREATE –> File can be created(exported).
filetypeIN One of the IMAGEFILE_ defines.
Returns
SUCCESS or ERROR.
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatSupportedCompressionModesGet ( RasterCompressionTypeCollectionR  collection,
DgnPlatform::Raster::RasterFileAccessMode  accessMode,
DgnPlatform::ImageFileFormat  fileType,
DgnPlatform::ImageColorMode  colorMode 
)

Fills a collection describing the supported compression types for the specified access mode, file format and color mode.

Parameters
collectionOUT collection that will be filled.
accessModeIN The accessMode value can be one of, or a combination of the FILE_ACCESSMODE_... flags with the | (or) operator. If more than one flag are specified, the returned compression modes support all of them. FILE_ACCESSMODE_READ –> File can be read. FILE_ACCESSMODE_WRITE –> File can be modified. FILE_ACCESSMODE_CREATE –> File can be created(exported).
filetypeIN One of the IMAGEFILE_ defines.
colorModeIN One of the COLORMODE_ defines.
Returns
SUCCESS or ERROR.
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatTypesGet ( RasterFileFormatCollectionR  fileFormatsCollection)

Fills input RasterFileFormatCollection describing the supported file types.

Returns
Returns ERROR if collection cannot be filled. Otherwise it returns SUCCESS.
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoBlockTypeGet ( int *  pBlockType,
DgnRasterCP  rasterHandle 
)

Retrieves raster block type.

Parameters
pBlockTypeOUT One of the BLOCKTYPE_ defines.
rasterHandleIN Raster unique identifier.
Returns
SUCCESS if the block type is successfully retrived or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle. ERROR = Unknown error occured.
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoGet ( RasterFileInfo rasterFileInfo,
DgnRasterCP  rasterHandle 
)

Fills a RasterFileInfo structure with information pertaining to the physical file for the specified raster.

Parameters
rasterFileInfoOUT Will be filled with physical file info.
rasterHandleIN Raster unique identifier.
Returns
SUCCESS if the RasterFileInfo structure is successfully filled or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
See also
usmthmdlRaster_fileInfoQuickGetC
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoMinimalGet ( RasterFileQuickInfo rasterFileInfo,
WCharCP  filename 
)

Fills a RasterFileInfo structure with information pertaining to the specified physical file.

This function initializes no RasterFileInfo field related to the localisation of the image within the world. If such information is needed, use the mdlRaster_fileInfoQuickGet function instead. Use the mdlRaster_fileInfoMinimalGet function to get file info from a raster that is not curently open.

Parameters
rasterFileInfoOUT will be filled with physical file info.
filenameIN file to get info for.
Returns
SUCCESS if the RasterFileInfo structure is successfully filled or ERROR if unable to get info from file.
See also
usmthmdlRaster_fileInfoGetC usmthmdlRaster_fileInfoQuickGetC
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoQuickGet ( RasterFileQuickInfo rasterFileInfo,
RasterThumbnailP  rasterThumbnail,
WCharCP  filename 
)

Fills a RasterFileInfo structure with information pertaining to the specified physical file.

Use this function to get file info from a raster that is not currently open. If you pass a valid pointer to a RasterThumbnail structure, mdlRaster_fileInfoQuickGet will fills the image member of the RasterThumbnail structure with the image thumbnail data. The image member of the RasterThumbnail structure will be allocated by MicroStation and application programmer must free this memory when finished with it. Pass NULL if the thumbnail data is not required.

Remarks
The application programmer must free thumbnail memory when finished with it.
Parameters
rasterFileInfoOUT will be filled with physical file info
rasterThumbnailIN OUT will be filled with thumbnail data Pass NULL if the thumbnail is not required
filenameIN file to get info for
Returns
SUCCESS if the RasterFileInfo structure is successfully filled or ERROR if unable to get info from file.
See also
usmthmdlRaster_fileInfoGetC
RASTERCORE_EXPORT StatusInt mdlRaster_fileOpen ( DgnRasterP *  rasterHandle,
WCharCP  filename,
DgnModelRefR  modelRef,
DgnPlatform::Raster::RasterFileAccessMode  accessMode,
int  eventMode 
)

Opens the specified raster file.

mdlRaster_fileOpen assigns a unique handle value to each opened raster. The same raster file can be openeed multiple times in read-only mode but only once in read-write mode. Note that the raster will not be attached to the dgn. See mdlRaster_extendedInfoSet

Parameters
rasterHandleOUT unique handle associated to the raster.
filenameIN filename of the raster to open.
modelRefIN Normally, active model.
accessModeIN FILE_ACCESSMODE_READ, FILE_ACCESSMODE_READWRITE
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the file is successfully opened or one of the following error codes otherwise:
ERROR = unable to open file.
MDLERR_INVALIDACCESSMODE = bad access mode.
See also
usmthmdlRaster_fileCloseC usmthmdlRaster_extendedInfoSetC
RASTERCORE_EXPORT StatusInt mdlRaster_fileReload ( DgnRasterP  rasterHandle,
int  eventMode 
)

Rereads the file associated with the specified raster.

If many rasters are associated to the same file they will all be affected by this function.

Parameters
rasterHandleIN unique handle associated to the raster.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the file is successfully reread or one of the following error codes otherwise:
MDLERR_BADRASTER = invalid handle
RASTERCORE_EXPORT StatusInt mdlRaster_fileSave ( DgnRasterP  rasterHandle)

Records info pertaining to this raster into the raster file.

Parameters
rasterHandleIN Unique handle associated to the raster.
Returns
Always returns SUCCESS.
RASTERCORE_EXPORT StatusInt mdlRaster_fileSourceClose ( DgnRasterP  rasterHandle,
int  eventMode 
)

Close the raster source file but keep attachment information and handle available (RasterFileInfo.fileStatus==FILESTATUS_CLOSED).

Parameters
rasterHandleIN Raster handle for which source file will be close
eventModeIN Obsolete: This parameter is not used anymore.
Returns
returnValue SUCCESS or ERROR
See also
usmthmdlRaster_fileCloseC
RASTERCORE_EXPORT StatusInt mdlRaster_fileSourceOpen ( DgnRasterP  rasterHandle,
int  eventMode 
)

Open the raster source file for a raster handle that was closed by mdlRaster_fileSourceClose.

Parameters
rasterHandleIN Raster handle for which source file will be open
eventModeIN Obsolete: This parameter is not used anymore.
Returns
returnValue SUCCESS or ERROR
RASTERCORE_EXPORT StatusInt mdlRaster_geoReferenceInfoGet ( RasterGeoReferenceInfo geoReferenceInfo,
DgnRasterCP  rasterHandle 
)

Fills a RasterGeoRefInfo structure with information describing the geo reference for the specified raster.

The georeference is expressed in the units of the dgnModelRef associated to this raster.

Parameters
geoReferenceInfoOUT will be filled with geo reference info.
rasterHandleIN raster unique identifier.
Returns
SUCCESS if the RasterGeoRefInfo structure is successfully filled or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_geoReferenceInfoSet ( const RasterGeoReferenceInfo geoReferenceInfo,
DgnRasterP  rasterHandle,
int  eventMode 
)

Modifies georeference information for the specified raster according to the content of the RasterGeoRefInfo structure.

The georeference must be expressed in the units of the dgnModelRef associated to this raster.

Parameters
geoReferenceInfoIN georeference info to set.
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully updated or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
MDLERR_BADPARAMETER = At least one field of the RasterGeoRefInfo structure was invalid.
Valid fields have been set.
ERROR = unkown error.
RASTERCORE_EXPORT StatusInt mdlRaster_handleFromElementRefGet ( DgnRasterP *  pRasterHandle,
ElementRefP  elementRef,
DgnModelRefP  modelRef 
)

Retrieves raster unique identifier from ElementRefP and ModelRef.

Parameters
pRasterHandleOUT Raster unique identifier.
elementRefIN ElementRefP.
modelRefIN Model in which the element resides.
Returns
SUCCESS or ERROR.
RASTERCORE_EXPORT void mdlRaster_initialize ( void  )

Must be the first call to mdlRaster for every application that wants to use mdlRaster API.

See also
usmthmdlRaster_terminateC
RASTERCORE_EXPORT StatusInt mdlRaster_normalGet ( DPoint3dP  po_pNormal,
DgnRasterCP  rasterHandle 
)

returns the normal vector to the raster

Parameters
po_pNormalOUT return normal vector.
rasterHandleIN raster unique identifier.
Returns
SUCCESS if the raster normal is successfully returned or one of the following error codes otherwise:
ERROR = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_paletteGet ( RgbColorDef *  colorPalette,
DgnRasterCP  rasterHandle 
)

Fills in an array of 256 RgbColorDef structures with the color palette information corresponding to the specified raster.

If there are less than 256 entries in the palette, the remaining entries will be filled with 0s.

Parameters
colorPaletteOUT Must point to an array of 256 RgbColorDef structures.
rasterHandleIN Identifies the changed raster.
Returns
SUCCESS if the array of 256 RgbColorDef structures is successfully filled or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
MDLERR_INVALIDCOLORMODE = No color palette available for this raster.
RASTERCORE_EXPORT StatusInt mdlRaster_rasterExport ( WCharCP  filename,
RasterFileFormatCR  rasterFileFormat,
DgnPlatform::Raster::RasterSisterFileType  sisterFile,
RasterColorModeCR  colorMode,
unsigned  maxColor,
RasterCompressionTypeCR  compressType,
UInt8  compressionLevel,
RasterTileMode  tile,
bool  resize,
DPoint2d *  newSize,
bool  resample,
DgnRasterCP  rasterHandle 
)

Writes a copy of the specified raster to the designated file name and type.

If the file already exist, it is overwritten.

Parameters
filenameIN Full destination filename.
rasterFileFormatIN Specifies the file format.
sisterFileIN RASTER_SISTERFILE_NONE, RASTER_SISTERFILE_HGR or RASTER_SISTERFILE_WORLDFILE. Ignored if no support for sister file available.
colorModeIN Specifies the color mode.
maxColorIN Limits the number of colors used in the destination raster. Valid with palleted color mode only except 1bit.
compressTypeIN Specifies the compression mode.
compressionLevelIN Level of compression when applicable. 0 min and 255 max
tileIN TILE_YES or TILE_NO.
resizeIN If true the raster will be resized to the size specified by "newSize".
newSizeIN Specifies the desired size of the destination raster. Ignored if "resize" is false.
resampleIN If true the raster will be resampled.
rasterHandleIN Identifies the raster to export.
Returns
SUCCESS if the raster was succesfully exported or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
MDLERR_ACCESSVIOLATION = Unable to create output file.
ERROR = An unknown error occured during export.
RASTERCORE_EXPORT StatusInt mdlRaster_renderingInfoGet ( RasterRenderingInfo renderingInfo,
DgnRasterCP  rasterHandle 
)

Fills a RasterRenderingInfo structure with information describing the rendering settings of the specified raster.

Parameters
renderingInfoOUT will be filled with rendering info.
rasterHandleIN raster unique identifier.
Returns
SUCCESS if the RasterRenderingInfo structure is successfully filled or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_renderingInfoSet ( const RasterRenderingInfo renderingInfo,
DgnRasterP  rasterHandle,
int  eventMode 
)

Modifies rendering information for the specified raster according to the content of the RasterRenderingInfo structure.

Parameters
renderingInfoIN rendering info to set.
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully updated or one of the following error codes otherwise: MDLERR_BADRASTER = Invalid handle.
MDLERR_BADPARAMETER = At least one field of the RasterGeoRefInfo structure was invalid.
Valid fields have been set.
ERROR = unkown error.
RASTERCORE_EXPORT StatusInt mdlRaster_rotationAroundX ( double  radians,
DPoint3dCP  pivot,
DgnRasterP  rasterHandle,
int  eventMode 
)

Apply a rotation around the X axis to the raster specified by the rasterhandle.

Parameters
radiansIN georeference info to set.
pivotIN DPoint3d to rotate around.
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully rotated or one of the following error codes otherwise:
ERROR = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_rotationAroundY ( double  radians,
DPoint3dCP  pivot,
DgnRasterP  rasterHandle,
int  eventMode 
)

Apply a rotation around the Y axis to the raster specified by the rasterhandle.

Parameters
radiansIN georeference info to set.
pivotIN DPoint3d to rotate around.
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully rotated or one of the following error codes otherwise:
ERROR = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_rotationAroundZ ( double  radians,
DPoint3dCP  pivot,
DgnRasterP  rasterHandle,
int  eventMode 
)

Apply a rotation around the Z axis to the raster specified by the rasterhandle.

Parameters
radiansIN georeference info to set.
pivotIN DPoint3d to rotate around.
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully rotated or one of the following error codes otherwise:
ERROR = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_sendBackward ( DgnRasterP  rasterHandle,
int  eventMode 
)

Send raster one position back in display for its model.

Parameters
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully updated or one of the following error codes otherwise: MDLERR_BADRASTER = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_sendToBack ( DgnRasterP  rasterHandle,
int  eventMode 
)

Send raster to back in display for its model.

Parameters
rasterHandleIN raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS if the specified raster is successfully updated or one of the following error codes otherwise: MDLERR_BADRASTER = Invalid handle.
RASTERCORE_EXPORT StatusInt mdlRaster_serverPortGet ( unsigned *  isHttp,
unsigned short *  port,
WCharP  extension,
WCharCP  hostName,
UInt32  timeOut 
)

This function is DEPRECATED.

Use mdlRaster_serverGetURLFromHostName or mdlRaster_serverGetURLFromAlias instead.

Identifies the best port to access a remote server. It also determines wether that port is HTTP in which case the extension will be filled.

Parameters
isHttpOUT set to true if the protocole is HTTP.
portOUT port number.
extensionOUT extension if port is HTTP. Must be long enough to hold a full filespec. Allocating MAXFILELENGTH is a good idea.
hostNameIN Sever name or address.
timeOutIN Maximum waiting time in milliseconds.
Returns
SUCCESS if the server is successfully identified or one of the following error codes otherwise:
ERROR = unable to locate server.
RASTERCORE_EXPORT StatusInt mdlRaster_systemAllRasterContainerByModelGet ( DgnRasterVectorR  collection,
DgnModelRefCP  pRootModel,
int  iteratorType,
int  depth 
)

Retrieves a list of all currently known raster handle that belong to a specific model and/or its child models according to the handle state flags specified.

You might want to use the DgnRasterCollection instead if you don't need a copy of the list: ModelRefIterator modelItr(pRootModel, iteratorType, depth); for (DgnModelRefP modelRefP = modelItr.GetFirst (); modelRefP; modelRefP = modelItr.GetNext ()) { for each(DgnRasterP rasterP in DgnRasterCollection::GetRasters(modelRefP)) { if(NULL != rasterP) Do something; } }

Parameters
collectionOUT Used to return a collection of raster handle list.
pRootModelIN Root model from which to start the raster extraction
iteratorTypeIN MRITERATE_Root, MRITERATE_PrimaryChildRefs or MRITERATE_Root MRITERATE_PrimaryChildRefs for root model and childs
depthIN Nesting depth. 0 for primary reference files or -1 for primary references and nested references
Returns
mdlRaster_systemAllRasterContainerByModelGet returns ERROR if model is invalid or it cannot retrieves the list. Otherwise it returns SUCCESS.
RASTERCORE_EXPORT StatusInt mdlRaster_systemStrokeToleranceCompute ( double *  preferedTolerance,
MSElementDescrCP  element 
)

Compute the recommended tolerance value for stroking the specified element.

Parameters
preferedToleranceOUT computed tolerance.
elementIN element for which stroke tolerance is computed
Returns
Always returns SUCCESS.
RASTERCORE_EXPORT void mdlRaster_terminate ( void  )

Must be called by every application that has finished using mdlRaster API.

See also
usmthmdlRaster_initializeC
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyBackgroundGet ( UInt8 pTransparencyLevel,
DgnRasterCP  rasterHandle 
)

Get background transparency level.

Monochrome raster only.

Parameters
pTransparencyLevelOUT Transparency level: 0...255, 0 -> Opaque.
rasterHandleIN Raster unique identifier.
Returns
SUCCESS or one of the following error codes otherwise:
MDLERR_INVALIDCOLORMODE = The specified raster is not a monochrome raster. Use mdlRaster_transparencyColorGet instead. MDLERR_BADRASTER = Invalid handle. ERROR = An unknown error occured.
See also
mdlRaster_transparencyBackgroundSetC mdlRaster_transparencyForegroundGetC mdlRaster_transparencyColorGetC
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyBackgroundSet ( UInt8  transparencyLevel,
DgnRasterP  rasterHandle,
int  eventMode 
)

Set background transparency level.

Monochrome raster only.

Parameters
transparencyLevelIN Transparency level: 0...255, 0 -> Opaque.
rasterHandleIN Raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS or one of the following error codes otherwise:
MDLERR_INVALIDCOLORMODE = The specified raster is not a monochrome raster. Use mdlRaster_transparencyColorSet instead. MDLERR_BADRASTER = Invalid handle. ERROR = An unknown error occured.
See also
mdlRaster_transparencyBackgroundGetC mdlRaster_transparencyForegroundSetC mdlRaster_transparencyColorSetC
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyColorGet ( RgbColorDef *  pRGBColor,
UInt8 pTransparencyLevel,
DgnRasterCP  rasterHandle 
)

Get current transparent color and transparency level.

Parameters
pRGBColorOUT RGB color.
pTransparencyLevelOUT Transparency level: 0...255, 0 -> Opaque.
rasterHandleIN Raster unique identifier.
Returns
SUCCESS or one of the following error codes otherwise:
MDLERR_INVALIDCOLORMODE = The specified raster is a monochrome raster. Use mdlRaster_transparencyBackgroundGet or mdlRaster_transparencyForegroundGet instead. MDLERR_NO_TRANSPARENCY = No transparency information for this raster. MDLERR_BADRASTER = Invalid handle. ERROR = An unknown error occured.
See also
mdlRaster_transparencyColorSetC mdlRaster_transparencyBackgroundGetC mdlRaster_transparencyForegroundGetC
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyColorSet ( const RgbColorDef *  pRGBColor,
UInt8  transparencyLevel,
DgnRasterP  rasterHandle,
int  eventMode 
)

Set transparent color and transparency level.

Parameters
pRGBColorIN RGB color.
transparencyLevelIN Transparency level: 0...255, 0 -> Opaque.
rasterHandleIN Raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS or one of the following error codes otherwise:
MDLERR_INVALIDCOLORMODE = The specified raster is a monochrome raster. Use mdlRaster_transparencyBackgroundSet or mdlRaster_transparencyForegroundSet instead. MDLERR_INVALID_COLOR = The specified color is not in the raster palette. MDLERR_MULTIPLE_TRANSPARENCY = More than one color are currently set (usually set by a DC7.x project) see mdlRaster_transparencyReset. MDLERR_BADRASTER = Invalid handle. ERROR = An unknown error occured.
See also
mdlRaster_transparencyColorGetC mdlRaster_transparencyBackgroundSetC mdlRaster_transparencyForegroundSetC mdlRaster_transparencyResetC
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyForegroundGet ( UInt8 pTransparencyLevel,
DgnRasterCP  rasterHandle 
)

Get foreground transparency level.

Parameters
pTransparencyLevelOUT Transparency level: 0...255, 0 -> Opaque.
rasterHandleIN Raster unique identifier.
Returns
SUCCESS or one of the following error codes otherwise:
MDLERR_INVALIDCOLORMODE = The specified raster is not a monochrome raster. Use mdlRaster_transparencyColorGet instead. MDLERR_BADRASTER= Invalid handle. ERROR = An unknown error occured.
See also
mdlRaster_transparencyForegroundSetC mdlRaster_transparencyBackgroundGetC mdlRaster_transparencyColorGetC
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyForegroundSet ( UInt8  transparencyLevel,
DgnRasterP  rasterHandle,
int  eventMode 
)

Set foreground transparency level.

Parameters
transparencyLevelIN Transparency level: 0...255, 0 -> Opaque.
rasterHandleIN Raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS or one of the following error codes otherwise:
MDLERR_INVALIDCOLORMODE = The specified raster is not a monochrome raster. Use mdlRaster_transparencyColorSet instead. MDLERR_BADRASTER= Invalid handle. ERROR = An unknown error occured.
See also
mdlRaster_transparencyForegroundGetC mdlRaster_transparencyBackgroundSetC mdlRaster_transparencyColorSetC
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyReset ( DgnRasterP  rasterHandle,
int  eventMode 
)

Remove all transparent colors.

Parameters
rasterHandleIN Raster unique identifier.
eventModeIN Obsolete: This parameter is not used anymore.
Returns
SUCCESS or one of the following error codes otherwise:
MDLERR_BADRASTER = Invalid handle. ERROR = An unknown error occured.
See also
mdlRaster_transparencyColorSetC

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.