Add scalable image feature

This commit is contained in:
Dolan
2018-03-24 19:06:10 +00:00
parent a954c69458
commit 05816abc12
15 changed files with 179 additions and 55 deletions

View File

@ -2,14 +2,23 @@ import { XmlComponent } from "file/xml-components";
import { ExtentAttributes } from "./extent-attributes";
export class Extent extends XmlComponent {
private attributes: ExtentAttributes;
constructor(x: number, y: number) {
super("wp:extent");
this.root.push(
new ExtentAttributes({
cx: x,
cy: y,
}),
);
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,
});
}
}