Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TextRender - (urgent) #418

Open
Espigah opened this issue Sep 16, 2014 · 1 comment
Open

[BUG] TextRender - (urgent) #418

Espigah opened this issue Sep 16, 2014 · 1 comment

Comments

@Espigah
Copy link

Espigah commented Sep 16, 2014

TextRender

@Espigah Espigah changed the title [BUG] TextRender [BUG] TextRender - (urgent) Sep 16, 2014
@Espigah
Copy link
Author

Espigah commented Sep 19, 2014

override public function getBitmap(bounds:RectangleVO):NativeBitmapData { //this offset is the offset between the top most of the text and the top of the text //field. We want to remove it so that text gets drawn at y=0 var textOffsetY:Float = _textField.textHeight - _textField.height; var textOffsetX:Float = _textField.width - _textField.textWidth;
    //_nativeBitmap = new BitmapData(Math.round(bounds.width), Math.round(bounds.height - textOffsetY), true, 0x00000000);
    _nativeBitmap = new BitmapData(Math.ceil(bounds.width+textOffsetX), Math.ceil(bounds.height - textOffsetY), true, 0x00000000);//#418 - [BUG] TextRender - (urgent) 
</code><code>   
    _matrix.identity();

    //there is a documented 2px gutter (horizontal and vertical) in the flash text field before the
    //first char :
    //http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextLineMetrics.html
    _matrix.translate( -2, textOffsetY + 2);

    _nativeBitmap.draw(_textField, _matrix);

    return _nativeBitmap;
}

still nothing... =/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant