SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from RedHat Other XITE-3.3-3.i386.rpm

IMAGE

Section: C Library Functions (3)
Updated: 16 Mar 1998
Index

 

NAME

Image, ImageError, ImageHasColormap, ImageInstallPixelType,ImageRedisplay, ImageRedisplayScreen, ImageRedisplayArea,ImageKill, ImageScreenXtoPos, ImageScreenYtoPos,ImageScreenXYtoAdr, ImageScreenToHeight, ImageScreenToWidth,ImageHeightToScreen, ImageWidthToScreen, ImagePosXYtoAdr,ImageTranslateZoomPanArgs, ImagePosXtoScreen,ImagePosYtoScreen, ImageGetZoom, ImageSetZoom,ImageCopyImagePart, ImageCopyResources, ImageGetResources,ImageGetImageResources, ImageGetZoomAll, ImageSetZoomAll -XITE X11 image widget

 

APPLICATION HEADER FILE

<xite/Image.h>

 

CLASS HEADER FILE

<xite/ImageP.h>

 

CLASS

imageWidgetClass

 

CLASS NAME

Image

 

SUPERCLASS

Composite

 

DESCRIPTION

The Image widget is part of the XITE (X-based Image ProcessingTools and Environment) software. It is used by all thedisplay programs supplied with XITE.

The widget is designed to work with images in the BIFF format.It can probably work also with other image formats, bysupplying a different set of image format description routines(see ImageFormat(3)).

This widget handles a number of pixeltypes, see the sectionPredefined pixeltypesbelow.

The widget handles zooming and panning through a translationtable and action functions. Various events can be caughtand supplied to callback functions.

See the documentation on the main XITE display programxshow(1)as well as the XITE ximage toolkit ximage(3)formore information on how this widget can be used in anapplication.

 

RESOURCES

Apart from the resources of the superclass:

XtNimageImage (class XtCImageImage)
Type: Pointer,Default: NULL

This refers to the complete data structure for an image.The pointer is general enough to refer to any kind ofdata structure. In most cases it will refer to a BIFF image,but it could be used to refer to other image formats.

XtNimageBand (class XtCImageBand)
Type: Pointer,Default: NULL

This refers to the complete data structure for theband/channel of the image. It does not refer to the firstpixel (see the resource XtNimageData).

Setting this resource while not setting the primary bandresources (XtNimageRedBand, XtNimageGreenBand,XtNimageBlueBand) means that the image is PseudoColor (notrgb). This will automatically update the pixel data resourcesfor the primaries (XtNimageRedData, XtNimageGreenData,XtNimageBlueData). This is necessary in case the image isdisplayed with a composite visual class.

XtNimageRedBand (class XtCImageRedBand)
Type: Pointer,Default: NULL

If the image is a three-band image which should be interpretedas an rgb image where the tree bands represent the amount ofred, green and blue, then this resource refers to the completedata structure for the band/channel with the red component.Also refer to the XtNimageRgband XtNimageRedDataresources.

XtNimageGreenBand (class XtCImageGreenBand)
Type: Pointer,Default: NULL

Same as XtNimageRedBand, but for the green component.

XtNimageBlueBand (class XtCImageBlueBand)
Type: Pointer,Default: NULL

Same as XtNimageRedBand, but for the blue component.

XtNimageRgb (class XtCImageRgb)
Type: Boolean,Default: False

This is a readonly resource telling whether the widgetdisplays a three-band rgb image or a one-band image.

XtNimageData (class XtCImageData)
Type: Pointer,Default: NULL

This refers to the first pixel of the band given byXtNimageBand.

XtNimageRedData (class XtCImageRedData)
Type: Pointer,Default: NULL

This refers to the first pixel of the red image component,given by XtNimageRedBand, if the image is supposed to beinterpreted as a three-band rgb image. If the image is aone-band image, then this resource will equal XtNimageData.

XtNimageGreenData (class XtCImageGreenData)
Type: Pointer,Default: NULL

Same as XtNimageRed, but for the green component.

XtNimageBlueData (class XtCImageBlueData)
Type: Pointer,Default: NULL

Same as XtNimageRed, but for the blue component.

XtNimageTitle (class XtCImageTitle)
Type: Pointer,Default: NULL

Title of the image.

XtNimagePixtype (class XtCImagePixtype)
Type: Pointer,Default: NULL

