awayjs-display
Version:
AwayJS displaylist classes
39 lines • 1.89 kB
JavaScript
/**
* The TextLineMetrics class contains information about the text position and
* measurements of a line of text within a text field. All measurements are in
* pixels. Objects of this class are returned by the
* <code>away.entities.TextField.getLineMetrics()</code> method.
*/
var TextLineMetrics = (function () {
/**
* Creates a TextLineMetrics object. The TextLineMetrics object contains
* information about the text metrics of a line of text in a text field.
* Objects of this class are returned by the
* away.entities.TextField.getLineMetrics() method.
*
* @param x The left position of the first character in pixels.
* @param width The width of the text of the selected lines (not
* necessarily the complete text) in pixels.
* @param height The height of the text of the selected lines (not
* necessarily the complete text) in pixels.
* @param ascent The length from the baseline to the top of the line
* height in pixels.
* @param descent The length from the baseline to the bottom depth of
* the line in pixels.
* @param leading The measurement of the vertical distance between the
* lines of text.
*/
function TextLineMetrics(x, width, height, ascent, descent, leading) {
if (x === void 0) { x = NaN; }
if (width === void 0) { width = NaN; }
if (height === void 0) { height = NaN; }
if (ascent === void 0) { ascent = NaN; }
if (descent === void 0) { descent = NaN; }
if (leading === void 0) { leading = NaN; }
}
return TextLineMetrics;
}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = TextLineMetrics;
//# sourceMappingURL=TextLineMetrics.js.map
;