2018-01-12 00:12:39 +00:00
|
|
|
// http://officeopenxml.com/drwPic.php
|
2018-01-11 01:47:09 +00:00
|
|
|
import { XmlComponent } from "file/xml-components";
|
|
|
|
import { BlipFill } from "./blip/blip-fill";
|
|
|
|
import { NonVisualPicProperties } from "./non-visual-pic-properties/non-visual-pic-properties";
|
2018-01-16 00:43:00 +00:00
|
|
|
import { PicAttributes } from "./pic-attributes";
|
2018-01-12 00:12:39 +00:00
|
|
|
import { ShapeProperties } from "./shape-properties/shape-properties";
|
2018-01-11 01:47:09 +00:00
|
|
|
|
|
|
|
export class Pic extends XmlComponent {
|
2018-08-07 01:38:15 +01:00
|
|
|
private readonly shapeProperties: ShapeProperties;
|
2018-03-24 19:06:10 +00:00
|
|
|
|
2018-01-22 20:42:57 +00:00
|
|
|
constructor(referenceId: number, x: number, y: number) {
|
2018-01-11 01:47:09 +00:00
|
|
|
super("pic:pic");
|
|
|
|
|
2018-01-23 01:33:12 +00:00
|
|
|
this.root.push(
|
|
|
|
new PicAttributes({
|
|
|
|
xmlns: "http://schemas.openxmlformats.org/drawingml/2006/picture",
|
|
|
|
}),
|
|
|
|
);
|
2018-03-24 19:06:10 +00:00
|
|
|
|
|
|
|
this.shapeProperties = new ShapeProperties(x, y);
|
|
|
|
|
2018-01-11 01:47:09 +00:00
|
|
|
this.root.push(new NonVisualPicProperties());
|
|
|
|
this.root.push(new BlipFill(referenceId));
|
2018-01-22 20:42:57 +00:00
|
|
|
this.root.push(new ShapeProperties(x, y));
|
2018-01-11 01:47:09 +00:00
|
|
|
}
|
2018-03-24 19:06:10 +00:00
|
|
|
|
|
|
|
public setXY(x: number, y: number): void {
|
|
|
|
this.shapeProperties.setXY(x, y);
|
|
|
|
}
|
2018-01-11 01:47:09 +00:00
|
|
|
}
|