1. Win32lib Pixmap

Is it possible to get the address of a win32lib Pixmap
so that I can draw straight to the memory with poke(), or machine code?

Or is there a way that I can allocate a block of memory and then draw that
block to the window?

Also, does anyone know how to use directX or where to get some documentation
on it?

Thanks,
    Mark.

new topic     » topic index » view message » categorize

2. Re: Win32lib Pixmap

Mark wrote:

> Is it possible to get the address of a win32lib
> Pixmap so that I can draw straight to the memory
> with poke(), or machine code?

A Pixmap is actually a handle to a Win32 DIB (device independant bitmap). So
you already have the address.

> Or is there a way that I can allocate a block of memory
> and then draw that block to the window?

The function createDIB does exactly that - it creates 2, 16 or 256 bit color
bitmaps from data.

Hope this helps!

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win32lib Pixmap

>> Or is there a way that I can allocate a block of memory
>> and then draw that block to the window?
>
>The function createDIB does exactly that - it creates 2, 16 or 256 bit
color
>bitmaps from data.
>
>Hope this helps!
>
>-- David Cuny

I can't figure out where to look for the actual address to write to. Can you
help me out? I assume that I have to use another routine to actualy get the
DIB to show up in the window, is that correct?

-mark

new topic     » goto parent     » topic index » view message » categorize

4. Re: Win32lib Pixmap

Mark wrote:

> I can't figure out where to look for the actual address
> to write to.


It would help if you had a good Win32 programming text; I *think* the latest
Petzold book goes into DIBs in mind-numbing detail.

You should also have the Win32 Programmer's Reference, which is available
through a link on the RDS site.

The GetObject function can be used to obtain a filled-in DIBSECTION, which
contains the header information of the DIB. The first chunk of information
is a BITMAP section, which contains a pointer to the bits. You can also use
the GetDIBits/SetDIBits function to get and set bits.

> I assume that I have  to use another routine to actually
> get the DIB to show  up in the window, is that correct?

The Win32Lib function drawBitmap is used, which does a lot of setup, and
then calls BitBlt to display the DIB.

Hope this helps! Coding the bitmap stuff was one of the most difficult parts
of Win32Lib.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu