#815 Rotation and flipping images

This commit is contained in:
Dolan
2021-03-15 02:41:37 +00:00
parent a3febae8a3
commit bd40b11ce4
33 changed files with 615 additions and 126 deletions

View File

@ -1,5 +1,5 @@
// http://officeopenxml.com/drwPic.php
import { IMediaData } from "file/media";
import { IMediaData, IMediaDataTransformation } from "file/media";
import { XmlComponent } from "file/xml-components";
import { BlipFill } from "./blip/blip-fill";
@ -10,7 +10,7 @@ import { ShapeProperties } from "./shape-properties/shape-properties";
export class Pic extends XmlComponent {
private readonly shapeProperties: ShapeProperties;
constructor(mediaData: IMediaData, x: number, y: number) {
constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
super("pic:pic");
this.root.push(
@ -19,11 +19,11 @@ export class Pic extends XmlComponent {
}),
);
this.shapeProperties = new ShapeProperties(x, y);
this.shapeProperties = new ShapeProperties(transform);
this.root.push(new NonVisualPicProperties());
this.root.push(new BlipFill(mediaData));
this.root.push(new ShapeProperties(x, y));
this.root.push(new ShapeProperties(transform));
}
public setXY(x: number, y: number): void {