Add new Image class

This commit is contained in:
Dolan
2018-08-02 21:07:37 +01:00
parent f7c02f4679
commit 2d12f6e54c
3 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import { IDrawingOptions } from "../drawing";
import { IMediaData } from "../media";
import { Paragraph } from "./paragraph";
import { PictureRun } from "./run";
export class Image extends Paragraph {
private readonly pictureRun: PictureRun;
constructor(imageData: IMediaData, drawingOptions?: IDrawingOptions) {
super();
this.pictureRun = new PictureRun(imageData, drawingOptions);
this.root.push(this.pictureRun);
}
public scale(factorX: number, factorY?: number): void {
this.pictureRun.scale(factorX, factorY);
}
}