Skip to content
A javascript library that could draw somehitng on html
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets change folder and file structure Sep 23, 2012
pages
src 去掉 underscore 依赖 #13 Mar 13, 2013
.gitignore
LICENCES
README.md

README.md

#Painter

Painter is a javascript library that could draw something on html.

##how to use?

Painter is based on jQuery and underscore.

  • First, refer jQuery and underscore
  • Second, refer draw-rect.css and draw-rect.js
<link rel="stylesheet" href="src/css/draw-rect.css">

<script type="text/javascript" src="src/js/draw-rect.js"></script>
var playground = Painter.playground({id: "#playground"});

//paint a rect that x 10, y 20, width 40, height 40
var rect = playground.paintRect(10, 20, 40, 40);

Manual.

This is example.

#Painter

Painter 是一个可以在 html 上画一此东西的 javascript 类库.

##如何使用?

Painter 基于jQueryunderscore.

  • 首先, 引 jQuery 和 underscore
  • 然后, 引 draw-rect.css 和 draw-rect.js
<link rel="stylesheet" href="src/css/draw-rect.css">

<script type="text/javascript" src="src/js/draw-rect.js"></script>
var playground = Painter.playground({id: "#playground"});

//画一个矩形, 矩形的位置为 x 10, y 20 宽高为 40, 40
var rect = playground.paintRect(10, 20, 40, 40);

使用说明.

这是例子.

You can’t perform that action at this time.