NAME
simo.el - simple image manupulation object.
SYNOPSIS
(require 'simo)
(let* ((w 64)
(h 64)
(hw (/ w 2))
(hh (/ h 2))
(img (simo::new :width w :height h)))
(simo-fill-rect img 0 0 w h 0)
(simo-draw-line img 0 0 w hh 1)
(simo-draw-line img 0 0 w h 1)
(simo-draw-line img 0 0 hw h 1)
(simo-draw-line img w 0 0 hh 2)
(simo-draw-line img w 0 0 h 2)
(simo-draw-line img w 0 hw h 2)
(simo-draw-line img w h 0 hh 3)
(simo-draw-line img w h 0 0 3)
(simo-draw-line img w h hw 0 3)
(simo-draw-line img 0 h w hh 4)
(simo-draw-line img 0 h w 0 4)
(simo-draw-line img 0 h hw 0 4)
(simo-rect img 0 0 w h 7)
(let ((xpm (simo-to-xpm img)))
(insert xpm "\n")
(insert (simo::add-image-properties
xpm
:palette simo-alist-palette-16))
(insert (simo::add-image-properties
xpm
:palette (simo-palette::list-to-alist
(reverse simo-list-palette-16))))
(insert "\n")))
DESCRIPTION
"simo" provides simple manipulation method of images.
CLASS simo-palette
CONSTRUCTOR
- simo-palette::new
ATTRIBUTES
- :sym
- :full
- :mono
- :gray
- :g4
METHODS
- (simo-palette-xpm-line SIMO-PALETTE)
CLASS simo
CONSTRUCTOR
- (simo::new :width WIDTH :height HEIGHT)
-
Creates new simo object.
ATTRIBUTES
- :width simo-width
- :height simo-height
METHODS
- (simo-resize SIMO WIDTH HEIGHT &optional X Y)
- (simo-put-color SIMO X Y COLOR-NUM)
- (simo-get-color SIMO X Y)
- (simo-fill-rect SIMO X0 Y0 X1 Y1 COLOR-NUM)
- (simo-rect SIMO SIMO X0 Y0 X1 Y1 COLOR-NUM)
- (simo-draw-line SIMO X0 Y0 X1 Y1 COLOR-NUM)
- (simo-to-xpm SIMO &rest OPTIONS)
-
Creates xpm string from the SIMO object. This method accespts following options.
- :name
- :palette
- :full
- :mono
- :g4
- :gray
- (simo-string SIMO &rest options)
-
Crates string with properties for displays image.
This method accepts "simo-to-xpm" method options and following options.
- :string
- (simo-insert SIMO &rest options)
reading xpm
Following functions are read xpm data and it returns pair of simo-palette and simo objects.
- (simo::from-xpm STRING)
- (simo::from-xpm-buffer BUFFER)
- (simo::from-xpm-file FILE)
REQUIREMENTS
- eieio - Enhanced Implementation of Emacs Interpreted Objects.
BUGS
- This document is not complete yet.
- I can't write English well yet.
- This documentation style (using POD) is strange.
-
I wanted to test to write README by POD. However, the regular style of documentation of emacs-lisp is not POD.
I am trying to change style of documentation to regular style of emacs-lisp and eieio.
AUTHOR
lieutar <lieutar at 1dk.jp>