About Graphics::RotateTransform()????
-
Hi, Is it possible to use RotateTransform() after Graphics::DrawImage()? Ex. Graphics g(hMemDC); for(){ for(){ ..... g.DrawImage(); } } g.RotateTransform(); Based from MSDN example RotateTransform is before DrawImage() function but I have tried the above code (6 months ago) and it works. But now this code doesn't work anymore. Image doesn't rotating anymore. My code is for stitching tiles of an image to make it whole. When I place RotateTransform() before DrawImage() it produces black dash lines in between tiles. It's been a solution to place RotateTrasform after DrawImage but now I can't make it work. What seems to be the problem? Do I have to add some more code? Hope somebody can help me. Thanks.
-
Hi, Is it possible to use RotateTransform() after Graphics::DrawImage()? Ex. Graphics g(hMemDC); for(){ for(){ ..... g.DrawImage(); } } g.RotateTransform(); Based from MSDN example RotateTransform is before DrawImage() function but I have tried the above code (6 months ago) and it works. But now this code doesn't work anymore. Image doesn't rotating anymore. My code is for stitching tiles of an image to make it whole. When I place RotateTransform() before DrawImage() it produces black dash lines in between tiles. It's been a solution to place RotateTrasform after DrawImage but now I can't make it work. What seems to be the problem? Do I have to add some more code? Hope somebody can help me. Thanks.
Well, I guess
DrawImage
should followRotateTransform
and not the opposite. If you got undesidered lines, probably there's something wrong in your parameters. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Well, I guess
DrawImage
should followRotateTransform
and not the opposite. If you got undesidered lines, probably there's something wrong in your parameters. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Thanks for the reply. Placing DrawImage after RotateTransform somewhat rotate my image tiles before stitching them. What I wanted is to stitch all first then rotate. Is there any other way to do this.
-
Thanks for the reply. Placing DrawImage after RotateTransform somewhat rotate my image tiles before stitching them. What I wanted is to stitch all first then rotate. Is there any other way to do this.
-
Why dont you create a stitched bitmap first and then draw this bitmap on device context. i mean Graphics gr(bmpTemp) .... Stitching code. Graphics gr(hDC) RatateTransform()... DrawImage(bmpTemp).. Does it make sense??
Regards, Sandip.
Thanks for the reply. I look at MSDN and I haven't found a constructor for bitmap. Is there any?
-
Thanks for the reply. I look at MSDN and I haven't found a constructor for bitmap. Is there any?