WindowImageOp blank white rect?

Posted by Fiendish on Fri 19 Nov 2010 10:44 PM — 4 posts, 12,591 views.

USA Global Moderator #0
Trying to tile an image.

This works:

   if room.textimage ~= nil then
      local iwidth = WindowImageInfo(win,room.textimage,2)
      local iheight= WindowImageInfo(win,room.textimage,3)
      local x = 0
      local y = 0

      while y < config.WINDOW.height do
        x = 0
        while x < config.WINDOW.width do
           WindowDrawImage (win, room.textimage, x, y, 0, 0, 1)  -- straight copy
           x = x + iwidth
        end
        y = y + iheight
      end
end

This does not:

      WindowImageOp(win, miniwin.image_fill_rectangle, 0,0,0,0, 0x000000, miniwin.pen_null, 1, 0x000000, room.textimage)
All I get is a blank white rectangle. Is that Wine screwing with me again?
Amended on Fri 19 Nov 2010 10:45 PM by Fiendish
Australia Forum Administrator #1
Possibly. A test, but not with your file (whatever that was) seems to indicate it works under XP.

The function uses CreatePatternBrush which conceivably doesn't work properly under Wine. A Google for that leads to inconclusive results. Perhaps your technique of manually tiling will have to do. It seems fast enough anyway.
Australia Forum Administrator #2
Testing under my copy of Wine with my test image, worked however.
Australia Forum Administrator #3
A few more rather strange tests seem to show that it is dependent on the image file. You seem to be using 8-bit images, the ones that work are 24 or 32-bit images. Try resaving using some sort of image manipulation program, and you might get it to work.