Name of pixeltype. Typically one of "ImageBytePixel","ImageUnsignedShortPixel" etc.

XtNimageWidth (class XtCImageWidth)
Type: int,Default: NULL

Width of image data in pixels.

XtNimageHeight (class XtCImageHeight)
Type: int,Default: NULL

Height of image data in pixels.

XtNvariableAspect (class XtCVariableAspect)
Type: Boolean,Default: "false"

True if image can have variable aspect ratio. Otherwiseit will be forced to have a fixed aspect ratio.

XtNimageLineLength (class XtCImageLineLength)
Type: int,Default: NULL

Number of bytes which each row of the image occupies.

XtNimageXstart (class XtCImageXstart)
Type: int,Default: NULL

The global horizontal coordinate of the upper-left corner-pixelof the image.

XtNimageYstart (class XtCImageYstart)
Type: int,Default: NULL

The global vertical coordinate of the upper-left corner-pixelof the image.

XtNdisplayMethod (class XtCDisplayMethod)
Type: int,Default: NULL

This resource can be given one of the following values


 0x0000
 0x0001
 0x0010 (STATIC_GRAY_1)
 0x0020 (STATIC_GRAY_2)
 0x0040 (STATIC_GRAY_4)
 0x0080 (STATIC_GRAY_8)
 0x1040 (GRAY_SCALE_4)
 0x1080 (GRAY_SCALE_8)
 0x3080 (PSEUDO_COLOR_8, 128-entry colormaps
         (reduced-color))
 0x3080 (PSEUDO_COLOR_8_A, 128-entry colormaps
         (reduced-color))
 0x3081 (PSEUDO_COLOR_8_B, 256-entry colormaps)
 0x4180 (TRUE_COLOR_24)
 0x5180 (DIRECT_COLOR_24,
         128-entry composite colormaps
         (reduced-color))
 0x5180 (DIRECT_COLOR_24_A,
         128-entry composite colormaps
         (reduced-color))
 0x5181 (DIRECT_COLOR_24_B,
         256-entry composite colormaps)

Setting XtNdisplayMethod to 0 (default value), means thatthe displaymethod is calculated from visual class and depth.The result will be a reduced-color displaymethod if visualclass is PseudoColor or DirectColor (leaving some colors foroverlays and window manager).

Setting XtNdisplayMethod to 1 means that the displaymethodis calculated the same way as for the value 0, but in thiscase, the result will be a full-color displaymethod ifvisual class is PseudoColor or DirectColor.

XtNprintValues (class XtCPrintValues)
Type: Boolean,Default: "true"

Whether or not to print the numeric value of each pixel inthe image window. This will only be done when each pixel islarge enough to give room for the textual representation.

XtNcolortab (class XtCColortab)
Type: int,Default: -1

An index into an array of colortables. This resource identifieswhich colortable (in the array of colortables) is active inthe image window. The array is not local to the image widget,but must be supplied by the application.

The default value (of -1) will make the widget Initializemethod choose the value 0.

XtNcolorCells (class XtCColorCells)
Type: int,Default: -1

Number of colors actually used to display the image. Thismay be different from the length of the X colormap used bythe image, because the Image widget is capable of using onlya part of a colormap. This is to reduce the "technicolor"effect when the mouse is moved between different windows.

For such "reduced-color" display of images, this resource willtypically have the value 128 (whereas there are typically256 cells in an X colormap). For full-color display, theresource will be 256.

The default value (of -1) will make the widget Initializemethod calculate a legal value based on the XtNdisplayMethodresource and the number of cells in the colormaps for thechosen visual.

XtNcolorPtr (class XtCColorPtr)
Type: Pointer,Default: NULL

A reference to an integer array of XtNcolorCells elements.

Each pixel value is transformed into a new value before it issent to the pixmap (which will be shown in a screen window).The original pixel value is used as an index into an integerarray. The value in the array cell becomes the pixel value inthe pixmap.

The integer transformation array (which always has 256elements) is identical to the XtNcolorPtr array for the firstXtNcolorCells elements. If XtNcolorCells < 256, then theXtNcolorPtr array is repeated in the transformation array.

If the pixeltype is not unsigned byte, the pixelvalue is firstscaled and translated to a legal interval (typically between 0and XtNcolorCells) before it is used as a lookup index.

