2018-12-21 01:39:20 +00:00
|
|
|
import { IMediaData } from "file/media";
|
2018-01-16 00:43:00 +00:00
|
|
|
import { XmlComponent } from "file/xml-components";
|
2018-12-21 01:39:20 +00:00
|
|
|
|
2018-01-16 00:43:00 +00:00
|
|
|
import { GraphicDataAttributes } from "./graphic-data-attribute";
|
|
|
|
import { Pic } from "./pic";
|
|
|
|
|
|
|
|
export class GraphicData extends XmlComponent {
|
2018-08-07 01:38:15 +01:00
|
|
|
private readonly pic: Pic;
|
2018-03-24 19:06:10 +00:00
|
|
|
|
2018-12-21 01:39:20 +00:00
|
|
|
constructor(mediaData: IMediaData, x: number, y: number) {
|
2018-01-16 00:43:00 +00:00
|
|
|
super("a:graphicData");
|
|
|
|
|
2018-01-23 01:33:12 +00:00
|
|
|
this.root.push(
|
|
|
|
new GraphicDataAttributes({
|
|
|
|
uri: "http://schemas.openxmlformats.org/drawingml/2006/picture",
|
|
|
|
}),
|
|
|
|
);
|
2018-01-16 00:43:00 +00:00
|
|
|
|
2018-12-21 01:39:20 +00:00
|
|
|
this.pic = new Pic(mediaData, x, y);
|
2018-03-24 19:06:10 +00:00
|
|
|
|
|
|
|
this.root.push(this.pic);
|
|
|
|
}
|
|
|
|
|
|
|
|
public setXY(x: number, y: number): void {
|
|
|
|
this.pic.setXY(x, y);
|
2018-01-16 00:43:00 +00:00
|
|
|
}
|
|
|
|
}
|