Jump to content

DiveBlitImageLines

From EDM2
Revision as of 01:10, 26 November 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:DiveBlitImageLines}} This function is called to blit only the changed lines in the source image by using DiveBlitImage. The changed lines are specified with the *pbLineMask* parameter. ==Syntax== _DiveBlitImageLines(hDiveInst, ulSrcBufNumber, ulDstBufNumber, pbLineMask) ==Parameters== ;''hDiveInst'' (HDIVE) - input :Display engine DIVE instance. ;''ulSrcBufNumber'' (ULONG) - input :Indicates DIVE instance buffer number of the buffer contain...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function is called to blit only the changed lines in the source image by using DiveBlitImage. The changed lines are specified with the *pbLineMask* parameter.

Syntax

_DiveBlitImageLines(hDiveInst, ulSrcBufNumber, ulDstBufNumber, pbLineMask)

Parameters

hDiveInst (HDIVE) - input
Display engine DIVE instance.
ulSrcBufNumber (ULONG) - input
Indicates DIVE instance buffer number of the buffer containing the source data. This value is returned by DiveAllocImageBuffer.
ulDstBufNumber (ULONG) - input
The following buffer numbers are reserved for blitting to the screen:
  • DIVE_BUFFER_SCREEN Results in the image being transferred to either the graphics plane buffer or the alternate plane buffer, based on whether an alternate buffer exists and the suitability of the overlay plane to accelerate the scaling of the image. If DIVE chooses to use the alternate buffer, it will also paint the overlay "key" color on the graphics plane. This automatic painting does not occur if the alternate plane is explicitly specified.
  • DIVE_BUFFER_GRAPHICS_PLANE Results in the image being transferred to the graphics plane.
  • DIVE_BUFFER_ALTERNATE_PLANE Results in the image being transferred to the alternate (for example, overlay) plane. If your hardware does not support such a plane, this is an error.
pbLineMask (PBYTE) - input
Indicates the line mask pointer for the line changed.

Returns

rc (ULONG) - returns
Return codes indicating success or type of failure:
  • DIVE_SUCCESS If the function succeeds, 0 is returned.
  • DIVE_ERR_BLITTER_NOT_SETUP DiveSetupBlitter must be called before a call is made to **DiveBlitImageLines**.
  • DIVE_ERR_INVALID_INSTANCE The DIVE instance handle specified in the hDiveInst parameter is invalid.

Remarks

When only a line changes, use **DiveBlitImageLines** to improve performance over blitting the entire image using DiveBlitImage.

Example Code

#include <dive.h>

HDIVE hDiveInst;      /* Display engine DIVE instance. */
ULONG ulSrcBufNumber; /* Buffer containing source data. */
ULONG ulDstBufNumber; /* Identifies buffer number. */
PBYTE pbLineMask;     /* Line mask pointer. */
ULONG rc;             /* Return codes. */

rc = DiveBlitImageLines(hDiveInst, ulSrcBufNumber,
        ulDstBufNumber, pbLineMask);

Related Methods