Click here to Skip to main content
15,898,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: log10 usage [modified] Pin
Rajkumar R12-Mar-08 20:15
Rajkumar R12-Mar-08 20:15 
GeneralRe: log10 usage Pin
CPallini12-Mar-08 22:10
mveCPallini12-Mar-08 22:10 
GeneralRe: log10 usage Pin
rp_suman13-Mar-08 16:57
rp_suman13-Mar-08 16:57 
GeneralEmail Preview Pin
Priya_Sundar12-Mar-08 18:10
Priya_Sundar12-Mar-08 18:10 
GeneralRe: Email Preview Pin
Rajkumar R12-Mar-08 22:01
Rajkumar R12-Mar-08 22:01 
GeneralRe: Email Preview [modified] Pin
Priya_Sundar12-Mar-08 22:12
Priya_Sundar12-Mar-08 22:12 
QuestionImage rotation using RotateTransform()???? Pin
TooShy2Talk12-Mar-08 17:34
TooShy2Talk12-Mar-08 17:34 
AnswerRe: Image rotation using RotateTransform()???? Pin
Mark Salsbery12-Mar-08 18:26
Mark Salsbery12-Mar-08 18:26 
You could use Graphics::TranslateTransform() to shift the image vertically and/or horizontally.

Note that the order you set transforms with matrixes is important...
Here's some reference material:  Transformations (GDI+)[^]

FWIW, Here's an example (I've posted here before) which rotates an image around its center point, like a propeller...

    Gdiplus::Bitmap SrcBitmap(L"C:\\test.tif", FALSE);
    
    Graphics DstGraphics(*this);

    REAL angle = 0.0f;
    for (int i = 0; i < 1440; ++i)
    {
        DstGraphics.ResetTransform();
        DstGraphics.RotateTransform(angle);
        DstGraphics.TranslateTransform(SrcBitmap.GetWidth() / 2.0f, SrcBitmap.GetHeight() / 2.0f, MatrixOrderAppend);
        DstGraphics.DrawImage(&SrcBitmap, -((INT)SrcBitmap.GetWidth() / 2), -((INT)SrcBitmap.GetHeight() / 2), SrcBitmap.GetWidth(), SrcBitmap.GetHeight());

        angle += 0.5f;

        // Use this to slow it down :)
//        ::Sleep(10);
    }

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Image rotation using RotateTransform()???? Pin
TooShy2Talk12-Mar-08 19:08
TooShy2Talk12-Mar-08 19:08 
QuestionRe: Image rotation using RotateTransform()???? Pin
TooShy2Talk12-Mar-08 19:53
TooShy2Talk12-Mar-08 19:53 
AnswerRe: Image rotation using RotateTransform()???? Pin
Rajkumar R12-Mar-08 21:05
Rajkumar R12-Mar-08 21:05 
GeneralRe: Image rotation using RotateTransform()???? Pin
TooShy2Talk12-Mar-08 22:26
TooShy2Talk12-Mar-08 22:26 
GeneralRe: Image rotation using RotateTransform()???? Pin
Mark Salsbery13-Mar-08 6:34
Mark Salsbery13-Mar-08 6:34 
QuestionThread Response Time Pin
jonsey2984712-Mar-08 17:15
jonsey2984712-Mar-08 17:15 
GeneralRe: Thread Response Time Pin
krmed13-Mar-08 1:59
krmed13-Mar-08 1:59 
GeneralRe: Thread Response Time Pin
jonsey2984713-Mar-08 12:20
jonsey2984713-Mar-08 12:20 
QuestionRe: Thread Response Time Pin
David Crow13-Mar-08 2:24
David Crow13-Mar-08 2:24 
GeneralRe: Thread Response Time Pin
jonsey2984713-Mar-08 12:30
jonsey2984713-Mar-08 12:30 
QuestionRe: Thread Response Time Pin
David Crow14-Mar-08 2:39
David Crow14-Mar-08 2:39 
AnswerRe: Thread Response Time Pin
jonsey2984718-Mar-08 4:30
jonsey2984718-Mar-08 4:30 
Generalopaque pointer Pin
George_George12-Mar-08 16:36
George_George12-Mar-08 16:36 
GeneralRe: opaque pointer Pin
Maxwell Chen12-Mar-08 18:30
Maxwell Chen12-Mar-08 18:30 
GeneralRe: opaque pointer Pin
George_George12-Mar-08 18:35
George_George12-Mar-08 18:35 
GeneralRe: opaque pointer Pin
Maxwell Chen12-Mar-08 18:42
Maxwell Chen12-Mar-08 18:42 
GeneralRe: opaque pointer Pin
George_George12-Mar-08 18:49
George_George12-Mar-08 18:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.