Cocktail icon indicating copy to clipboard operation
Cocktail copied to clipboard

[BUG] TextRender - (urgent)

Open Espigah opened this issue 10 years ago • 1 comments

TextRender

Espigah avatar Sep 16 '14 20:09 Espigah

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... =/

Espigah avatar Sep 19 '14 14:09 Espigah