## Comments

• #### What is the GDI+ equivalent?

Posted by Legacy on 03/16/2003 12:00am

Originally posted by: philip chang

What would the code be to do the same rotate function using GDI+?

Reply
• #### Large surface

Posted by Legacy on 12/06/2002 12:00am

Originally posted by: Frederic Baissac

This article is great because it show a new method to draw points in a device context. But the GetDIBits() function does not perform as well as I wish is a large surface like a full screen. It takes about 750ms to create a DIB for a 1280x1024 resolution (PIII 450, 256Mo), and 200 ms to set a DIB.

Thanks for the tips.

Reply
• #### Rocket-Science formula???!!!

Posted by Legacy on 11/28/2002 12:00am

Originally posted by: Xeon

This is crazy! Yves! U must be a part-time rocket scientist or something! That formula you gave is @#\$^^+(^!~@#!!!!!!!!

I hope u don't eat rocket-science tutorials or human-cloning textbooks for world-renowed lecturers. This is really freaking me out! :-O:-O:-O:-O:-O:-O

Reply
• #### Good Job, Thanks..And to reduce more time..

Posted by Legacy on 11/22/2002 12:00am

Originally posted by: Y.J Kim

Nice work..

I have one suggestion.
Change
dst = MyGetDibBits(hdcDst, hBmpDst, dstX, dstY);
into
dst = (pBGR) malloc(dstX * 4 * dstY);

I run your demo project in 1.8GHz P4 CPU and Matrox G400 Graphic card.

In your function RotateMemoryDC(...), two major high-load operations occur.
The higher one is calling MyGetDibBits(...) and the lower one is for (stepY = 0; stepY < dstY; stepY++) {...} loop.

Calling MyGetDibBits(...) takes about 17~20 ms.
for (stepY = 0; stepY < dstY; stepY++) {...} loop takes about 5ms.

In your code,
...
src = MyGetDibBits(hdcSrc, hBmpSrc, SrcX, SrcY);
dst = MyGetDibBits(hdcDst, hBmpDst, dstX, dstY);
...

dst = MyGetDibBits(hdcDst, hBmpDst, dstX, dstY);
may be not needed.
Just changing it into
dst = (pBGR) malloc(dstX * 4 * dstY);
reduces operating time.

Reply
• #### I dont know if this is the intent but...

Posted by Legacy on 11/19/2002 12:00am

Originally posted by: Amn

Obviously you are reading the contents of the bitmap right off the client DC, where it is blitted. Well, thats why the visual part of the About dialog is taken with the rotation as well as it is a child of your main window and hence is drawn on the parent when invoked. Its s funny effect though, i ve never seen rotating windows :)

We say its not a bug, it s a FEATURE ! :D

Reply
• #### Great insight, thanks

Posted by Legacy on 11/19/2002 12:00am

Originally posted by: Amn

Nice work Yves !

I ve got a strange bug though. It appears that part of the memory yur bitmap occupies is somehow (!!!) shared with the about dialog box. They seem to overlap or something.
The error comes obvious when i display the about dialog box, while rotation is in progress - then i see a chunk of the dialog rotating right there with the gradient image.
I havent seen more into that, just telling you this.

Reply
• Loading, Please Wait ...