KWIN_DRAW_RGB_IMAGE(3)

FUNCTION
kwin_draw_rgb_image - Draw TrueColour image to a pixel canvas.

SYNOPSIS
#include <karma_kwin.h>

flag kwin_draw_rgb_image

(KPixCanvas canvas, int x_off, int y_off, int x_pixels, int y_pixels, CONST unsigned char *red_slice, CONST unsigned char *green_slice, CONST unsigned char *blue_slice, CONST uaddr *hoffsets, CONST uaddr *voffsets, unsigned int width, unsigned int height, KPixCanvasImageCache *cache_ptr)

DESCRIPTION
This routine will draw a 2-dimensional slice of a Karma array onto a pixel canvas. This slice may be tiled. The slice is a RGB image.

canvas
    The pixel canvas.

x_off
    The horizontal offset, relative to the top-left corner of the canvas.

y_off
    The vertical offset, relative to the top-left corner of the canvas.

x_pixels
    The number of horizontal pixels to draw.

y_pixels
    The number of vertical pixels to draw.

red_slice
    The start of the red slice data.

green_slice
    The start of the green slice data.

blue_slice
    The start of the blue slice data.

hoffsets
    The array of horizontal byte offsets.

voffsets
    The array of vertical byte offsets.

width
    The width of the input image (in values).

height
    The height of the input image (in values).

cache_ptr
    Cache data is written here. The routine may produce cache data which will vastly increase the speed of subsequent operations on this data. Prior to process exit, a call MUST be made to <-kwin_free_cache_data->, otherwise shared memory segments could remain after the process exits.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

NOTE
The 3 colour components must be of type K_UBYTE .

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/