Add image dimensions

This commit is contained in:
Dolan
2018-01-22 20:42:57 +00:00
parent d3bc784248
commit ef05024f2f
12 changed files with 58 additions and 21 deletions

View File

@ -4,12 +4,12 @@ import { ExtentsAttributes } from "./extents-attributes";
export class Extents extends XmlComponent {
constructor() {
constructor(x: number, y: number) {
super("a:ext");
this.root.push(new ExtentsAttributes({
cx: 3162300,
cy: 2857500,
cx: x,
cy: y,
}));
}
}

View File

@ -5,10 +5,10 @@ import { Offset } from "./offset/off";
export class Form extends XmlComponent {
constructor() {
constructor(x: number, y: number) {
super("a:xfrm");
this.root.push(new Extents());
this.root.push(new Extents(x, y));
this.root.push(new Offset());
}
}

View File

@ -8,14 +8,14 @@ import { ShapePropertiesAttributes } from "./shape-properties-attributes";
export class ShapeProperties extends XmlComponent {
constructor() {
constructor(x: number, y: number) {
super("pic:spPr");
this.root.push(new ShapePropertiesAttributes({
bwMode: "auto",
}));
this.root.push(new Form());
this.root.push(new Form(x, y));
this.root.push(new PresetGeometry());
// this.root.push(new NoFill());
// this.root.push(new Outline());