2018-01-16 01:31:47 +00:00
|
|
|
import { XmlComponent } from "file/xml-components";
|
|
|
|
import { ExtentAttributes } from "./extent-attributes";
|
|
|
|
|
|
|
|
export class Extent extends XmlComponent {
|
2018-03-24 19:06:10 +00:00
|
|
|
private attributes: ExtentAttributes;
|
|
|
|
|
2018-01-22 20:42:57 +00:00
|
|
|
constructor(x: number, y: number) {
|
2018-01-16 01:31:47 +00:00
|
|
|
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,
|
|
|
|
});
|
2018-01-16 01:31:47 +00:00
|
|
|
}
|
|
|
|
}
|