double getWidth(double width) { if (useOriginSize) { return width; } try { return width.w; } catch (e) { return width; } }