Category
show
전체 (775)
웹표준, 웹접근성™ (5)
웹프로그래밍™ (360)
웹기획™ (0)
웹디자인™ (5)
서버™ (32)
데이터베이스™ (43)
개발자료 (9)
트랜드 (60)
Study English (2)
블루비 (70)
오피스 다이어리 (19)
Textcube (2)
이슈 (20)
컴퓨터 악세사리 (18)
엔터테인먼트 (24)
좋은글 (73)
재테크 (1)
이벤트 (4)

Prototype Graphic Framework(PGF)

웹프로그래밍™/jQuery, Javascript 2007/04/12 07:34 by 블루비 Total 505 : Today 3 : Yesterday 0
http://prototype-graphic.xilinus.com/

시간이 되면 찬찬히 둘러봐야겠지만 prototype 기반의 그래픽을 지원하는 framework 인거 같다. SVG, VML, Canvas 를 모두 지원하는것으로 보이는 요놈 참.. 분석할 만하다. ㅋㅋ
틈틈히 봐야겠군...


Prototype Graphic Framework (PGF) is a framework based on prototype to display vectorial shapes inside a web browser.
This library is licensed under a MIT-style license, so feel free to use it :).





Introduction

This open-source framework is developed for my new project NeoMeeting. I have already done a lot of work but sometimes quick-and-dirty. I will add them soon and frequently in this framework to have a great open-source project.

The main features are:

  • OO Framework of course!
  • Pluggable renderer. I am working mainly on SVG, VML (only for IE support of course!). I try to create a canvas renderer, even if it's not my main goal to support canvas, just to validate it's doable. I like canvas but there are some
  • Tools to interact with graphic (like a move tool)
  • And more (I am sure, but I will found out later :))
As it's still under heavy development, I will post a ticket on my blog on every main commit.

Download

As it's not yet ready for a zip distrib, download are available by using subvesrion trunk.
Just do:
svn co http://svn.itseb.com/public/prototype-graphic/trunk prototype-graphic
It includes source files, unit test files based on unittest.js, documentation and sample files.
For any technical questions, patches, requests or bugs use this google group.

Documentation

Documentation is generated by natural docs and is included in svn trunk (doc directory).
You can also have an direct access here

Supported shape (Revision #31)

ShapeSVGVMLCanvas
RectangleYESYESYES
EllipseYESYESYES
CircleYESYESYES
PolygonYESYESYES

Sample code

Here is the big picture how it works

// Create an SVG renderer
var renderer = new SVGRenderer("whiteboard");

// Create a rectangle with some attributes like color and bounds
var rect = new Graphic.Rectangle(renderer);
rect.setFill({r: 255, g: 0, b: 0, a: 128});
rect.setStroke({r: 255, g: 255, b: 0, a: 128, w: 5});
rect.setBounds(10, 20, 200, 300);
rect.setRoundCorner(10, 10);
rect.translate(10, 20);
rect.rotate(30);

renderer.add(rect);

You can try a sample, same code using SVG (Firefox, WebKit, Opera), VML (IE) or canvas (Firefox, Safari, WebKit, Opera) renderer. Canvas could not be up-to-date as it's not my priority.

Change log

Main commit revisions:

#31 (03/30/07).
  • Added: polygon shape
  • Updated: canvas renderer for polygon
  • Updated: Documentation
#28 (03/29/07).
  • Added: circle shape
  • Updated: canvas renderer for circle and ellipse
  • Updated: Documentation
#27 (03/29/07).
  • Added: ellipse shape (only in SVG/VML).
  • Added: shapes unit test
  • Updated: Documentation
#23 (03/27/07) first public version.
  • Only rectangle shapes (for validating rendering process).
  • Three renderers: SVG,VML, Canvas.
  • Full documentation of existing code.
  • Some unit tests (all code will be covered in the next main commit)

Author

This class has been done by S?bastien Gruhier (aka Mr Proto)
2007/04/12 07:34 2007/04/12 07:34

TRACKBACK :: http://blueb.net/blog/trackback/820

Leave a Comment
[로그인][오픈아이디란?]
1  ... 348 349 350 351 352 353 354 355 356  ... 775 

달력

«   2008/11   »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30