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... | |
RASTERCORE_EXPORT StatusInt mdlRaster_attach | ( | DgnRasterP | rasterP, |
int | eventMode | ||
) |
Attach a raster to the active dgn model.
rasterP | IN raster unique identifier |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
pBitmap | OUT data, allocated by caller |
bitmapBufSize | IN buffer size in bytes |
pColorDscr | IN color dscr for bitmap |
pSrcRectDscr | IN source rectangle in pixels |
pBitmapSize | IN destination size in pixels |
rasterHandle | IN raster unique identifier |
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.
pBitmap | IN pixels data to set in raster file |
bitmapBufSize | IN buffer size in bytes |
pColorDscr | IN color dscr for bitmap |
pDstRectDscr | IN destination rectangle in pixels or UOR |
pBitmapSize | IN destination size in pixels |
rasterHandle | IN raster unique identifier |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_bringForward | ( | DgnRasterP | rasterHandle, |
int | eventMode | ||
) |
Bring raster one position to front in display for its model.
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_bringToFront | ( | DgnRasterP | rasterHandle, |
int | eventMode | ||
) |
Bring raster to front in display for its model.
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_clipBoundaryGet | ( | MSElementDescrP * | clipBoundary, |
int | boundaryPlan, | ||
DgnRasterCP | rasterHandle | ||
) |
Retrieves the clip boundary for the specified raster.
clipBoundary | OUT boundary used to clip the raster. NULL if there is no clip boundary. |
boundaryPlan | IN 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). |
rasterHandle | IN raster unique identifier. |
RASTERCORE_EXPORT StatusInt mdlRaster_clipBoundarySet | ( | MSElementDescrCP | clipBoundary, |
int | boundaryPlan, | ||
DgnRasterP | rasterHandle, | ||
int | eventMode | ||
) |
Sets the clip boundary for the specified raster.
clipBoundary | IN new boundary to set, NULL will remove any boundary. |
boundaryPlan | IN 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). |
rasterHandle | IN raster unique identifier |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
clipElement | IN element to validate |
modelRef | IN modelRef of the element to validate |
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.
clipMask | OUT new mask to set |
maskPlan | IN 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). |
rasterHandle | IN raster unique identifier |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskCount | ( | long * | count, |
DgnRasterCP | rasterHandle | ||
) |
Counts all clip mask associated to the specified raster.
count | OUT number of clip mask. |
rasterHandle | IN raster unique identifier. |
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskGet | ( | MSElementDescrH | clipMask, |
int | maskPlan, | ||
long | clipMaskIndex, | ||
DgnRasterCP | rasterHandle | ||
) |
Retrieves a specific clip mask for the specified raster.
clipMask | OUT mask description. |
maskPlan | IN 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). |
clipMaskIndex | IN identifies the clip mask to retrieve. |
rasterHandle | IN raster unique identifier. |
RASTERCORE_EXPORT StatusInt mdlRaster_clipMaskRemove | ( | long | clipMaskIndex, |
DgnRasterP | rasterHandle, | ||
int | eventMode | ||
) |
Removes a specific clip mask for the specified raster.
clipMaskIndex | OUT identifies the clip mask to remove. |
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_detach | ( | DgnRasterP | rasterP, |
int | eventMode | ||
) |
Detach a raster from the active dgn model.
rasterP | IN raster unique identifier |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_elementRefFromHandleGet | ( | ElementRefP * | pElementRef, |
DgnModelRefP * | pModelRef, | ||
DgnRasterCP | rasterHandle | ||
) |
Retrieves ElementRefP and ModelRef from a raster handle.
pElementRef | OUT ElementRefP. |
pModelRef | OUT Model in which the element resides. |
rasterHandle | IN Raster unique identifier. |
RASTERLIB_EXPORT StatusInt mdlRaster_eventGroupEnd | ( | int | eventMode | ) |
End a ground of operation started by mdlRaster_eventGroupStart.
[in] | eventMode | Identifies the type of synchronization requested. Must be one of EVENT_ defines. This flag will be passed to the applications by the callback functions. |
RASTERLIB_EXPORT StatusInt mdlRaster_eventGroupStart | ( | int | eventMode, |
int | commandName | ||
) |
Start a group of operation.
[in] | eventMode | Identifies the type of synchronization requested. Must be one of EVENT_ defines. This flag will be passed to the applications by the callback functions. |
[in] | commandName | The command name associated with the group. |
RASTERCORE_EXPORT StatusInt mdlRaster_extendedInfoGet | ( | RasterExtendedInfo * | extendedInfo, |
DgnRasterCP | rasterHandle | ||
) |
Fills in a RasterExtendedInfo structure with the extended raster information corresponding to the specified raster.
extendedInfo | OUT will be filled with extended info. |
rasterHandle | IN raster unique identifier. |
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.
extendedInfo | OUT Extended information to set. |
rasterHandle | IN Raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
rasterHandle | IN Handle of the raster to close. |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
filename | IN Full destination filename. |
rasterFileFormat | IN Specifies the file format. |
sisterFile | IN RASTER_SISTERFILE_NONE, RASTER_SISTERFILE_HGR or RASTER_SISTERFILE_WORLDFILE. Ignored if no support for sister file available. |
colorMode | IN Specifies the color mode. |
maxColor | IN Limits the number of colors used in the destination raster. Valid with palleted color mode only except 1bit. |
compressType | IN Specifies the compression mode. |
compressionLevel | IN Level of compression when applicable. 0 min and 255 max |
tile | IN TILE_YES or TILE_NO. |
gamma | IN Gamma correction to apply. 1.0 means no gamma correction applied. |
invert | IN If true the raster's colors will be inverted. |
resize | IN If true the raster will be resized to the size specified by "newSize". |
newSize | IN Specifies the desired size of the destination raster. Ignored if "resize" is false. |
pDgnGCS | IN Specify the Geocoordinate System to set or NULL. This will not reproject the data. |
resample | IN If true the raster will be resampled. |
rasterHandle | IN Identifies the raster to export. |
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatLabelGet | ( | WCharP | fileLabel, |
DgnPlatform::ImageFileFormat | fileType | ||
) |
Get file format label.
fileLabel | OUT Already allocated string of MAX_RASTERFILEFORMAT_LABEL_LEN |
fileType | IN File format ID. |
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.
collection | OUT collection that will be filled. |
accessMode | IN 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). |
filetype | IN One of the IMAGEFILE_ defines. |
colorMode | IN One of the COLORMODE_ define. |
compressionType | IN One of the COMPRESSTYPE_ define. |
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.
collection | OUT collection that will be filled. |
accessMode | IN 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). |
filetype | IN One of the IMAGEFILE_ defines. |
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.
collection | OUT collection that will be filled. |
accessMode | IN 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). |
filetype | IN One of the IMAGEFILE_ defines. |
colorMode | IN One of the COLORMODE_ defines. |
RASTERCORE_EXPORT StatusInt mdlRaster_fileFormatTypesGet | ( | RasterFileFormatCollectionR | fileFormatsCollection | ) |
Fills input RasterFileFormatCollection describing the supported file types.
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoBlockTypeGet | ( | int * | pBlockType, |
DgnRasterCP | rasterHandle | ||
) |
Retrieves raster block type.
pBlockType | OUT One of the BLOCKTYPE_ defines. |
rasterHandle | IN Raster unique identifier. |
RASTERCORE_EXPORT StatusInt mdlRaster_fileInfoGet | ( | RasterFileInfo * | rasterFileInfo, |
DgnRasterCP | rasterHandle | ||
) |
Fills a RasterFileInfo structure with information pertaining to the physical file for the specified raster.
rasterFileInfo | OUT Will be filled with physical file info. |
rasterHandle | IN Raster unique identifier. |
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.
rasterFileInfo | OUT will be filled with physical file info. |
filename | IN file to get info for. |
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.
rasterFileInfo | OUT will be filled with physical file info |
rasterThumbnail | IN OUT will be filled with thumbnail data Pass NULL if the thumbnail is not required |
filename | IN file to get info for |
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
rasterHandle | OUT unique handle associated to the raster. |
filename | IN filename of the raster to open. |
modelRef | IN Normally, active model. |
accessMode | IN FILE_ACCESSMODE_READ, FILE_ACCESSMODE_READWRITE |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
rasterHandle | IN unique handle associated to the raster. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_fileSave | ( | DgnRasterP | rasterHandle | ) |
Records info pertaining to this raster into the raster file.
rasterHandle | IN Unique handle associated to the raster. |
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).
rasterHandle | IN Raster handle for which source file will be close |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_fileSourceOpen | ( | DgnRasterP | rasterHandle, |
int | eventMode | ||
) |
Open the raster source file for a raster handle that was closed by mdlRaster_fileSourceClose.
rasterHandle | IN Raster handle for which source file will be open |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
geoReferenceInfo | OUT will be filled with geo reference info. |
rasterHandle | IN raster unique identifier. |
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.
geoReferenceInfo | IN georeference info to set. |
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_handleFromElementRefGet | ( | DgnRasterP * | pRasterHandle, |
ElementRefP | elementRef, | ||
DgnModelRefP | modelRef | ||
) |
Retrieves raster unique identifier from ElementRefP and ModelRef.
pRasterHandle | OUT Raster unique identifier. |
elementRef | IN ElementRefP. |
modelRef | IN Model in which the element resides. |
RASTERCORE_EXPORT void mdlRaster_initialize | ( | void | ) |
Must be the first call to mdlRaster for every application that wants to use mdlRaster API.
RASTERCORE_EXPORT StatusInt mdlRaster_normalGet | ( | DPoint3dP | po_pNormal, |
DgnRasterCP | rasterHandle | ||
) |
returns the normal vector to the raster
po_pNormal | OUT return normal vector. |
rasterHandle | IN raster unique identifier. |
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.
colorPalette | OUT Must point to an array of 256 RgbColorDef structures. |
rasterHandle | IN Identifies the changed 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.
filename | IN Full destination filename. |
rasterFileFormat | IN Specifies the file format. |
sisterFile | IN RASTER_SISTERFILE_NONE, RASTER_SISTERFILE_HGR or RASTER_SISTERFILE_WORLDFILE. Ignored if no support for sister file available. |
colorMode | IN Specifies the color mode. |
maxColor | IN Limits the number of colors used in the destination raster. Valid with palleted color mode only except 1bit. |
compressType | IN Specifies the compression mode. |
compressionLevel | IN Level of compression when applicable. 0 min and 255 max |
tile | IN TILE_YES or TILE_NO. |
resize | IN If true the raster will be resized to the size specified by "newSize". |
newSize | IN Specifies the desired size of the destination raster. Ignored if "resize" is false. |
resample | IN If true the raster will be resampled. |
rasterHandle | IN Identifies the raster to export. |
RASTERCORE_EXPORT StatusInt mdlRaster_renderingInfoGet | ( | RasterRenderingInfo * | renderingInfo, |
DgnRasterCP | rasterHandle | ||
) |
Fills a RasterRenderingInfo structure with information describing the rendering settings of the specified raster.
renderingInfo | OUT will be filled with rendering info. |
rasterHandle | IN raster unique identifier. |
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.
renderingInfo | IN rendering info to set. |
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
radians | IN georeference info to set. |
pivot | IN DPoint3d to rotate around. |
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
radians | IN georeference info to set. |
pivot | IN DPoint3d to rotate around. |
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
radians | IN georeference info to set. |
pivot | IN DPoint3d to rotate around. |
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_sendBackward | ( | DgnRasterP | rasterHandle, |
int | eventMode | ||
) |
Send raster one position back in display for its model.
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_sendToBack | ( | DgnRasterP | rasterHandle, |
int | eventMode | ||
) |
Send raster to back in display for its model.
rasterHandle | IN raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
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.
isHttp | OUT set to true if the protocole is HTTP. |
port | OUT port number. |
extension | OUT extension if port is HTTP. Must be long enough to hold a full filespec. Allocating MAXFILELENGTH is a good idea. |
hostName | IN Sever name or address. |
timeOut | IN Maximum waiting time in milliseconds. |
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; } }
collection | OUT Used to return a collection of raster handle list. |
pRootModel | IN Root model from which to start the raster extraction |
iteratorType | IN MRITERATE_Root, MRITERATE_PrimaryChildRefs or MRITERATE_Root MRITERATE_PrimaryChildRefs for root model and childs |
depth | IN Nesting depth. 0 for primary reference files or -1 for primary references and nested references |
RASTERCORE_EXPORT StatusInt mdlRaster_systemStrokeToleranceCompute | ( | double * | preferedTolerance, |
MSElementDescrCP | element | ||
) |
Compute the recommended tolerance value for stroking the specified element.
preferedTolerance | OUT computed tolerance. |
element | IN element for which stroke tolerance is computed |
RASTERCORE_EXPORT void mdlRaster_terminate | ( | void | ) |
Must be called by every application that has finished using mdlRaster API.
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyBackgroundGet | ( | UInt8 * | pTransparencyLevel, |
DgnRasterCP | rasterHandle | ||
) |
Get background transparency level.
Monochrome raster only.
pTransparencyLevel | OUT Transparency level: 0...255, 0 -> Opaque. |
rasterHandle | IN Raster unique identifier. |
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyBackgroundSet | ( | UInt8 | transparencyLevel, |
DgnRasterP | rasterHandle, | ||
int | eventMode | ||
) |
Set background transparency level.
Monochrome raster only.
transparencyLevel | IN Transparency level: 0...255, 0 -> Opaque. |
rasterHandle | IN Raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyColorGet | ( | RgbColorDef * | pRGBColor, |
UInt8 * | pTransparencyLevel, | ||
DgnRasterCP | rasterHandle | ||
) |
Get current transparent color and transparency level.
pRGBColor | OUT RGB color. |
pTransparencyLevel | OUT Transparency level: 0...255, 0 -> Opaque. |
rasterHandle | IN Raster unique identifier. |
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyColorSet | ( | const RgbColorDef * | pRGBColor, |
UInt8 | transparencyLevel, | ||
DgnRasterP | rasterHandle, | ||
int | eventMode | ||
) |
Set transparent color and transparency level.
pRGBColor | IN RGB color. |
transparencyLevel | IN Transparency level: 0...255, 0 -> Opaque. |
rasterHandle | IN Raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyForegroundGet | ( | UInt8 * | pTransparencyLevel, |
DgnRasterCP | rasterHandle | ||
) |
Get foreground transparency level.
pTransparencyLevel | OUT Transparency level: 0...255, 0 -> Opaque. |
rasterHandle | IN Raster unique identifier. |
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyForegroundSet | ( | UInt8 | transparencyLevel, |
DgnRasterP | rasterHandle, | ||
int | eventMode | ||
) |
Set foreground transparency level.
transparencyLevel | IN Transparency level: 0...255, 0 -> Opaque. |
rasterHandle | IN Raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |
RASTERCORE_EXPORT StatusInt mdlRaster_transparencyReset | ( | DgnRasterP | rasterHandle, |
int | eventMode | ||
) |
Remove all transparent colors.
rasterHandle | IN Raster unique identifier. |
eventMode | IN Obsolete: This parameter is not used anymore. |