I have an inline object (with a scale9 grid) and I'm trying to get bitmaps when resizing, but I cannot do this without adding it to the display list.
I try this:
spriteAsset.setActualSize(w,h); spriteAsset.width = w; bmd.draw(spriteAsset);
But when I then cross out the bitmaps using graphics.beginBitmapFill (), I just get the original unstretched image.
Any pointers? Or do I need to take 9 separate BitmapData images and make 9 separate bitmap fills?
Cheers, -Josh
, BitmapData.draw() scale9, , 9 , . , , , .
scale9, , BitmapData.draw . null, ( , ..). , ...
bmd.draw(spriteAsset, spriteAsset.transform.matrix)
( , , ymmv.)
Danjp , , , :
var scaledBitmapData:BitmapData = new BitmapData(newWidth, newHeight); var scaleMatrix:Matrix = new Matrix(); scaleMatrix.scale(scaleFactor, scaleFactor); scaledBitmapData.draw(bitmap, scaleMatrix);
Source: https://habr.com/ru/post/1739262/More articles:Python: List of modules (>>> help ('modules') does not work) - pythonWhat are the basic COM components required to burn DVD in Windows XP using .NET? - c #Background image in JTextPane - javaC # clickonce events? - c #SimpleDateFormat gives inconsistent results - javaПрограммная проверка включения/отключения роли совместимости IIS6 в IIS7 - c#How can I implement the correct bean counter with EJB 3.0? - javaHow to get all possible values for SPFieldLookup - sharepointHow to secure Java web services with login and session - javaстранная проблема с WriteBeginTag - htmlAll Articles