Canvas g.drawpicture looking weird under WIn7

I have been developing primarily on Mac OS so this is my first with compiling on Windows. I have noticed that my canvas.paint’s drawpicture is looking funky :slight_smile:

This works perfectly in OSX so I may be missing a Windows-esce tuning code.

Here is my code for the screen shot above.

Canvas.Paint

  g.PenHeight=1
  g.PenWidth=1
  g.ForeColor = &cFFFFFF
  g.FillRect(0,0,me.Width,me.Height)
  
  g.Transparency = 70
  g.ForeColor = &c000000
  g.DrawRect(-2,-1,me.Width+4,me.Height)
  g.Transparency = 0
  
  g.DrawPicture(ipsubnetting100x99,(Self.Width-ipsubnetting100x99.Width)/2,20)
  

Thank you in advance! :slight_smile:

OSX View of same code.

Looks kind of like the “compile on Mac, run on Windows” problem. Your images look perfect compiled on Windows. (I scraped them out of the sample you provided.)

Well then :slight_smile: It must be a Virtual Box driver issue potentially then since my Win7 is a VM. Thanks!!

I will also load Xojo within my Win VM just to ensure its not that problem :slight_smile: Thanks again.

Tim I have the same issue with compiling with Windows Xojo so it must be a Virtual Box issue. Can you verify that this looks proper if you have a minute?

Thanks!
https://www.dropbox.com/s/h68zhc70mo2n9v3/Windows.zip

Hi Mike,
It still looks like multiple images over top of each other as shown in your first post.

This is on an original Windows 8.1 Machine - no VM.

Weird. Thanks Eugene for checking.

IT has to be how I am saving my images. I just used the g.drawnoteicon and it worked fine under windows.

Hi Mike,

Just to test a theory, add a new canvas on the windows and draw a single photo to the canvas by placing the following code in the Paint event:

g.DrawPicture(Photo, 0,0, g.Width, g.Height, 0,0,Photo.Width, Photo. Height)

This works on my Windows 8.1 machine. I placed a png photo with a clear background (no colour) and added text to see if there would be multiple instances of the photograph. The simple Canvas worked as expected by showing one single photo with no overlap.

If this works on your machine then the code for drawing in the original canvas may be an issue. If you get the same result on the second Canvas, then it is likely a VM issue.

Just my $0.02 :slight_smile:

I can’t edit my previous post, and the Windows copy:paste issue happened again :frowning: … there is an additional space between the last Photo. and Height… please remove the space

Thanks Eugene I will try now.

Eugene yes I did happen with your idea above also. Must be a Virtual Box VM issue :slight_smile: Thanks again!

[quote=68636:@Mike Cotrone]Tim I have the same issue with compiling with Windows Xojo so it must be a Virtual Box issue. Can you verify that this looks proper if you have a minute?

Thanks!
https://www.dropbox.com/s/h68zhc70mo2n9v3/Windows.zip[/quote]
The compiled exe demonstrates the same problem.

So a simple image drawn in the canvas comes out wrong? Send me the image and I’ll try it on my machine. But it does sound like a mac → windows issue, even when run in a VM.

https://www.dropbox.com/s/b72873p8on8wf9i/ipsubnetting48x48.png

What sort of Mac do you have Mike ?
There is a known issue compiling on Haswell based Macs for Windows where the OS routine we use does this screwy banding
We filed a Radar with Apple about it but the temporary answer is to compile on the VM under Windows

a new MBP 15" Retina. 2.3 Ghz Intel i7.

Yeah
Compile under a VM running Windows for now
That banding is purely a bug in 10.9’s ImageIO BMP code

Looks great compiled on an actual windows 7 machine.

Did you compile it on the VM? Or just run it there?

Tim Both. I ran it after compiling it on mac. AND I also compiled it on the VM itself with Xojo Windows … Both same results for me.