Results 1 to 11 of 11

Thread: [RESOLVED] GDI+ problems with GdipDrawImageRectRectI

Hybrid View

  1. #1
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: GDI+ problems with GdipDrawImageRectRectI

    The first takes 32-bit integers as input.
    The second takes 32-bit floats as input.
    Are you using Singles when you do the second call?
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: GDI+ problems with GdipDrawImageRectRectI

    Is that declaration correct?
    I've seen GdipDrawImageRectRectI for PowerBasic declared as follows:
    Code:
        DECLARE FUNCTION GdipDrawImageRectRectI ( _
            BYVAL graphics AS DWORD, _
            BYVAL pImage AS DWORD, _
            BYVAL dstx AS LONG, _
            BYVAL dsty AS LONG, _
            BYVAL dstwidth AS LONG, _
            BYVAL dstheight AS LONG, _
            BYVAL srcx AS LONG, _
            BYVAL srcy AS LONG, _
            BYVAL srcwidth AS LONG, _
            BYVAL srcheight AS LONG, _
            BYVAL srcUnit AS LONG, _
            BYVAL imageAttributes AS DWORD, _
            BYVAL pcallback AS DWORD, _
            BYVAL callbackData AS DWORD _
        ) AS LONG
    I would assume there could be a similar declaration for a VB6 version. I haven't used Gdip... with vb6, so my only real experience with GDI+ is with the wrapped versions of the calls as part of .Net.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  3. #3

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    203

    Re: GDI+ problems with GdipDrawImageRectRectI

    Quote Originally Posted by passel View Post
    The first takes 32-bit integers as input.
    The second takes 32-bit floats as input.
    Are you using Singles when you do the second call?

    Yes! That was the problem!!!
    The weird part is I fixed it calling GdipDrawImageRect (wich require singles) and passing long values... After your suggestion I fixed my declarations to long (the one I copied where from another example and not the ones I was using) and put back GdipDrawImageRectI

Tags for this Thread

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