From c2769c9aeddaa92292de2c1b0e4b239082545810 Mon Sep 17 00:00:00 2001 From: Fredrick Brennan Date: Wed, 8 Jan 2020 20:08:01 +0800 Subject: [PATCH] Add --z-index to icat kitten Meow. --- kittens/icat/main.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/kittens/icat/main.py b/kittens/icat/main.py index f7fc67bd1..13a627a7d 100755 --- a/kittens/icat/main.py +++ b/kittens/icat/main.py @@ -93,6 +93,12 @@ but you can turn it off or on explicitly, if needed. --silent type=bool-set Do not print out anything to stdout during operation. + + +--z-index +type=int +default=0 +Z index of image; if negative, text will be output on top. ''' @@ -182,8 +188,8 @@ def write_chunked(cmd, data): cmd.clear() -def show(outfile, width, height, fmt, transmit_mode='t', align='center', place=None): - cmd = {'a': 'T', 'f': fmt, 's': width, 'v': height} +def show(outfile, width, height, zindex, fmt, transmit_mode='t', align='center', place=None): + cmd = {'a': 'T', 'f': fmt, 's': width, 'v': height, 'z': zindex} if place: set_cursor_for_place(place, cmd, width, height, align) else: @@ -219,7 +225,7 @@ def process(path, args, is_tempfile): fmt = 24 if m.mode == 'rgb' else 32 transmit_mode = 't' outfile, width, height = convert(path, m, available_width, available_height, args.scale_up) - show(outfile, width, height, fmt, transmit_mode, align=args.align, place=args.place) + show(outfile, width, height, args.z_index, fmt, transmit_mode, align=args.align, place=args.place) if not args.place: print() # ensure cursor is on a new line return file_removed