Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Win32 BitBlt -> Xwindows ?

    Hi All,

    I have sample code that purports to render on a Windows platform -- I need to convert the rendering to an Linux platform. I presume that XWindows is the right way to go, but if I am wrong, please a quick whack upside the head would be appreciated.

    I'm a bit of newbie on both fronts -- I usually do embedded code -- so please forgive if applicable.

    The sample code contains a call to ::BitBlt( ... ) -- is there a direct mapping between that and Xwindow calls? From what I have been able to glean is that XCopyArea is probably close to the same as BitBlt, but what is a Drawable ?

    Also, I'm not sure how to convert the DCs to GC, Display, etc. Sorry to be so vague, but if there is an easy way, I'd love to know about it!



  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008

    XLib (the programming interface to XWindow) is very low level and therefore it is somewhat sophisticated to work with. I recommend the book "XLib Programming Manual" by Nye. There are also some older HTML/PDF versions of it around.
    It introduces and explains all these things quite well.

    GC is quite the same as a WinAPI DC.
    "Display" is a handle of a connection to an X server. Think of it as a graphics card.
    "Screen" means what it say. A graphics card may have two or more VGA ports, on each of them is connected a different monitor. Each displaying a different screen.

    A "drawable" is something you can paint or write text on. The inner area of a window is a typical drawable. But you can also have non-visible drawables in memory. You can paint on it until you are done, then you do a fast copy of it to a visible drawable.
    Debian GNU/Linux -- You know you want it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts