Git Product home page Git Product logo

simo's Introduction

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>

simo's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.