added source rectangle and stretch in the blip fill

This commit is contained in:
Dolan Miu
2017-03-13 00:33:59 +00:00
parent fa44acca1b
commit eeb2187db4
3 changed files with 28 additions and 0 deletions

View File

@ -1,10 +1,14 @@
import { XmlComponent } from "../../../../../../../../xml-components"; import { XmlComponent } from "../../../../../../../../xml-components";
import { Blip } from "./blip"; import { Blip } from "./blip";
import { SourceRectangle } from "./source-rectangle";
import { Stretch } from "./stretch";
export class BlipFill extends XmlComponent { export class BlipFill extends XmlComponent {
constructor(referenceId: number) { constructor(referenceId: number) {
super("pic:blipFill"); super("pic:blipFill");
this.root.push(new Blip(referenceId)); this.root.push(new Blip(referenceId));
this.root.push(new SourceRectangle());
this.root.push(new Stretch());
} }
} }

View File

@ -0,0 +1,8 @@
import { XmlComponent } from "../../../../../../../../xml-components";
export class SourceRectangle extends XmlComponent {
constructor() {
super("a:srcRect");
}
}

View File

@ -0,0 +1,16 @@
import { XmlComponent } from "../../../../../../../../xml-components";
class FillRectangle extends XmlComponent {
constructor() {
super("a:fillRect");
}
}
export class Stretch extends XmlComponent {
constructor() {
super("a:stretch");
this.root.push(new FillRectangle());
}
}