HACKING xpm.el (et al) -*- org -*- This file is both a guide for newcomers and a todo list for oldstayers. * ideas / wishlist *** lacunae (sigh) (defun xpm-as-rectangle () (xpm--w/gg (w h cpp origin y-mult) (xpm--gate) (extract-rectangle origin (+ origin (* y-mult (1- h)) (* w cpp))))) (defun xpm-from-rectangle (rect) (xpm--w/gg (w h cpp origin y-mult) (xpm--gate) (assert (= h (length rect))) (assert (= (* w cpp) (length (car rect)))) (goto-char origin) (delete-rectangle origin (+ origin (* y-mult (1- h)) (* w cpp))) (insert-rectangle rect))) (defun xpm-replace-from (buffer) (xpm-from-rectangle (with-current-buffer buffer (xpm-as-rectangle)))) *** add xpm-mode for interactive use -- [[file:xpm-ui.el][xpm-ui.el]] ***** hide/show header lines ***** palette ******* hide/show ******* display each PX in associated color (loses for ‘s’-only) ******* display as table (conserve vertical space) ******* add state "current px", commands to set it ***** hide/show sides *** composition facilities -- [[file:xpm-compose.el][xpm-compose.el]] ***** multilevel congruence ******* dimensions only ******* palette not None ******* palette subset ******* full palette ***** destructive (2-op) vs non-destructive (3-op) ***** customizable pixel-compose fn *** misc functionality ***** validate palette-data correspondance ***** import from rectangle ******* as-is (dangerous) ******* w/ char-to-px quantization *** perf ***** ??? use ‘binary’ coding system ***** make ‘xpm-raster’ do [vh]-line expansion * etc #+odd Copyright (C) 2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved.