You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Silvio Liria (JIRA)" <ji...@apache.org> on 2015/03/31 21:33:52 UTC

[jira] [Created] (FLEX-34816) BitmapUtil.getSnapshot not working

Silvio Liria created FLEX-34816:
-----------------------------------

             Summary: BitmapUtil.getSnapshot not working
                 Key: FLEX-34816
                 URL: https://issues.apache.org/jira/browse/FLEX-34816
             Project: Apache Flex
          Issue Type: Bug
    Affects Versions: Apache Flex 4.13.0
         Environment: OSX Yosemite.
Adobe Air project
            Reporter: Silvio Liria


The getSnapshotWithPadding method does not work. 
It doesn't show any error but the image is never drawn,

I have this problem also with ImageSnapshot.captureBitmapData(lbl)

	<fx:Script>
		<![CDATA[
			import mx.core.IVisualElement;
			import mx.core.UIComponent;
			import mx.events.FlexEvent;
			import mx.graphics.ImageSnapshot;
			
			import spark.components.Application;
			import spark.components.Button;
			import spark.components.Group;
			import spark.components.Image;
			import spark.components.Label;
			import spark.utils.BitmapUtil;
			
			import models.Colors;
			import models.Icons;
			import models.TrailbackMapaIcons;
			
			private var pi:positionIcon
		
			
			protected function container_creationCompleteHandler(event:FlexEvent):void
			{
				var lbl:Label = new Label()
				lbl.text = 'testing...'; 
				lbl.width = 200
				lbl.height = 25

			var bmData:BitmapData;

			bmData =  BitmapUtil.getSnapshotWithPadding(lbw,6,false,new Rectangle(0,0,250,50))  


			var b:Bitmap = new Bitmap(bmData)
			var img:Image = new Image()
			img.source = b
			img.width = img.height = 25
	
			container.source =  img.source;	
			}
		]]>
	</fx:Script>

	<s:Image id="container" width="100%" height="100%" creationComplete="container_creationCompleteHandler(event)"/>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)