Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / help copy&paste images

Author
Message
dark creator
15
Years of Service
User Offline
Joined: 25th Jul 2009
Location:
Posted: 25th Jul 2009 17:41
hi, im making a paint program with dark gdk. i didnt find a function for copying and pasting bitmaps. like how u can copy text to the clipboard with dbWriteToClipboard, i want to do the same only with bitmaps. if theres no such function in dark gdk and u know how to do that in c++, then plz do tell.

thanks, hope i made it clear enough
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 25th Jul 2009 20:38
void dbMakeMemblockFromBitmap ( int MemblockNumber, int BitmapNumber )

and (more directly)

void dbMakeBitmapFromMemblock ( int BitmapNumber, int MemblockNumber )

or

void dbCopyBitmap ( int iFrom, int iTo )

and

void dbCopyBitmap ( int iFrom, int iLeft, int iTop, int iRight, int iBottom, int iTo, int iLeft, int iTop, int iRight, int iBottom )


But you'll need to do a bit of setup. The memblock and the bitmaps must both previously exist and most likely need to be set up with the right sizes. Otherwise, following is a Bitmap class I wrote to take care of some of this but really just encapsulates these the bitmap functions into a class.

bitmap.h





bitmap.cpp



Lilith, Night Butterfly
I'm not a programmer but I play one in the office
dark creator
15
Years of Service
User Offline
Joined: 25th Jul 2009
Location:
Posted: 28th Jul 2009 03:23
I probably didnt make it clear enough to understand. Im not sure what are the memblocks functions, but I dont think that what I need.

you know how in paint you can click on the edit menu and then click copy. then you can go to other paint programs and click paste, and the image shows up. that what Im missing in my paint program.


thanks, I appreciate it

Login to post a reply

Server time is: 2024-10-01 08:42:28
Your offset time is: 2024-10-01 08:42:28