GINO Graphics Suite - GINO v9.0  

gDrawPixel

Syntax

[C/C++:]
void gDrawPixel(int ix, int iy, int pix);
void gDrawPixelArea(int ix, int iy, int npixx, int npixy, int isx, int isy, int idx, int idy, int pixbuf[]);
[F90:]
subroutine gDrawPixel(ix, iy, pix)
subroutine gDrawPixelArea(ix, iy, npixx, npixy, isx, isy, idx, idy, pixbuf)

integer, intent(in) :: ix,iy,pix
integer, intent(in) :: npixx,npixy,isx,isy,idx,idy,pixbuf(*)

Arguments

ix,iy
Pixel (anchor) position (relative to top left corner)

pix
Pixel colour information for single pixel

npixx,npixy
Dimension of pixel data array

isx,isy
The start X position and Y position of a sub-array

idx,idy
The X and Y dimensions of a sub-array

pixbuf
The array containing pixel colour information

Description

The routines gDrawPixel() and gDrawPixelArea() draws a single pixel or a rectangular pixel area using the colour information passed by the user. The pixel (area) is displayed with reference to the anchor position specified by the position (ix,iy), noting that the pixel coordinate system has its origin as the top left corner of the device with the first pixel position being referenced as (0,0).

In both routines, the colour information may consist of colour indices or 24bit true colour values depending on the colour mode of the currently nominated device and as set by the routine gSetColourInfo().

In the case of gDrawPixelArea(), the pixel information is passed through a pointer to an integer array pixbuf dimensioned (npixx,npixy). Where the whole of this array is to be displayed, the user should set isx and isy to 1 and idx and idy to be the same as npixx and npixy. Alternatively a portion of the array can be displayed (still at the anchor position ix,iy) by setting the values of isx and isy to the offsets from the start of the pixbuf array and idx,idy to the dimensions of the sub-array.

The routine gDrawPixelArea() will extract the pixel data from the pixbuf array according to the specification set by gDefinePixelPacking(). The default is for one pixel value to be extracted from one word of pixbuf. The pixel rectangle will be clipped to the device limits if these limits are exceeded. The pixel array will also be subject to the current pixel transformation as set by gSetPixelTransform().

See Also

gDrawPixel Usage
gDefinePixelPacking
gSetColourInfo
gSetPixelTransform