Bitmap too small for its content

I'm creating graphics by the code and placing them into a Bitmap. But they are higher than this Bitmap container.

import flash.display.*;

function getLine(){         
    var containerWidh:Number =enter code here 300;
    var containerHeight:Number = 300;
    var borderWidt:Number = 1;
    var spriteWrap:Sprite = new Sprite();

    var innerContainer:Sprite = new Sprite();
    innerContainer.x = 0;
    innerContainer.y = 0;

    var line1:Shape = new Shape();, 0x6F4356, 1, false, StageScaleMode.SHOW_ALL, CapsStyle.ROUND);, 5);, 800);;

    var line2:Shape = new Shape();, 0x6F4356, 1, false, StageScaleMode.SHOW_ALL, CapsStyle.ROUND);, 290);, 300);;


    return spriteWrap;

var spriteWrap:Sprite = getLine();
var wrapForBitmap:Sprite = new Sprite();            
var drawBitmap:BitmapData = new BitmapData(300, 300, true, 0x00ffaa);
var goOnStage:Bitmap = new Bitmap(drawBitmap);;, 0x6F7E84);, 0, 300, 300);;
wrapForBitmap.x = 10;
wrapForBitmap.y = 10;

drawBitmap.draw(spriteWrap, new Matrix(1, 0, 0, 1, 0, 0));



Your Shape line1 is higher than your Bitmap's height (300):, 5); // begins at x = 50 and y = 5, 800); // begins at x = 50 and y = 800

With the following code, you will draw a line from the top to the bottom of your Bitmap:, 0);, 300);

If you want line1 to be visible without changing it's height, you have to change your Bitmap's height (800) by modifying the second argument of your BitmapData method:

var drawBitmap:BitmapData = new BitmapData(300, 800, true, 0x00ffaa);

You should modify at the same time your rectangle's height:, 0, 300, 800);

Yes of course. Than I redraw my Bitmap using my Sprite;, new Matrix(1, 0, 0, 1, new_XPos, new_YPos), false, false);;

Need Your Help

PhoneGap 3.1 Local Build WP8

node.js cordova windows-phone-8 windows-phone-8-sdk

I'm trying to play with new phonegap-cli main focus is to setup wp8 platform

String intern in equals method


Is it a good practise to use String#intern() in equals method of the class. Suppose we have a class:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.