Merge pull request #67 from citizenos/master

image scaling add rounding
This commit is contained in:
Dolan
2018-04-03 22:51:15 +01:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@ -35,8 +35,8 @@ export class Inline extends XmlComponent {
} }
public scale(factorX: number, factorY: number): void { public scale(factorX: number, factorY: number): void {
const newX = this.dimensions.emus.x * factorX; const newX = Math.round(this.dimensions.emus.x * factorX);
const newY = this.dimensions.emus.y * factorY; const newY = Math.round(this.dimensions.emus.y * factorY);
this.extent.setXY(newX, newY); this.extent.setXY(newX, newY);
this.graphic.setXY(newX, newY); this.graphic.setXY(newX, newY);

View File

@ -69,6 +69,11 @@ export class Paragraph extends XmlComponent {
return this; return this;
} }
public heading6(): Paragraph {
this.properties.push(new Style("Heading6"));
return this;
}
public title(): Paragraph { public title(): Paragraph {
this.properties.push(new Style("Title")); this.properties.push(new Style("Title"));
return this; return this;