sponsor Vim development Vim logo Vim Book Ad

vim-paint : vim-paint

 script karma  Rating 7/3, Downloaded by 933  Comments, bugs, improvements  Vim wiki

created by
Yukihiro Nakadaira
 
script type
utility
 
description
Example:
  let canvas = paint#canvas#new(128, 128)
  call canvas.draw_line([0, 0], [63, 63], [0, 0, 0], 1)
  call canvas.draw_line([0, 63], [63, 0], [0, 0, 0], 2)
  call canvas.draw_rect([0, 64], [63, 127], [255, 0, 0], -1)
  call canvas.draw_rect([32, 64], [63, 95], [0, 255, 0], 1)
  call canvas.draw_ellipse([64, 0], [127, 63], [0, 0, 255], -1)
  call canvas.draw_ellipse([64, 32], [95, 63], [255, 255, 0], 2)
  for x in range(64)
    for y in range(64)
      call canvas.set_pixel(x + 64, y + 64, [x * 256 / 64, y * 256 / 64, 0])
    endfor
  endfor
  let font = paint#bdf#loadfile(globpath(&rtp, 'font/mplus/mplus_f12r.bdf'))
  call canvas.draw_text("Hello, Vim", [64, 76], font, [255, 255, 255])
  call canvas.save('example.bmp')

  result: http://ynkdir.github.com/vim-paint/example.bmp
 
install details
set runtimepath+=/path/to/vim-paint

Latest source: https://github.com/ynkdir/vim-paint
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-paint.zip 1.0 2011-02-19 7.3 Yukihiro Nakadaira Initial upload
ip used for rating: 18.222.69.152

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github