Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XPutPixel(3x) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

XPutPixel − set a pixel value in an image. 

Synopsis

int XPutPixel(ximage, x, y, pixel)
XImage *ximage;
int x;
int y;
unsigned long pixel;

Arguments

ximageSpecifies a pointer to the image to be modified. 

x

ySpecify the x and y coordinates of the pixel to be set, relative to the origin of the image. 

pixelSpecifies the new pixel value. 

Description

XPutPixel() overwrites the pixel in the named image with the specified pixel value.  The x and y coordinates are relative to the origin of the image.  The input pixel value must be in same bit- and byte-order as the machine in which the client is running (that is, the Least Significant Byte (LSB) of the long is the LSB of the pixel).  The x and y coordinates must be contained in the image. 

Structures

typedef struct _XImage {
int width, height;/* size of image */
int xoffset;/* number of pixels offset in x direction */
int format;/* XYBitmap, XYPixmap, ZPixmap */
char *data;/* pointer to image data */
int byte_order;/* data byte order, LSBFirst, MSBFirst */
int bitmap_unit;/* quant. of scan line 8, 16, 32 */
int bitmap_bit_order;/* LSBFirst, MSBFirst */
int bitmap_pad;/* 8, 16, 32 either XY or ZPixmap */
int depth;/* depth of image */
int bytes_per_line;/* accelerator to next line */
int bits_per_pixel;/* bits per pixel (ZPixmap) */
unsigned long red_mask;/* bits in z arrangment */
unsigned long green_mask;
unsigned long blue_mask;
char *obdata;/* hook for the object routines to hang on */
struct funcs {/* image manipulation routines */
    struct _XImage *(*create_image)();
        int (*destroy_image)();
    unsigned long (*get_pixel)();
    int (*put_pixel)();
    struct _XImage *(*sub_image)();
    int (*add_pixel)();
} f;
} XImage;

See Also

ImageByteOrder(), XAddPixel(), XCreateImage(), XDestroyImage(), XGetImage(), XGetPixel(), XGetSubImage(), XPutImage(), XSubImage(). 

Copyright O’Reilly & Assoc.  —  

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026