PageRenderTime 22ms CodeModel.GetById 14ms app.highlight 6ms RepoModel.GetById 0ms app.codeStats 0ms

/GUI/Win32/ImageBases.py

https://bitbucket.org/alsh/pygui-mirror
Python | 21 lines | 8 code | 6 blank | 7 comment | 0 complexity | 9ae3e15fa01b21be6fc9015b35a23244 MD5 | raw file
 1#--------------------------------------------------------------------
 2#
 3#   PyGUI - ImageBase - Win32
 4#
 5#--------------------------------------------------------------------
 6
 7from GImageBases import ImageBase as GImageBase
 8
 9#--------------------------------------------------------------------
10
11class ImageBase(GImageBase):
12    #  _win_image   GdiPlus.Image
13    
14    def get_width(self):
15        return self._win_image.GetWidth()
16
17    def get_height(self):
18        return self._win_image.GetHeight()
19
20    def draw(self, canvas, src_rect, dst_rect):
21        canvas._win_graphics.DrawImage_rr(self._win_image, dst_rect, src_rect)