#include "grphics.h"
#include "img.h"
Go to the source code of this file.
#define show_sub_image | ( | im, | |||
xstart, | |||||
ystart, | |||||
xext, | |||||
yext, | |||||
win, | |||||
xpos, | |||||
ypos | ) | (*show_func)(im,xstart,ystart,xext,yext,win,xpos,ypos) |
* (C) Copyright 1990, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License.
Definition at line 25 of file showim.h.
Referenced by display_clip_image(), display_image(), display_images(), and do_re_display().
DLLSYM void def_show_sub_image | ( | IMAGE * | source, | |
INT32 | xstart, | |||
INT32 | ystart, | |||
INT32 | xext, | |||
INT32 | yext, | |||
WINDOW | win, | |||
INT32 | xpos, | |||
INT32 | ypos | |||
) |
Send the given image to the daemon and insert it in the display list.
Definition at line 30 of file showim.cpp.
References IMAGE::capture(), COMPUTE_IMAGE_XDIM, copy_sub_image(), FALSE, HEADUNION::fd, IMAGE::get_bpp(), WINFD::get_fd(), getshm(), IMAGEOP::header, EIGHTOP::header, PARAMUNION::i, IMAGEOP::line, NULL, EIGHTPARAMS::p, EIGHTOP::param, SHOWIMAGE, SHOWLINE, IMAGEOP::size, IMAGEOP::type, EIGHTOP::type, and sbdgraphicsevent::y.
00039 { 00040 EIGHTOP *newop; //message structure 00041 INT32 y; //y coord 00042 INT32 linelength; //bytes per line 00043 IMAGE dummyimage; //used for copying to 00044 IMAGEOP *sendline; //transmitted line 00045 INT32 structsize; //size of structure 00046 INT32 destbpp; //destination bits per pixel 00047 00048 destbpp = source->get_bpp (); //send all images unchanged 00049 00050 newop = (EIGHTOP *) getshm (sizeof (EIGHTOP)); 00051 if (newop != NULL) { 00052 //send the fd 00053 newop->header.fd = win->get_fd (); 00054 newop->type = SHOWIMAGE; //send the operator 00055 newop->param.p[0].i = xext; //send parameters 00056 newop->param.p[1].i = yext; 00057 newop->param.p[2].i = destbpp; 00058 newop->param.p[3].i = xpos; 00059 newop->param.p[4].i = ypos; 00060 00061 //bytes required 00062 linelength = COMPUTE_IMAGE_XDIM (xext, destbpp); 00063 linelength++; //round up to next 00064 linelength &= ~1; //multiple of 2 00065 //size of structure 00066 structsize = (INT32) (sizeof (IMAGEOP) + linelength - 2); 00067 for (y = yext - 1; y >= 0; --y) { 00068 //get space 00069 sendline = (IMAGEOP *) getshm (structsize); 00070 if (sendline != NULL) { 00071 sendline->header.fd = win->get_fd (); 00072 sendline->type = SHOWLINE; 00073 sendline->size = structsize; 00074 dummyimage.capture (sendline->line, xext, 1, (INT8) destbpp); 00075 //ready for copy 00076 //copy to shm 00077 copy_sub_image (source, xstart, ystart + y, xext, 1, &dummyimage, 0, 0, FALSE); 00078 } 00079 } 00080 } 00081 }
* (C) Copyright 1990, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License.
Definition at line 24 of file showim.cpp.