Home > simo.el

simo.el

Simo.el is a project mainly written in EMACS LISP and PERL, it's free.

eieio を用いたオブジェクト指向なイメージ操作ライブラリ

=pod

=head1 NAME

simo.el - simple image manupulation object.

=head1 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 "
")
  (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 "
")))

=head1 DESCRIPTION

"simo" provides simple manipulation method of images.

=head1 CLASS simo-palette

=head1 CONSTRUCTOR

=over 4

=item simo-palette::new

=back

=head1 ATTRIBUTES

=over 4

=item :sym

=item :full

=item :mono

=item :gray

=item :g4

=back

=head1 METHODS

=over 4

=item (simo-palette-xpm-line SIMO-PALETTE)

=back

=head1 CLASS simo

=head2 CONSTRUCTOR

=over 4

=item (simo::new :width WIDTH :height HEIGHT)

Creates new simo object.

=back

=head2 ATTRIBUTES

=over 4

=item :width simo-width

=item :height simo-height

=back

=head2 METHODS

=over 4

=item (simo-resize SIMO WIDTH HEIGHT &optional X Y)

=item (simo-put-color SIMO X Y COLOR-NUM)

=item (simo-get-color SIMO X Y)

=item (simo-fill-rect SIMO X0 Y0 X1 Y1 COLOR-NUM)

=item (simo-rect SIMO SIMO X0 Y0 X1 Y1 COLOR-NUM)

=item (simo-draw-line SIMO X0 Y0 X1 Y1 COLOR-NUM)

=item (simo-to-xpm SIMO &rest OPTIONS)

Creates xpm string from the SIMO object. This method accespts following options.

=over 4

=item :name

=item :palette

=item :full

=item :mono

=item :g4

=item :gray

=back

=item (simo-string SIMO &rest options)

Crates string with properties for displays image.

This method accepts "simo-to-xpm" method options and following options.

=over 4

=item :string

=back

=item (simo-insert SIMO &rest options)

=back

=head1 reading xpm

Following functions are read xpm data and it returns pair of simo-palette and simo objects.

=over 4

=item (simo::from-xpm STRING)

=item (simo::from-xpm-buffer BUFFER)

=item (simo::from-xpm-file FILE)

=back

=head1 REQUIREMENTS

=over 4

=item L<eieio|http://cedet.sourceforge.net/eieio.shtml> - Enhanced Implementation of Emacs Interpreted Objects.

=back

=head1 BUGS

=over 4

=item This document is not complete yet.

=item I can't write English well yet.

=item 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.

=back

=head1 AUTHOR

lieutar <lieutar at 1dk.jp>

=cut

Previous:graytoad