Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. About Graphics::RotateTransform()????

About Graphics::RotateTransform()????

Scheduled Pinned Locked Moved C / C++ / MFC
helpgraphicstutorialquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TooShy2Talk
    wrote on last edited by
    #1

    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.

    C 1 Reply Last reply
    0
    • T TooShy2Talk

      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.

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Well, I guess DrawImage should follow RotateTransform 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]

      T 1 Reply Last reply
      0
      • C CPallini

        Well, I guess DrawImage should follow RotateTransform 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]

        T Offline
        T Offline
        TooShy2Talk
        wrote on last edited by
        #3

        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.

        S 1 Reply Last reply
        0
        • T TooShy2Talk

          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.

          S Offline
          S Offline
          SandipG
          wrote on last edited by
          #4

          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.

          T 1 Reply Last reply
          0
          • S SandipG

            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.

            T Offline
            T Offline
            TooShy2Talk
            wrote on last edited by
            #5

            Thanks for the reply. I look at MSDN and I haven't found a constructor for bitmap. Is there any?

            S 1 Reply Last reply
            0
            • T TooShy2Talk

              Thanks for the reply. I look at MSDN and I haven't found a constructor for bitmap. Is there any?

              S Offline
              S Offline
              SandipG
              wrote on last edited by
              #6

              check this http://msdn.microsoft.com/en-us/library/ms535632(VS.85).aspx

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups