Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 25CF0200AE1 for ; Mon, 23 May 2016 03:57:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 24772160A28; Mon, 23 May 2016 01:57:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6D5EA160A06 for ; Mon, 23 May 2016 03:57:40 +0200 (CEST) Received: (qmail 16024 invoked by uid 500); 23 May 2016 01:57:39 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 16013 invoked by uid 99); 23 May 2016 01:57:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2016 01:57:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BD7D3C0E32 for ; Mon, 23 May 2016 01:57:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.313 X-Spam-Level: * X-Spam-Status: No, score=1.313 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id m6ICKJreElFi for ; Mon, 23 May 2016 01:57:34 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id BC6715FB15 for ; Mon, 23 May 2016 01:57:33 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 7BBEC2B6D506A for ; Sun, 22 May 2016 18:57:32 -0700 (PDT) Date: Sun, 22 May 2016 18:20:56 -0700 (PDT) From: lizhi To: dev@flex.apache.org Message-ID: <1463966456828-53185.post@n4.nabble.com> In-Reply-To: <633CCB1A-488A-45C8-B9F2-73BC8EF41751@gmail.com> References: <1463814225691-53171.post@n4.nabble.com> <1463816734662-53173.post@n4.nabble.com> <1463840302329-53175.post@n4.nabble.com> <000f425c.4a05d2c93c8440d4@adobe.com> <1463864876702-53181.post@n4.nabble.com> <633CCB1A-488A-45C8-B9F2-73BC8EF41751@gmail.com> Subject: Re: why can not open this code? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Mon, 23 May 2016 01:57:41 -0000 public function draw(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):void { drawWithQuality(source, matrix, colorTransform, blendMode, clipRect, smoothing); } public function drawWithQuality(source:IBitmapDrawable, matrix:Matrix=null, colorTransform:ColorTransform=null, blendMode:String=null, clipRect:Rectangle=null, smoothing:Boolean=false, quality:String=null):void { if (source is BitmapData){ var bmd:BitmapData = source as BitmapData; fromImage(bmd.ctx); }else if(source is TextField){ var tf:TextField = source as TextField; tf.__draw(ctx,matrix); }else if (source is Sprite){ var sp:Sprite = source as Sprite; sp.graphics.draw(ctx, sp.worldMatrix, 1, sp.blendMode, sp.transform.colorTransform); }else if (source is Shape){ var sha:Shape = source as Shape; sha.graphics.draw(ctx, sha.worldMatrix, 1, sha.blendMode, sha.transform.colorTransform); } } pls use this code. or just input a new matrix. package { import flash.display.*; import flash.events.Event; public class TestDraw extends Sprite { public function TestDraw () { var shape : Shape = new Shape (); shape.graphics.lineStyle (1, 0xFFFFFF, 0.5); shape.graphics.beginFill (0xFF0080, 0.75); shape.graphics.drawCircle (100, 100, 100); //addChild (shape); var data : BitmapData = new BitmapData (300, 300, true, 0x800080FF); data.draw (shape); var bitmap : Bitmap = new Bitmap (data); bitmap.x = bitmap.y = 10; addChild (bitmap); /* stage.addEventListener (Event.RESIZE, resize); } private function resize (e : Event) : void { graphics.clear (); graphics.beginFill (Math.random () * 0xFFFFFF, 0.75); graphics.drawRect (10, 10, stage.stageWidth - 20, stage.stageHeight - 20); */ } } } -- View this message in context: http://apache-flex-development.2333347.n4.nabble.com/why-can-not-open-this-code-tp53169p53185.html Sent from the Apache Flex Development mailing list archive at Nabble.com.