Draw an image on the pane (or ancestor which as been cleared).
- str1 identifies the images, either "file:FILENAME" or "comm:COMMAND".
- If "comm:" the command is run with 'str2' passed as arg 'str1', and
- result should be returned as 'bytes' (comm2 called with ->str1 as
- array of bytes, ->num1 as length).
+ If "comm:" the command is run and result should be returned as 'bytes'
+ (comm2 called with ->str1 as array of bytes, ->num1 as length).
- num is the 'or' of the following bit flags:
- 16 stretch image to exactly fit pane. If set, lower bits are ignored.
Otherwise image will fill the pane in one dimension, and be positioning
} else if (strstarts(ci->str, "comm:")) {
struct call_return cr;
wd = NewMagickWand();
- cr = call_ret(bytes, ci->str+5, ci->focus, 0, NULL, ci->str2);
+ cr = call_ret(bytes, ci->str+5, ci->focus);
if (!cr.s) {
DestroyMagickWand(wd);
return Efail;
} else if (strstarts(ci->str, "comm:")) {
struct call_return cr;
wd = NewMagickWand();
- cr = call_ret(bytes, ci->str+5, ci->focus, 0, NULL, ci->str2);
+ cr = call_ret(bytes, ci->str+5, ci->focus);
if (!cr.s) {
DestroyMagickWand(wd);
return Efail;
} else if (strstarts(ci->str, "comm:")) {
struct call_return cr;
wd = NewMagickWand();
- cr = call_ret(bytes, ci->str+5, ci->focus, 0, NULL, ci->str2);
+ cr = call_ret(bytes, ci->str+5, ci->focus);
if (!cr.s) {
DestroyMagickWand(wd);
return Efail;
} else if (strstarts(ci->str, "comm:")) {
struct call_return cr;
wd = NewMagickWand();
- cr = call_ret(bytes, ci->str+5, ci->focus, 0, NULL, ci->str2);
+ cr = call_ret(bytes, ci->str+5, ci->focus);
if (!cr.s) {
DestroyMagickWand(wd);
return Efail;
return True
- def handle_image(self, key, num, focus, str, str2, xy, **a):
+ def handle_image(self, key, num, focus, str, xy, **a):
"handle:Draw:image"
self.damaged(edlib.DAMAGED_POSTORDER)
# 'str' identifies the image. Options are:
if str.startswith("file:"):
pb = GdkPixbuf.Pixbuf.new_from_file(str[5:])
elif str.startswith("comm:"):
- img = focus.call(str[5:], str2, ret='bytes')
+ img = focus.call(str[5:], ret='bytes')
io = Gio.MemoryInputStream.new_from_data(img)
pb = GdkPixbuf.Pixbuf.new_from_stream(io)
else:
cr.stroke()
return True
- def handle_image_size(self, key, focus, str1, str2, comm2, **a):
+ def handle_image_size(self, key, focus, str1, comm2, **a):
"handle:Draw:image-size"
if not str1 or not comm2:
return edlib.Enoarg
if str1.startswith("file:"):
pb = GdkPixbuf.Pixbuf.new_from_file(str1[5:])
elif str1.startswith("comm:"):
- img = focus.call(str1[5:], str2, ret='bytes')
+ img = focus.call(str1[5:], ret='bytes')
io = Gio.MemoryInputStream.new_from_data(img)
pb = GdkPixbuf.Pixbuf.new_from_stream(io)
else: