Resizing pixmap drawables - Xwindows

This is a discussion on Resizing pixmap drawables - Xwindows ; I've been looking at various X windows documents, trying to find whether the X protocol supports resizing pixmap drawables. Nothing that I can find explicitly says that it can't be done but, then again, I haven't found any resizing functions ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Resizing pixmap drawables

  1. Resizing pixmap drawables

    I've been looking at various X windows documents, trying to find whether
    the X protocol supports resizing pixmap drawables. Nothing that I can
    find explicitly says that it can't be done but, then again, I haven't
    found any resizing functions that allow anything but a window drawable
    to be a parameter. It looks like a new pixmap has to be created if
    it is larger than what the previous pixmap was.

    Does anyone here know the answer?

    Thanks...

    Jim Lahue

  2. Re: Resizing pixmap drawables

    Hi,

    In fact, I think that the X Windows System has one viewport per screen
    and not one viewport per window. Does anyone know why the X Windows
    System does not support one viewport per window - like, for instance,
    Opengl?

    Jim, have you found a function that is able to resize a window
    drawable? If you found it, why don't you use it? What is the
    function you are talking about?

    Regarding the resizing of the pixmaps, I think that you would have to
    implement your own routine to resize - or look for a public one
    available on the web.

    Regards,
    Daniel Sadoc

    Jim Lahue wrote in message news:<2sjbvrF1j3jkfU1@uni-berlin.de>...
    > I've been looking at various X windows documents, trying to find whether
    > the X protocol supports resizing pixmap drawables. Nothing that I can
    > find explicitly says that it can't be done but, then again, I haven't
    > found any resizing functions that allow anything but a window drawable
    > to be a parameter. It looks like a new pixmap has to be created if
    > it is larger than what the previous pixmap was.
    >
    > Does anyone here know the answer?
    >
    > Thanks...
    >
    > Jim Lahue


  3. Re: Resizing pixmap drawables

    Daniel Sadoc wrote:

    > Hi,
    >
    > In fact, I think that the X Windows System has one viewport per screen
    > and not one viewport per window. Does anyone know why the X Windows
    > System does not support one viewport per window - like, for instance,
    > Opengl?
    >
    > Jim, have you found a function that is able to resize a window
    > drawable? If you found it, why don't you use it? What is the
    > function you are talking about?
    >
    > Regarding the resizing of the pixmaps, I think that you would have to
    > implement your own routine to resize - or look for a public one
    > available on the web.
    >
    > Regards,
    > Daniel Sadoc


    Hi Daniel,

    The XResizeWindow subroutine allows a window to be resized. However, it
    states in its definition that it requires a Window id as a parameter.
    If I give it a Pixmap id, then it returns a BadDrawable error. The
    XMoreResizeWindow subroutine is the same way.

    I am playing around with an X server extension that uses X pixmaps. If
    an X pixmap cannot be resized, then it is a complication that I don't
    have to deal with.

    Jim Lahue


  4. Re: Resizing pixmap drawables



    Jim Lahue wrote:
    >
    > Daniel Sadoc wrote:
    >
    > > Hi,
    > >
    > > In fact, I think that the X Windows System has one viewport per screen
    > > and not one viewport per window. Does anyone know why the X Windows
    > > System does not support one viewport per window - like, for instance,
    > > Opengl?
    > >
    > > Jim, have you found a function that is able to resize a window
    > > drawable? If you found it, why don't you use it? What is the
    > > function you are talking about?
    > >
    > > Regarding the resizing of the pixmaps, I think that you would have to
    > > implement your own routine to resize - or look for a public one
    > > available on the web.
    > >
    > > Regards,
    > > Daniel Sadoc

    >
    > Hi Daniel,
    >
    > The XResizeWindow subroutine allows a window to be resized. However, it
    > states in its definition that it requires a Window id as a parameter.
    > If I give it a Pixmap id, then it returns a BadDrawable error. The
    > XMoreResizeWindow subroutine is the same way.
    >
    > I am playing around with an X server extension that uses X pixmaps. If
    > an X pixmap cannot be resized, then it is a complication that I don't
    > have to deal with.
    >
    > Jim Lahue


    You cannot resize a pixmap.

    If you create a pixmap, then later need a larger area, you have to
    create a new pixmap of sufficient size. You can then copy the smaller
    pixmap into the new pixmap. However, this does not scale anything - you
    just get the original pixmap with some additional empty (or randomly
    filled) area. Scaling the picture (blowing it up or shrinking it) is a
    completely different matter. Look at the source code for xv - it is not
    a trivial feat.

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225

  5. Re: Resizing pixmap drawables

    Fred L. Kleinschmidt wrote:
    >


    > You cannot resize a pixmap.
    >
    > If you create a pixmap, then later need a larger area, you have to
    > create a new pixmap of sufficient size. You can then copy the smaller
    > pixmap into the new pixmap. However, this does not scale anything - you
    > just get the original pixmap with some additional empty (or randomly
    > filled) area. Scaling the picture (blowing it up or shrinking it) is a
    > completely different matter. Look at the source code for xv - it is not
    > a trivial feat.
    >


    That's what I figured since I couldn't find any protocol that seemed to
    allow it. It's just one less problem area that I have to worry about.

    Thanks.

    Jim Lahue

+ Reply to Thread