Error in NullEngine for DynamicTexture


#1

Hi
getting error on drawText function of DynamicTexture inside NullEngine.

Error:
TypeError: Cannot read property 'width' of undefined.

Call:

texture.drawText(
            text,
            null as any,
            null as any,
            font,
            color,
            "black",
            true,
        );

Also as side note x and y have wrong type as in implementation are Nullable<number>

Judging from code could be issue of getSize


#2

well this could not work in the NullEngine context as there is no canvas support


#3

this._context.measureText(text); causes it, for now replaced whole drawText with empty function so it dont fail in null engine, will check what would be best approach to mock it there


#4

Ok sounds good!