Hello again,<br>if use the code i have attached all works fine, but without scaling. If i set the scale matrix to the following value my screen looks strange (without scaling factor: <a href="http://img136.imageshack.us/my.php?image=screenshotwithoutscalinfc9.png">
http://img136.imageshack.us/my.php?image=screenshotwithoutscalinfc9.png</a>) (with scaling factor: <a href="http://img88.imageshack.us/my.php?image=screenshotwithscaling05cf7.png">http://img88.imageshack.us/my.php?image=screenshotwithscaling05cf7.png
</a>).<br><br>XTransform scale = {{{ XDoubleToFixed (0.5), 0.0, 0.0 },<br> { 0.0, XDoubleToFixed (0.5), 0.0 },<br> { 0.0, 0.0, XDoubleToFixed (1.0) }}};<br><br>And where i have to set the new image height/width? PutImage or XRenderComposite?
<br><br>Best regards,<br><br>flo<br><br><code><br>Picture pixmap_pic;<br>Picture window_pic;<br>Pixmap pixmap;<br>XRenderPictureAttributes pic_attr;<br>XTransform scale = {{{ XDoubleToFixed (1.0), 0.0, 0.0 },<br> {
0.0, XDoubleToFixed (1.0), 0.0 },<br> { 0.0, 0.0, XDoubleToFixed (1.0) }}};<br><br>/* find the used format */<br>XRenderPictFormat *xformat = XRenderFindVisualFormat (dpy,vis);<br>window_pic = XRenderCreatePicture(dpy, desktopWin, xformat, 0, &pic_attr);
<br>pixmap = XCreatePixmap(dpy, desktopWin, si.framebufferWidth, si.framebufferHeight,image->depth);<br>pixmap_pic = XRenderCreatePicture (dpy, pixmap, xformat, 0, &pic_attr);<br><br>XRenderSetPictureTransform (dpy, pixmap_pic, &scale);
<br>/* get the image from server...*/<br>...<br>/* put my image to the screen... */<br>XShmPutImage(dpy,pixmap, gc, image, x, y, x, y,width,height, False);<br>XRenderComposite(dpy,PictOpSrc,pixmap_pic,None,window_pic,x,y,0,0,x,y,width,height);
<br></code><br><br><br><div><span class="gmail_quote">2007/12/11, Peter Harris <<a href="mailto:peter.harris@hummingbird.com">peter.harris@hummingbird.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Florian Harmuth wrote:<br>> Hello again,<br>> i hope that this will be my last post ;-). How can i connect the data of<br>> pixmap and my XImage struct?<br><br>> 2007/12/10, Peter Harris < <a href="mailto:peter.harris@hummingbird.com">
peter.harris@hummingbird.com</a><br>> <mailto:<a href="mailto:peter.harris@hummingbird.com">peter.harris@hummingbird.com</a>>>:<br>><br>>> XPutImage(pixmap) # XImage struct used here<br><br><br>
--<br> Hummingbird Connectivity - A Division of Open Text<br>Peter Harris <a href="http://connectivity.hummingbird.com">http://connectivity.hummingbird.com</a><br>Research and Development Phone: +1 905 762 6001
<br><a href="mailto:peter.harris@hummingbird.com">peter.harris@hummingbird.com</a> Toll Free: 1 877 359 4866<br></blockquote></div><br>