Results 1 to 5 of 5

Thread: RotateFlip()

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    22

    RotateFlip()

    Hi

    I get the following exception when I try to RotateFlip(RotateFlipType.Rotate180FlipX) my System.Drawing.Imaging.Metafile

    Code:
    An unhandled exception of type 'System.NotImplementedException' occurred in system.drawing.dll
    
    Additional information: Not implemented.
    this is the code
    Code:
            Dim pic As New System.Drawing.Bitmap(500, 500, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
            Dim gr As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(pic)
    
            Dim hDC As IntPtr = gr.GetHdc()
            Dim m As System.Drawing.Imaging.Metafile = New System.Drawing.Imaging.Metafile(strPicName & "." & strPicFormat, hDC)
    
            gr.DrawLine(Pens.Blue, 10, 10, 100, 100)
            m.RotateFlip(RotateFlipType.Rotate180FlipX)
    If it's not implemented... why the #&¤% is it in the framework?!?

    it works fine to rotate the System.Drawing.Bitmap?

    does anyone have a solution to this?

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    if you are looking for a way to rotate a picture look at this thread
    http://www.vbforums.com/showthread.p...readid=223859&
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    22
    thanks lunatic but I really need to flip it as well...

    again it works with Bitmap but not with Metafile

  4. #4
    Lively Member formulav8's Avatar
    Join Date
    Mar 2002
    Location
    Orlando
    Posts
    116
    Here is a example I made that is on my website. Just change the flip/rotate type to whatever you want to do.


    The download link

  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    as a note, their is alot that does not work like it should in System.Drawing. MS doesnt seem to keen on fixing it either.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width