diff options
author | manojgudi | 2014-03-02 14:40:58 +0530 |
---|---|---|
committer | manojgudi | 2014-03-02 14:40:58 +0530 |
commit | 760b0acda722de34e830dc9b02cf78a695d001c5 (patch) | |
tree | 1804250ace4c0e8eb317ab93ada6a52431b09289 /grc/gui/Element.py | |
parent | 6d931ce782f0b3229742268eb0d1d323937a052c (diff) | |
download | gnuradio-760b0acda722de34e830dc9b02cf78a695d001c5.tar.gz gnuradio-760b0acda722de34e830dc9b02cf78a695d001c5.tar.bz2 gnuradio-760b0acda722de34e830dc9b02cf78a695d001c5.zip |
Changed API to accomodate <image> tag in grc file of the block
Ex: <image>/home/manoj/Pictures/new.jpg</image>
Diffstat (limited to 'grc/gui/Element.py')
-rw-r--r-- | grc/gui/Element.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/grc/gui/Element.py b/grc/gui/Element.py index 43c7d15a8..6e79fd9f6 100644 --- a/grc/gui/Element.py +++ b/grc/gui/Element.py @@ -91,6 +91,7 @@ class Element(object): gc.set_foreground(border_color) window.draw_line(gc, X+x1, Y+y1, X+x2, Y+y2) + # Function which draws the image def draw_image(self, gc, window, border_color, bg_color, pixbuf): """ Draw in the given window. @@ -103,10 +104,11 @@ class Element(object): for (rX,rY),(W,H) in self._areas_list: aX = X + rX aY = Y + rY - - window.draw_pixbuf(None, pixbuf, 0,0, X,Y) + + # Needs Tweaking + window.draw_pixbuf(None, pixbuf, 0,0, aX, aY, -1, -1) # (gc, pixbuf, src_x, src_y, dest_x, dest_y, W, H) #window.draw_rectangle(gc, True, aX, aY, W, H) - #gc.set_foreground(border_color) + gc.set_foreground(border_color) #window.draw_rectangle(gc, False, aX, aY, W, H) for (x1, y1),(x2, y2) in self._lines_list: |