[quote=200028:@Marc Couraud]Windows 7 - Xojo 2015 v2.1
Both pictures are rhombuses, with the same Width and Height
–> the second picture erases a rectangle (the rectangle within which the rhombus is) above the first, when they should be printed edge to edge
On MacOS, printing is correct
I’ve tried to UseGDIplus, it’s the same
Dim g As Graphics
g = OpenPrinterDialog
If g <> Nil Then
g.DrawPicture(SGH05,20,20,100,100,0,0,SGH05.Width, SGH05.Height)
g.DrawPicture(SGH08,80,80,100,100,0,0,SGH08.Width, SGH08.Height)
End If
[/quote]
OK. I just tried your code with the two pictures you posted with an HP Envy 100 printer, as well as Windows XPS Printer, and Windows 10 Microsoft Print to PDF. As expected, SGH05 prints above and on the left of SGH08. No issue whatsoever on the three printers. Both pictures print perfectly.
It is possible the issue you encounter is due to the particular printer you are using.
You could work around the issue by creating a larger picture that contains both, and print that picture.
Dim g As Graphics
g = OpenPrinterDialog
If g <> Nil Then
dim GDI as boolean = App.UseGDIPlus
App.UseGDIPlus = True // Necessary to create an alpha channel picture
dim printerpic as new Picture(350,350)
Printerpic.graphics.DrawPicture(SGH05,20,20,100,100,0,0,SGH05.Width, SGH05.Height)
Printerpic.graphics.DrawPicture(SGH08,80,80,100,100,0,0,SGH08.Width, SGH08.Height)
g.DrawPicture(printerpic,0,0)
App.UseGDIPlus = GDI // Restore the original state of UseGDIPlus
End If