[Gambas-user] Issue 29 in gambas: Draw then DrawAlpha with imlib component produces error

gambas at ...2524... gambas at ...2524...
Sat Feb 12 00:36:18 CET 2011


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 29 by kevinfis... at ...1887...: Draw then DrawAlpha with  
imlib component produces error
http://code.google.com/p/gambas/issues/detail?id=29

This code (project attached):

   Dim image1 As Image = New Image(128, 128, 0, 0)
   Dim image2 As Image = New Image(128, 128, 0, 0)
   Dim image3 As Image = New Image(128, 128, 0, 0)

   image1.Draw(image2, 0, 0)
   image1.DrawAlpha(image3, 0, 0)

produces the following runtime error:

"The source image and the destination image must have the same format"

The error does not occur when the order of the two draw statements is  
reversed. The problem still occurs when the images are loaded from file  
rather than explicitly created. Checking the properties of the two images  
shows identical results as far as I can tell.

Here's where things get really strange. If I open the property window for  
image1 (double-click the variable name) and step-execute (F8) the  
line "image1.Draw(image2, 0, 0)" it raises signal 11.

If I step-execute up to the last line, open the property window for image1,  
then step-execute the last line the DrawAlpha statement actually works...no  
error message at all. It's almost like just bringing up the property window  
modifies image1 such that DrawAlpha under imlib is made happy and doesn't  
throw the error.

Version: gb3/TRUNK
Operating system: Ubuntu 10.10 ia64
GUI component: GTK+
Desktop used: Gnome


Attachments:
	gb3_test.tar.bz2  5.6 KB





More information about the User mailing list