亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? distortion.as

?? 用于flash/flex的 as3的 2D圖形圖像圖表的動態生成
?? AS
字號:
package flare.vis.operator.distortion
{
	import flare.animate.Transitioner;
	import flare.vis.axis.Axis;
	import flare.vis.axis.CartesianAxes;
	import flare.vis.data.Data;
	import flare.vis.data.DataSprite;
	import flare.vis.events.VisualizationEvent;
	import flare.vis.operator.layout.Layout;
	
	import flash.display.Sprite;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	/**
	 * Base class for distortion operators that adjust the position and size
	 * of visual objects in a visualization.
	 */
	public class Distortion extends Layout
	{
		/** A bounding rectangle for storing the layout bounds. */
		protected var _b:Rectangle;
		
		/** Flag indicating if x-coordinates should be distorted. */
		public var distortX:Boolean;		
		/** Flag indicating if y-coordinates should be distorted. */
		public var distortY:Boolean;
		/** Flag indicating if sizes should be distorted. */
		public var distortSize:Boolean;		
		/** Flag indicating if axes should be distorted. */
		public var distortAxes:Boolean;		
		/** Flag indicating if the <code>DataSprite.size</code> field should be
		 *  distorted. If false (the default), the scaleX and scaleY properties
		 *  are used instead. */
		public var useSizeField:Boolean = false;		
		/** Flag indicating if the size or scale values should be reset to 1
		 *  upon each invocation of the distortion. This avoids the need to
		 *  manually reset the size values on each update. The default value
		 *  is false. */
		public var resetSize:Boolean = false;		
		/** Flag indicating if distortion anchor points outside the layout
		 *  bounds should be considered by the distortion. If true, external
		 *  anchors will be mapped to nearest point on the border of the layout
		 *  bounds. */
		public var anchorInBounds:Boolean = true;
		
		/** @inheritDoc */
		public override function set layoutAnchor(p:Point):void {
			if (p != null && anchorInBounds) {
        		var b:Rectangle = layoutBounds, x:Number, y:Number;
        		x = (p.x < b.left ? b.left : (p.x > b.right ? b.right : p.x));
        		y = (p.y < b.top ? b.top : (p.y > b.bottom ? b.bottom : p.y));
        		p = new Point(x, y);
			}
			super.layoutAnchor = p;
		}
		
		// --------------------------------------------------------------------
		
		/**
		 * Creates a new Distortion.
		 * @param distortX Flag indicating if x-coordinates should be distorted
		 * @param distortY Flag indicating if y-coordinates should be distorted
		 * @param distortSize Flag indicating is sizes should be distorted
		 */		
		public function Distortion(distortX:Boolean=true, distortY:Boolean=true,
			distortSize:Boolean=true, distortAxes:Boolean=true)
		{
			this.distortX = distortX;
			this.distortY = distortY;
			this.distortSize = distortSize;
			this.distortAxes = distortAxes;
		}
		
		/** @inheritDoc */
		public override function operate(t:Transitioner=null):void
		{
			_t = (t!=null ? t : Transitioner.DEFAULT);
			_b = layoutBounds;
			visualization.data.visit(distort, Data.NODES);
			_t = null;
			
			if (distortAxes && visualization.xyAxes)
				visualization.addEventListener(
					VisualizationEvent.UPDATE, axesDistort);
		}
		
		/**
		 * Distortion method for processing a DataSprite.
		 * @param d a DataSprite to distort
		 */
		protected function distort(d:DataSprite):void
		{
			var o:Object = _t.$(d), ss:Number;
			if (resetSize) {
				if (useSizeField) { o.size = 1; }
				else { o.scaleX = 1; o.scaleY = 1; }
			}
			var bb:Rectangle = _t.endBounds(d, d.parent);
			
			if (distortX) o.x = xDistort(o.x);
			if (distortY) o.y = yDistort(o.y);
			if (distortSize) {
				ss = sizeDistort(bb, o.x, o.y);
				if (useSizeField) {
					o.size *= ss;
				} else {
					o.scaleX *= ss;
					o.scaleY *= ss;
				}
			}
		}
		
		/**
		 * Compute a distorted x-coordinate.
		 * @param x the initial x-coordinate
		 * @return the distorted s-coordinate
		 */
		protected function xDistort(x:Number):Number
		{
			// for sub-classes
			return x;
		}
		
		/**
		 * Compute a distorted y-coordinate.
		 * @param y the initial y-coordinate
		 * @return the distorted y-coordinate
		 */
		protected function yDistort(y:Number):Number
		{
			// for sub-classes
			return y;
		}
		
		/**
		 * Compute a distorted size value.
		 * @param bb an object's bounding box
		 * @param x the initial x-coordinate
		 * @param y the initial y-coordinate
		 * @return the distorted size value
		 */
		protected function sizeDistort(bb:Rectangle, x:Number, y:Number):Number
		{
			// for sub-classes
			return 1;
		}
		
		/**
		 * Performs distortion of Cartesian axes. As axis layout is recomputed
		 * <em>after</em> the operators have run, we must distort the axes in
		 * a separate step. This is accomplished by adding an update listener
		 * on the visualization that invokes the axis distortion after the
		 * axis layout has completed. This method is registered as the
		 * listener callback.
		 * @param evt the visualization update event
		 */
		protected function axesDistort(evt:VisualizationEvent):void
		{
			_t = evt.transitioner;
			_t = (_t==null ? Transitioner.DEFAULT : _t);
			
			var axes:CartesianAxes = visualization.xyAxes;
			if (axes != null) {
				distortAxis(axes.xAxis, true, false);
				distortAxis(axes.yAxis, false, true);
			}
			visualization.removeEventListener(
				VisualizationEvent.UPDATE, axesDistort);
				
			_t = null;
		}
		
		private function distortAxis(axis:Axis, xb:Boolean, yb:Boolean):void
		{
			var i:int, o:Object;
			
			// distort the axis labels
			var labels:Sprite = axis.labels;
			for (i=0; i<labels.numChildren; ++i) {
				o = _t.$(labels.getChildAt(i));
				if (xb && distortX) {
					o.x = xDistort(o.x);
				}
				if (yb && distortY) {
					o.y = yDistort(o.y);
				}
			}
			
			// distort the axis gridlines
			var glines:Sprite = axis.gridLines;
			for (i=0; i<glines.numChildren; ++i) {
				o = _t.$(glines.getChildAt(i));
				if (xb && distortX) {
					o.x1 = xDistort(o.x1);
					o.x2 = xDistort(o.x2);
				}
				if (yb && distortY) {
					o.y1 = yDistort(o.y1);
					o.y2 = yDistort(o.y2);
				}
			}
		}
		
	} // end of class Distortion
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃精品在线观看| 色综合欧美在线| 成人av一区二区三区| 欧美日韩国产一级| 中文天堂在线一区| 日韩av电影免费观看高清完整版 | 久久国产福利国产秒拍| 一本一道综合狠狠老| 久久久久九九视频| 免费成人在线影院| 欧美日韩国产一区二区三区地区| 国产精品成人在线观看| 黑人巨大精品欧美黑白配亚洲| 精品污污网站免费看| 亚洲女性喷水在线观看一区| 国产激情视频一区二区三区欧美| 欧美精品一级二级| 亚洲午夜精品久久久久久久久| 国产99久久久国产精品| 久久精品人人做人人综合 | 国产日韩欧美一区二区三区综合| 日韩电影一区二区三区| 欧美日韩在线播放一区| 亚洲精品乱码久久久久久黑人| 夫妻av一区二区| 欧美精品一区二区精品网| 日韩精品视频网| 欧美日韩精品专区| 午夜私人影院久久久久| 色噜噜狠狠色综合中国| 亚洲色图丝袜美腿| 91视视频在线观看入口直接观看www | 国产亚洲一区二区三区四区| 麻豆免费看一区二区三区| 91麻豆精品91久久久久久清纯| 午夜在线成人av| 91精品国产综合久久香蕉麻豆| 性感美女极品91精品| 欧美高清性hdvideosex| 日韩av电影天堂| 精品福利一区二区三区免费视频| 久久精品国产亚洲aⅴ| 久久久久久久久久久久久女国产乱| 久久电影网站中文字幕 | 精品视频999| 日本不卡123| 精品国产欧美一区二区| 国产jizzjizz一区二区| 亚洲色图.com| 欧美精品久久天天躁| 久久精品国产77777蜜臀| 久久一夜天堂av一区二区三区| 国产精品一区一区三区| 中文字幕一区二区三区在线观看| 在线一区二区三区四区五区| 日韩国产欧美在线观看| 久久久天堂av| 91久久精品午夜一区二区| 午夜精品影院在线观看| 国产亚洲综合性久久久影院| jiyouzz国产精品久久| 亚洲风情在线资源站| 欧美成人福利视频| 91在线看国产| 奇米影视一区二区三区| 日本一区二区视频在线| 欧美日韩在线综合| 国产精品一区在线观看乱码| 亚洲一区视频在线| 精品福利一区二区三区免费视频| 北岛玲一区二区三区四区| 香蕉久久一区二区不卡无毒影院 | 亚洲国产视频一区二区| 精品久久久久一区| 色综合 综合色| 国产一区二区91| 亚洲影院免费观看| 欧美激情一区二区三区四区 | 国产女主播在线一区二区| 欧美性受极品xxxx喷水| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 午夜精品福利视频网站| 国产亚洲精品aa午夜观看| 欧美精品久久一区二区三区| 成人aaaa免费全部观看| 精品一区二区国语对白| 婷婷亚洲久悠悠色悠在线播放| 国产精品视频看| 欧美精品一区二区三区蜜桃| 欧美日韩五月天| 色婷婷久久综合| 成人免费看的视频| 理论电影国产精品| 午夜欧美在线一二页| 亚洲婷婷在线视频| 国产精品午夜久久| 国产日本一区二区| 精品久久久久久久久久久久包黑料| 日韩欧美区一区二| 亚洲欧美自拍偷拍色图| 337p亚洲精品色噜噜噜| 欧美在线观看一区| 色屁屁一区二区| 91色在线porny| 暴力调教一区二区三区| 国产成人夜色高潮福利影视| 久久99精品久久久久久| 蜜桃久久久久久| 蜜桃av一区二区| 蜜臀va亚洲va欧美va天堂 | 色婷婷综合久久久中文字幕| 成人福利电影精品一区二区在线观看| 国产一区三区三区| 国产精品一区二区你懂的| 久草精品在线观看| 国产精品综合二区| 国产精品小仙女| 不卡在线观看av| 成人91在线观看| 色婷婷综合激情| 在线亚洲一区观看| 欧美精品xxxxbbbb| 精品av综合导航| 久久精品亚洲乱码伦伦中文| 欧美激情一区二区三区四区| 麻豆精品久久久| 老司机午夜精品| 丰满白嫩尤物一区二区| 91丨九色丨蝌蚪富婆spa| 欧美写真视频网站| 在线成人av影院| 久久综合九色综合欧美亚洲| 久久婷婷一区二区三区| 国产精品免费久久| 亚洲与欧洲av电影| 免费精品视频最新在线| 福利电影一区二区| 在线看日本不卡| 欧美成va人片在线观看| 久久久噜噜噜久久中文字幕色伊伊| 中文字幕va一区二区三区| 亚洲欧美国产高清| 男男视频亚洲欧美| 7777精品久久久大香线蕉 | 国产综合色产在线精品| 国产美女精品人人做人人爽| 99久久99久久精品国产片果冻| 欧美性高清videossexo| 久久久天堂av| 亚洲专区一二三| 国产在线日韩欧美| 色偷偷成人一区二区三区91 | 亚洲色图20p| 奇米精品一区二区三区四区| 成人午夜视频在线观看| 9191成人精品久久| 中文字幕免费不卡| 日韩精品电影在线观看| 成人精品一区二区三区中文字幕| 欧美日韩不卡一区| 中文一区在线播放| 老司机免费视频一区二区三区| 91香蕉视频黄| 国产视频一区在线观看| 日本成人在线电影网| 91女神在线视频| 久久色在线视频| 婷婷激情综合网| 91在线一区二区三区| 精品国产成人在线影院| 亚洲3atv精品一区二区三区| www.综合网.com| 久久久www免费人成精品| 轻轻草成人在线| 91久久免费观看| 亚洲天堂精品在线观看| 国产成人精品网址| 欧美精品一区二区久久婷婷| 日韩高清一级片| 欧美日韩成人在线| 亚洲一区在线播放| 色婷婷激情综合| **欧美大码日韩| 9i看片成人免费高清| 国产亚洲精品aa| 国产成人av一区二区三区在线| 日韩亚洲国产中文字幕欧美| 午夜电影一区二区三区| 欧美在线观看视频一区二区| 亚洲三级在线免费观看| 91在线国内视频| 亚洲乱码国产乱码精品精小说 | 久久99国产精品免费网站| 欧美嫩在线观看| 亚洲bt欧美bt精品777| 欧美亚洲禁片免费| 夜夜嗨av一区二区三区网页 | 久久免费看少妇高潮| 国产一二三精品| 国产三级久久久|