Share

AcGiSentScanLines

C++

struct AcGiSentScanLines {
  enum IsmRequestStatus {
    eOk,
    eInvalidInput,
    eInvalidColorDepth,
    eInvalidPixelRequest,
    eInvalidDeliveryMethod,
    eNoValidCompressors,
    eInsufficientMemory
  };
  Adesk::Int8 * mpPixelBuffer;
  Adesk::UInt32 mRowBytes;
  void * mpImageId;
  Adesk::Int16 mIsCancelled;
  Adesk::Int16 mHasFailed;
  Adesk::UInt32 mBytes;
  IsmRequestStatus mRequestStatus;
};

File

acgi.h

Members

Members Description
eOk Successful return
eInvalidInput Unknown or incompatible source or destination image organization
eInvalidColorDepth mColorDepth to big or too small for request
eInvalidPixelRequest Scaling matrix requested pixels outside the boundary of the source image
eInvalidDeliveryMethod Frame buffer delivery method requested with image compression, which is an invalid combination
eNoValidCompressors None of the requested image compressors were found and/or compatible with the image data format
eInsufficientMemory Low memory conditions
mpPixelBuffer A contiguous block of memory containing all the scanlines sent.
mRowBytes The size of each scanline (in bytes).
mpImageId ObjectId of AcDbRasterImage object.
mIsCancelled Non-zero if the user cancels the redraw operation.
mHasFailed Non-zero if ISM failed to generate valid scan line data for this raster.
mBytes Indicates how many bytes of possibly compressed data are being returned in pPixelBuffer.
mRequestStatus An enumerated type allowing for several types of failure.

Description

[The following is adapted from the HEIDI Driver Developer Kit documentation. Please refer to the section describing the SentScanLines structure in that document for essential and detailed information on the use of this API.]

The AcGiSentScanLines structure is defined as:

struct AcGiSentScanLines
{
    Adesk::Int8*     mpPixelBuffer;  // one pointer per scan line
    Adesk::UInt32    mRowBytes;      // number of bytes per scan line
    void*            mpImageId;      // image id ptr
    Adesk::Int16     mIscanceled;   // Boolean: user canceled
    Adesk::Int16     mHasFailed;     // Boolean: request failed
    char*            mpCompressionModes;
    Adesk::UInt32    mBytes;
    IsmRequestStatus mRequestStatus;
};

The driver may call GetScanLines() any time during the life of the plot. The AcGiSentScanLines structure and the scan lines pointed to are valid until the driver calls the pFreeScanLines function pointer (which should be done as soon as possible). Drivers must call freeScanLines() immediately.

mpPixelBuffer is a contiguous block of memory containing all the scanlines sent. The scanline buffer must begin on a DWORD address boundary. The exact size of each scanline (in bytes) is specified by mRowBytes. mRowBytes therefore will always be a multiple of four, but will more than enough to hold the requested scan line length because the application might be sending a subset of a larger raster image. Neither the application nor the driver should write in memory that is in the AcGiSentScanLines buffer but not actually a pixel address. Specifically this refers to memory between the last pixel on a scan line and the first pixel on the next scan line. In the case of the last scan line, this memory may not have been allocated.

mIscanceled is set if the user cancels the redraw operation. The driver must display only the image frame and may proceed as if the user had canceled the redraw operation.

If mHasFailed is non-zero, the ISM failed to generate valid scan line data for this raster. The driver should skip drawing this raster but should continue drawing any other entities, including other rasters, in its display list.

mpCompressionModes is a single ASCII string giving the name of the compression mode and any options which were applied to this block (tile) of data.

mBytes tells the device how many bytes of possibly compressed data are being returned in pPixelBuffer.

mRequestStatus is an enumerated type allowing for several types of failure.

Was this information helpful?