With e.g. XtNcolorCells equal to 128 (reduced-color display)and XtNcolorPtr an array from 64 to 191, the integertransformation array contains the 256 values64,...191,64,...,191. The scaled and translated originalpixelvalues will then be transformed (by the first 128elements) into the range 64,...,191.

The default value will make the widget Initialize methodfind an array based on the XtNdisplayMethod andXtNcolorCells resources. For "reduced-color" display, thearray will have 128 elements with values from 64 to 191.For "full-color" display, the array will have 256 elementsfrom 0 to 255.

XtNvisual (class XtCVisual)
Type: Visual,Default: NULL

Class of visual. See the "Xlib Programming Manual" byAdrian Nye (O'Reilly & Associates, Inc.), chapter 7 formore information about visuals.

XtNscaletype (class XtCScaletype)
Type: int,Default: NULL

This resource takes the value SCALE_LINEAR or SCALE_THRESHOLD.In the first case, pixel values are scaled linearly duringthe transformation described for the XtNcolorPtr resource.The scaling factors are given by the resources XtNscalea andXtNscaleb.

For SCALE_TRESHOLD, the resource XtNscalea is used as athreshold level during the transformation described forthe XtNcolorPtr resource. If the pixel value is below thethreshold level, it is set equal to the minimum element inthe integer transformation array, otherwise it is set equalto the maximum element in the transformation array.

This resource is always interpreted as SCALE_LINEAR for allpixeltypes except unsigned byte and signed byte.

XtNscalea (class XtCScalea)
Type: float,Default: 1.0

Inclination of linear transformation of pixel values duringdisplay, if XtNscaletype equals SCALE_LINEAR. For XtNscaletypeequal to SCALE_THRESHOLD, this resource is the thresholdlevel.

XtNscaleb (class XtCScaleb)
Type: float,Default: 0.0

Offset of linear transformation of pixel values during display.

XtNminval (class XtCMinval)
Type: float,Default: NULL

Minimum pixelvalue for an image. This has an effect on thescaling of the image. For unsigned byte images, this is oftenset to 0. If the same image is represented by a floatpixeltype, this resource is usually calculated from theparticular image. These two images may look slightly differenton the screen, although the images are actully equal.

XtNmaxval (class XtCMaxval)
Type: float,Default: NULL

Maximum pixelvalue for an image. See the comment about theXtNminval resource.

XtNfont (class XtCFont)
Type: FontStruct,Default: "XtDefaultFont"

This is one of the fonts which may be used to print thenumerical pixelvalues in the image screen window if theresource XtNprintValues is set.

The following three fonts are alternatives to XtNfont.Typically these fonts will be of different sizes. The widgetwill try the smallest one first. Pixelvalues will onlybe printed if the textual representation fits inside thepixel square.

XtNfont1 (class XtCFont1)
Type: FontStruct,Default: NULL

Another font for printing pixelvalues.

XtNfont2, (class XtCFont2)
Type: FontStruct,Default: NULL

Another font for printing pixelvalues.

XtNfont3, (class XtCFont3)
Type: FontStruct,Default: NULL

Another font for printing pixelvalues.

XtNcallback (class XtCCallback)
Type: XtCallbackList,Default: NULL

The functions on this callback list will be called by thenotifyaction function described below.

XtNresizeCallback (class XtCResizeCallback)
Type: XtCallbackList,Default: NULL

The functions on this list are called by the notifyactionfunction described below, provided that the event whichinvokes the action function is NULL.

XtNimageUpdate (class XtCImageUpdate)
Type: int,Default: NULL

This resource controls the resizing and display of an image.For a description, see the description of redisplay routinesin the section Convenience routinesbelow.

XtNmenubar (class XtCMenubar)
Type: Boolean,Default: "true"

Whether or not a menubar should be visible above the image.The menubar itself is not an attribute of the image widget.This resource merely is used to tell the application whetherthere is a menubar present. It is the responsibility of theapplication to take the proper action (or no action).

 

IMAGE ACTIONS

nop
No operation.

notify

This action can be used to log position, select images and soon. It assigns values to the attributes of the ImageCallbackRecstructure and invokes the callback functions on theXtNcallback callback-list with a reference to theImageCallbackRec structure.

The attributes of the ImageCallbackRec structure are

reasonAn integer with value ACTIVATE or RESIZE.

eventAn XEvent reference to the event which triggered the actionfunction.

imgA "struct imagestruct *" reference to the XtNimageImageresource of the widget in which the event took place.

bandA "struct bandstruct *" reference to the XtNimageBand resourceof the widget in which the event took place.

x, yTwo integers which represent the coordinates where one of theevents ButtonPress, ButtonRelease, MotionNotify or Exposetook place (or where the mouse pointer happened to be locatedin case of other events).

dataAn ImageData reference to the actual image data pixel at thelocation given by xand y.

pixtypeA "pixel *" reference to the pixeltype of the image data.See the section Predefined pixeltypesbelow.

zoomA "float" with the current zoom factor.

magnificationA "float" with the current ratio of image pixels which arein the widget window.

xpan, ypanTwo integers describing the horizontal and vertical panning.

kill
Identical to the ImageKillfunction described below in thesection Convenience routines.

zoom_pan
This action takes 3 arguments, zoom_pan(zoom, pan_x, pan_y).The arguments may be absolute or relative values. Positionmay also be translated from mouse position. If the panarguments end in a C,the pan arguments specify the centerposition in the new image rather than the upper left corner.


 <Zoom_pan> := zoom_pan(<zoom_arg>,
                        <pan_arg>, <pan_arg>)
 <zoom_arg> := In | Out | Normal |
               <zoom_op><float_value> |
               <float_value>
 <zoom_op>  := + | - | / | *
 <pan_arg>  := <pos_ulc> | <pos_cp>
 <pos_ulc>  := MousePos | <pan_op><int_value> |
               <int_value>
 <pos_cp>   := MousePosC | <int_value>C
 <pan_op>   := + | -

<zoom_arg> equal to "In" means double zoom factor, "Out"means half zoom factor, "Normal" means zoom factor 1.0.MousePos means get position from mouse position.

See the section Default translation bindingsfor examples.

WMColormap
WMColormap informs the window manager about desired colormaps.This will enable a visible menubar and visible popup menus inan image window also when the image is displayed with somecombination of DirectColor visual and non-reduced-color modedisplay.

WMColormap(Enter)Mouse pointer enters image.

WMColormap(Leave)Mouse pointer leaves image.

 

DEFAULT TRANSLATION BINDINGS


 <Key>Q:          kill()
 <EnterWindow>:   WMColormap(Enter)
 <LeaveWindow>:   WMColormap(Leave)
 None<Key>Left:   zoom_pan(+0, -4, +0)
 None<Key>Right:  zoom_pan(+0, +4, +0)
 None<Key>Up:     zoom_pan(+0, +0, -4)
 None<Key>Down:   zoom_pan(+0, +0, +4)
 Shift<Key>Left:  zoom_pan(+0, -16, +0)
 Shift<Key>Right: zoom_pan(+0, +16, +)
 Shift<Key>Up:    zoom_pan(+0, +0, -16)
 Shift<Key>Down:  zoom_pan(+0, +0, +16)
 Ctrl<Key>Left:   zoom_pan(+0, -256, +0)
 Ctrl<Key>Right:  zoom_pan(+0, +256, +0)
 Ctrl<Key>Up:     zoom_pan(+0, +0, -256)
 Ctrl<Key>Down:   zoom_pan(+0, +0, +256)
 Ctrl <Btn1Down>: zoom_pan(*2, MousePosC, MousePosC)
 Ctrl <Btn2Down>: zoom_pan(0, MousePosC, MousePosC)
 Ctrl <Btn3Down>: zoom_pan(/2, MousePosC, MousePosC)
 Shift Ctrl <Btn1Down>:
                  zoom_pan(*8, MousePosC, MousePosC)
 Shift Ctrl <Btn2Down>:
                  zoom_pan(1, MousePosC, MousePosC)
 Shift Ctrl <Btn3Down>:
                  zoom_pan(/8, MousePosC, MousePosC)
 None <Btn1Up>:   notify()
 None <Btn2Up>:   notify()
 None <Btn3Up>:   notify()
 <MouseMoved>:    notify()

 

IMAGE CALLBACKS

There are two callback lists, identified by theresources XtNcallback and XtNresizeCallback. See thedescription of these resources.

 

PREDEFINED PIXELTYPES

Each pixeltype is of type pixel,given by


 typedef struct pixelstruct
 {
   char *pixelname;
   int  pixelsize;
   resizefunc resize;
   imageprintffunc printf;
   int txtlen;
   scale_type scaletype;
   float scalea, scaleb;
   float minval, maxval;
 } pixel;

The various predefined pixeltypes are

bytepixel


 pixelname : ImageBytePixel
 pixelsize : 1
 resize    : ImageByteResize
 printf    : ImageBytePrintf
 txtlen    : 3
 scaletype : SCALE_LINEAR
 scalea    : 1.0
 scaleb    : 0.0
 minval    : 0.0
 maxval    : UNS_BYTE_MAX

signedbytepixel


 pixelname : ImageSignedBytePixel
 pixelsize : 1
 resize    : ImageSignedByteResize
 printf    : ImageSignedBytePrintf
 txtlen    : 4
 scaletype : SCALE_LINEAR
 scalea    : 1.0
 scaleb    : 0.0
 minval    : SIGN_BYTE_MIN
 maxval    : SIGN_BYTE_MAX

shortpixel


 pixelname : ImageShortPixel
 pixelsize : 2
 resize    : ImageShortResize
 printf    : ImageShortPrintf
 txtlen    : 6
 scaletype : SCALE_LINEAR
 scalea    : 1.0
 scaleb    : 0.0
 minval    : SIGN_SHORT_MIN
 maxval    : SIGN_SHORT_MAX

unsignedshortpixel


 pixelname : ImageUnsignedShortPixel
 pixelsize : 2
 resize    : ImageUnsignedShortResize
 printf    : ImageUnsignedShortPrintf
 txtlen    : 5
 scaletype : SCALE_LINEAR
 scalea    : 1.0
 scaleb    : 0.0
 minval    : 0.0
 maxval    : UNS_SHORT_MAX

longpixel
This is a 4-byte integer, long on some platforms, int onothers.


 pixelname : ImageLongPixel
 pixelsize : 4
 resize    : ImageLongResize
 printf    : ImageLongPrintf
 txtlen    : 10
 scaletype : SCALE_LINEAR
 scalea    : 1.0
 scaleb    : 0.0
 minval    : INTEGER_MIN
 maxval    : INTEGER_MAX

floatpixel


 pixelname : ImageFloatPixel
 pixelsize : 4
 resize    : ImageFloatResize
 printf    : ImageFloatPrintf
 txtlen    : 9
 scaletype : SCALE_LINEAR
 scalea    : 1.0
 scaleb    : 0.0
 minval    : 0.0
 maxval    : 1.0

doublepixel


 pixelname : ImageDoublePixel
 pixelsize : 8
 resize    : ImageDoubleResize
 printf    : ImageDoublePrintf
 txtlen    : 9
 scaletype : SCALE_LINEAR
 scalea    : 1.0
 scaleb    : 0.0
 minval    : 0.0
 maxval    : 1.0

 

CONVENIENCE ROUTINES

Routines related to the visual class

ImageHasColormap
 int ImageHasColormap( ImageWidget wid );

Return False if visual class is StaticGray, StaticColor orTrueColor (i.e. if visual does not have a changeable colormap,the colormap is immutable), True if Visual type is GrayScale,PseudoColor or DirectColor.

Redisplay routines:

ImageRedisplay
 void ImageRedisplay( ImageWidget wid,
    update_status update );

If updateis not equal to UPDATE_NONE, sets the privateupdate-variable of the image widget equal to update.Callsthe resize and expose methods of the widget class which widbelongs to (this may be a subclass, e.g.imageOverlayWidgetClass). The expose method is called withNULL as event and region arguments.

The updatevariable governs the behaviour of the resizemethod. If the widget size is unchanged, but the contents needto be remade, use updateequal to UPDATE_ZOOMPAN. If theimage is new (XtNimageImage, XtNimageBand, XtNimageData or thecorresponding color-specific bands or data resources), useupdateequal to UPDATE_NEWSIZE. If the widget size ischanged, but the image data are unchanged, use updateequalto UPDATE_RESIZE. If only exposure is needed (no change tosize, zoom, pan or data), use UPDATE_NONE.

If updateequals UPDATE_REDISPLAY, the resize method justcalls the pixeltype- (and displaymethod-) specific resizefunction on the rectangle given by the private widgetvariables updatex,updatey,updatewand updateh.Afterwards the private update variable is set equal toUPDATE_RESIZE before the resize method returns. Thisfunctionality can be achieved more easily with the functionImageRedisplayScreenor ImageRedisplayArea(see below).

If the image data and widget size are unchanged, but one ofthe resources XtNscaletype, XtNscalea, XtNscaleb, XtNminval,XtNmaxval, XtNcolorCells, XtNcolorPtr, XtNdisplayMethod havechanged, then use ImageRedisplayScreenorImageRedisplayArea.However, if these resources have beenchanged with a call to XtVaSetValues or XtSetValues, thenthere should be no need to call any of these redisplayfunctions explicitly (it is taken care of by the SetValuesmethod of the widget).

If the window pixmap size equals the image size (data size),the private variable resizeis set to False, and thepixeltype-specific resize function does not use the geometrictranslation tables.

For more information on the pixeltype-specific resizefunctions, see ImageResize(3).

ImageRedisplayScreen
 void ImageRedisplayScreen( ImageWidget wid,
    int x, int y, int width, int height );

Calls the resize method with the private image update-variableequal to UPDATE_REDISPLAY. This will call the resize functionfor the particular pixeltype (and displaymethod), on therectangle given by x,y,widthand height.Finally,the expose method is called with region defined by therectangle given by x,y,widthand height.Thecoordinates are relative to the screen window.

ImageRedisplayArea
 int ImageRedisplayArea( ImageWidget wid,
    int x, int y, int width, int height );

The coordinates are relative to the image (the actual data).Translates to screen coordinates and callsImageRedisplayScreen.

Zoom-handling routines:
Also see the action function zoom_panin the sectionImage actionsabove.

ImageTranslateZoomPanArgs
 void ImageTranslateZoomPanArgs(
    ImageWidget wid, char* zoomarg,
    char* panxarg, char* panyarg, int mousex,
    int mousey, float* zoom, int* xpan,
    int* ypan );

Interprets the arguments given to the zoom_panactionfunction (here supplied as strings through zoomarg,panxargand panyarg).Uses this along with the suppliedvalues for the current zoom factor (zoom),horizontal andvertical panning (xpanand ypan)to return updated valuesin zoom,xpanand ypan.

ImageGetZoom
 void ImageGetZoom( ImageWidget wid,
    float* zoom, int* xpan, int* ypan,
    double* factor );

Returns the private image zoom-variable in zoomand theprivate image factor-variable in factor.The factorvariable holds the ratio of image pixels which are in thewidget. The arguments xpanand ypanreturn the privatepan-variables with the private xstart and ystart-variablesadded. (The latter two variables are inherited from the BIFFimage data structure used for the XITE image format. Theyspecify the relative position of the image in a globalcoordinate system.) The xpanand ypanvariables arerelative to the image data coordinate system.

ImageSetZoom
 void ImageSetZoom( ImageWidget wid,
    float zoom, int x, int y );

Sets the zoom factor to zoomand the horizontal and verticalpanning to xand y,respectively, after limiting thearguments to legal intervals. If the arguments are differentfrom the previous zoom and pan-values, the image isredisplayed and exposed. If all the widgets are bound to thesame zoom factor (with the function ImageSetZoomAll)then all the widgets are treated equally.

ImageSetZoomAll
 int ImageSetZoomAll( Widget wid, int on );

Description: Set zoom all flag, If on= TRUE, all widgetswill use the same zoom and pan parameters.

ImageGetZoomAll
 int ImageGetZoomAll( Widget wid );

Return the value of the zoom all flag.

Routines for coordinates of image and screen window.

These functions translate between the coordinate systemof an image (the actual data) and the coordinate systemof the window on screen. The upper left corner of a window,the origin, has coordinates (0, 0). The upper left cornerof an image has coordinates (xstart, ystart).

ImageScreenXtoPos
 int ImageScreenXtoPos(ImageWidget wid, int x);

ImageScreenXtoPostranslates from horizontal coordinate onscreen to horizontal coordinate in image data.The input coordinate xis relative to the left edge of thescreen window.

ImageScreenYtoPos
 int ImageScreenYtoPos(ImageWidget wid, int x);

ImageScreenYtoPosbehaves like ImageScreenXtoPos,exceptfor the vertical coordinate. The input coordinate yisrelative to the upper edge of the screen window.

ImageScreenToHeight
 int ImageScreenToHeight(ImageWidget wid,
    int height);

ImageScreenToHeighttranslates from heightin screencoordinate system to height in image coordinate system.It is allowed for heightto be larger than the height ofthe window.

ImageScreenToWidth
 int ImageScreenToWidth(ImageWidget wid,
    int width);

ImageScreenToWidthtranslates from widthin screencoordinate system to width in image coordinate system.It is allowed for widthto be larger than the width ofthe window.

ImagePosXtoScreen
 int ImagePosXtoScreen(ImageWidget wid, int x,
    int right);

ImagePosXtoScreenfinds horizontal screen window coordinatefrom horizontal image coordinate.

ImagePosYtoScreen
 int ImagePosYtoScreen(ImageWidget wid, int y,
    int bottom);

ImagePosYtoScreenfinds vertical screen window coordinatefrom vertical image coordinate.

ImageHeightToScreen
 int ImageHeightToScreen(ImageWidget wid,
    int height, int maximum);

ImageHeightToScreentranslates from heightin imagecoordinate system to height in screen coordinate system.With nonzero maximum,round upwards to includean integer number of image pixels. Otherwise, rounddownwards.

ImageWidthToScreen
 int ImageWidthToScreen(ImageWidget wid,
    int width, int maximum);

ImageWidthToScreentranslates from widthin imagecoordinate system to width in screen coordinate system.With nonzero maximum,round upwards to includean integer number of image pixels. Otherwise, rounddownwards.

ImageScreenXYtoAdr
 ImageData ImageScreenXYtoAdr(ImageWidget wid,
    int x, int y, int options);

ImageScreenXYtoAdrreturns a pointer to the pixel whichhas screen window coordinates (x,y). optionsdetermineswhat band the address is for (0: band, 1: red_band,2: green_band, 3: blue_band).

ImagePosXYtoAdr
 ImageData ImagePosXYtoAdr(ImageWidget wid,
    int x, int y, int options);

ImagePosXYtoAdrreturns a pointer to the pixel which hasimage coordinates (x,y). optionshas the same meaning asfor ImageScreenXYtoAdr.

Miscellaneous routines:

ImageError
 void ImageError( Widget wid, int messnr );

Call the function XtAppErrorMsg with one of the error messages
 ImageWidget: No error
 ImageWidget: Not enough memory
 ImageWidget: Bad parameters to zoom_pan
 ImageWidget: Unknown DisplayMethod
 ImageWidget: Unknown Pixeltype

The messnrargument determines the message printed.

ImageInstallPixelType
 void ImageInstallPixelType( pixel* pix );

Insert the pixel type given by pixinto a listof pixeltypes. The first element inserted is at the end ofthe list with its next-attribute referencing NULL. The lastelement inserted is referenced by the Image class recordspixel_classattribute.

ImageKill
 void ImageKill( Widget wid, XEvent* event,
    String* params, Cardinal* num_params );

Calls XtDestroyWidget on the toplevel shell parent of wid.

ImageCopyImagePart
 void ImageCopyImagePart( ImageWidget widto,
    ImageWidget widfrom );

Sets the ImageWidget part of the widget widtoequal to theImageWidget part of the widget widfrom.No resizing orexposure is done.

ImageCopyResources
 void ImageCopyResources( ImageWidget widto,
    ImageWidget widfrom );

Sets all the ImagePart resources of widtoequal to theImagePart resources of widfrom.

ImageGetResources
 void ImageGetResources( ImageWidget wid,
    ArgList *args, Cardinal *num_args );

Returns a list of resource-value pairs for all the resourcesof wid.If the function is called before the class isinitialized, the resource list as specified in the classrecord is returned. If it is called after the class has beeninitialized, the returned list also contains the superclassresources.

ImageGetImageResources
 void ImageGetImageResources( ImageWidget wid,
    ArgList *args, Cardinal *num_args );

Returns a list of resource-value pairs which are specific forthe ImageWidget (not including super-class resources).

 

SEE ALSO

ImageResize(3),ImageFormat(3),ImageOverlay(3),ximage(3),xshow(1)

 

DOC

Svein Bøe

 

AUTHOR

Otto Milvang and Svein Bøe


 

Index

NAME
APPLICATION HEADER FILE
CLASS HEADER FILE
CLASS
CLASS NAME
SUPERCLASS
DESCRIPTION
RESOURCES
IMAGE ACTIONS
DEFAULT TRANSLATION BINDINGS
IMAGE CALLBACKS
PREDEFINED PIXELTYPES
CONVENIENCE ROUTINES
SEE ALSO
DOC
AUTHOR

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector