Files
docx-js/src/file/drawing/extent/extent.ts

25 lines
556 B
TypeScript
Raw Normal View History

import { XmlComponent } from "file/xml-components";
import { ExtentAttributes } from "./extent-attributes";
export class Extent extends XmlComponent {
2018-08-07 01:38:15 +01:00
private readonly attributes: ExtentAttributes;
2018-03-24 19:06:10 +00:00
2018-01-22 20:42:57 +00:00
constructor(x: number, y: number) {
super("wp:extent");
2018-03-24 19:06:10 +00:00
this.attributes = new ExtentAttributes({
cx: x,
cy: y,
});
this.root.push(this.attributes);
}
public setXY(x: number, y: number): void {
this.attributes.set({
cx: x,
cy: y,
});
}
}