From: Kevin A. <ka...@us...> - 2004-08-11 01:58:11
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17941/components Modified Files: image.py imagebutton.py Log Message: updated file and size attribute handling to support resourceEditor Index: imagebutton.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/imagebutton.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** imagebutton.py 19 Jul 2004 17:47:39 -0000 1.18 --- imagebutton.py 11 Aug 2004 01:58:03 -0000 1.19 *************** *** 47,57 **** # is aResource used again later? #print aResource.size ! x = aResource.size[0] ! if x == -2: ! x = self._bitmap.getWidth() ! y = aResource.size[1] ! if y == -2: ! y = self._bitmap.getHeight() ! size = (x, y) # KEA need to check all possible variations on Win32 and Linux --- 47,58 ---- # is aResource used again later? #print aResource.size ! self._size = tuple(aResource.size) ! w = aResource.size[0] ! if w == -2: ! w = self._bitmap.getWidth() ! h = aResource.size[1] ! if h == -2: ! h = self._bitmap.getHeight() ! size = (w, h) # KEA need to check all possible variations on Win32 and Linux Index: image.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/image.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** image.py 21 Jul 2004 20:24:08 -0000 1.23 --- image.py 11 Aug 2004 01:58:03 -0000 1.24 *************** *** 39,53 **** _spec = ImageSpec() ! def __init__( self, aParent, aResource ) : self._bitmap = graphic.Bitmap(aResource.file, aResource.size) self._file = aResource.file ! x = aResource.size[0] ! if x == -2: ! x = self._bitmap.getWidth() ! y = aResource.size[1] ! if y == -2: ! y = self._bitmap.getHeight() ! size = (x, y) #size = wx.Size( self._bitmap.GetWidth(), self._bitmap.GetHeight() ) --- 39,54 ---- _spec = ImageSpec() ! def __init__(self, aParent, aResource): self._bitmap = graphic.Bitmap(aResource.file, aResource.size) self._file = aResource.file ! self._size = tuple(aResource.size) ! w = aResource.size[0] ! if w == -2: ! w = self._bitmap.getWidth() ! h = aResource.size[1] ! if h == -2: ! h = self._bitmap.getHeight() ! size = (w, h) #size = wx.Size( self._bitmap.GetWidth(), self._bitmap.GetHeight() ) *************** *** 103,114 **** # KEA special handling for -2 size option ! def _setSize( self, aSize ): ! x = aSize[0] ! if x == -2: ! x = self._bitmap.getWidth() ! y = aSize[1] ! if y == -2: ! y = self._bitmap.getHeight() ! self.SetSize( ( x, y ) ) # KEA 2001-08-02 --- 104,116 ---- # KEA special handling for -2 size option ! def _setSize(self, aSize): ! self._size = tuple(aSize) ! w = aSize[0] ! if w == -2: ! w = self._bitmap.getWidth() ! h = aSize[1] ! if h == -2: ! h = self._bitmap.getHeight() ! self.SetSize((w, h)) # KEA 2001-08-02 |