<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>EaselJS v0.5.0 API Documentation</title>
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css?stamp=1345841645.22" />
<link rel="stylesheet" type="text/css" href="assets/api.css?stamp=1345841645.22" />
<script type="text/javascript" src="assets/api-js?stamp=1345841645.22"></script>
<script type="text/javascript" src="assets/ac-js?stamp=1345841645.22"></script>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h1><a href="http://createjs.com/" title="EaselJS">EaselJS</a></h1>
<h3>EaselJS <span class="subtitle">0.5.0</span></h3>
<a href="./index.html" title="EaselJS">EaselJS</a>
> <a href="./module_EaselJS.html" title="EaselJS">EaselJS</a>
> Graphics
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
<div id="searchresults">
</div>
</div>
</form>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
<fieldset>
<legend>Filters</legend>
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
</fieldset>
</form>
<h2>
Class <b property="yui:name">Graphics</b>
<span class="extends">
</span>
</h2>
<!-- class tree goes here -->
<div class="summary description" property="yui:description">
The Graphics class exposes an easy to use API for generating vector drawing instructions and drawing them to a specified context.
Note that you can use Graphics without any dependency on the Easel framework by calling draw() directly,
or it can be used with the Shape object to draw vector graphics within the context of an Easel display list.<br/><br/>
<pre><code>var g = new Graphics();
g.setStrokeStyle(1);
g.beginStroke(Graphics.getRGB(0,0,0));
g.beginFill(Graphics.getRGB(255,0,0));
g.drawCircle(0,0,3);
var s = new Shape(g);
s.x = 100;
s.y = 100;
stage.addChild(s);
stage.update();</code></pre><br />
Note that all drawing methods in Graphics return the Graphics instance, so they can be chained together. For example, the following
line of code would generate the instructions to draw a rectangle with a red stroke and blue fill, then render it to the specified
context2D:<br />
<pre><code>myGraphics.beginStroke("#F00").beginFill("#00F").drawRect(20, 20, 100, 50).draw(myContext2D);
</div>
<div class="section constructor details" rel="yui:constructor" resource="#constructor">
<h3 id="constructor">Constructor</h3>
<div class="content">
<div class="detail">
<strong property="yui:name">Graphics</strong>
<code>
(
)
</code>
<div class="description">
</div>
</div>
</div>
</div>
<div rel="yui:properties" resource="#properties">
<div class="section field details">
<h3 id="properties">Properties</h3>
<div class="content">
<div class="protected" rel="yui:property" resource="#property__active">
<h4><a name="property__active" property="yui:name">_active</a>
- <code>protected <span property="yui:type">Boolean</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
</div>
</div>
<div class="default" property="yui:defaultValue">
Default Value: false
</div>
<hr />
</div>
<div class="protected" rel="yui:property" resource="#property__activeInstructions">
<h4><a name="property__activeInstructions" property="yui:name">_activeInstructions</a>
- <code>protected <span property="yui:type">Array[Command]</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
</div>
</div>
<hr />
</div>
<div class="protected" rel="yui:property" resource="#property__ctx">
<h4><a name="property__ctx" property="yui:name">_ctx</a>
- <code>protected static <span property="yui:type">CanvasRenderingContext2D</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
</div>
</div>
<hr />
</div>
<div class="protected" rel="yui:property" resource="#property__dirty">
<h4><a name="property__dirty" property="yui:name">_dirty</a>
- <code>protected <span property="yui:type">Boolean</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
</div>
</div>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
HTML5 开发框架CreateJS (166个子文件)
ac-js 5KB
ac-js 5KB
ac-js 5KB
ac-js 5KB
api-js 94KB
api-js 94KB
api-js 94KB
api-js 94KB
api.css 9KB
api.css 9KB
api.css 9KB
api.css 9KB
reset-fonts-grids-min.css 6KB
reset-fonts-grids-min.css 6KB
reset-fonts-grids-min.css 6KB
reset-fonts-grids-min.css 6KB
bg_hd.gif 96B
bg_hd.gif 96B
bg_hd.gif 96B
bg_hd.gif 96B
Graphics.html 244KB
Graphics.js.html 227KB
Stage.html 160KB
DisplayObject.js.html 160KB
DisplayObject.html 160KB
Matrix2D.html 155KB
Stage.js.html 147KB
Matrix2D.js.html 140KB
swfobject.js.html 140KB
Container.js.html 139KB
Ticker.html 134KB
SpriteSheetBuilder.js.html 133KB
module_EaselJS.html 123KB
ColorMatrix.js.html 119KB
SpriteSheetBuilder.html 118KB
Container.html 117KB
SpriteSheet.js.html 117KB
MovieClip.js.html 116KB
Text.html 113KB
Ticker.js.html 113KB
PreloadJS.js.html 112KB
MovieClip.html 108KB
Text.js.html 108KB
BitmapAnimation.js.html 107KB
Touch.js.html 107KB
BoxBlurFilter.js.html 107KB
SoundJS.js.html 106KB
Tween.html 105KB
SpriteSheetUtils.js.html 103KB
ColorMatrix.html 100KB
Tween.js.html 97KB
DOMElement.js.html 94KB
Ease.html 93KB
BitmapAnimation.html 92KB
Touch.html 92KB
ColorFilter.js.html 91KB
ColorMatrixFilter.js.html 89KB
AlphaMapFilter.js.html 89KB
MouseEvent.js.html 88KB
Bitmap.js.html 88KB
SpriteSheetUtils.html 85KB
Shape.js.html 84KB
SoundJS.html 83KB
SpriteSheet.html 82KB
AlphaMaskFilter.js.html 82KB
ColorFilter.html 82KB
Shadow.js.html 81KB
Rectangle.js.html 81KB
MouseEvent.html 80KB
Shape.html 79KB
Filter.js.html 79KB
DOMElement.html 79KB
HTMLAudioPlugin.js.html 79KB
Point.js.html 79KB
FlashPlugin.js.html 78KB
UID.html 76KB
Rectangle.html 76KB
UID.js.html 76KB
Filter.html 75KB
ColorMatrixFilter.html 74KB
BoxBlurFilter.html 74KB
Point.html 72KB
index.html 72KB
AlphaMaskFilter.html 68KB
AlphaMapFilter.html 68KB
Timeline.html 63KB
PreloadJS.html 62KB
Ease.js.html 59KB
Bitmap.html 59KB
Shadow.html 59KB
SoundInstance.html 57KB
Timeline.js.html 54KB
TagLoader.js.html 40KB
XHRLoader.js.html 36KB
Command.html 32KB
CSSPlugin.js.html 30KB
AbstractLoader.js.html 27KB
AbstractLoader.html 26KB
FlashPlugin.html 21KB
HTMLAudioPlugin.html 21KB
共 166 条
- 1
- 2
Crow0176
- 粉丝: 44
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页