image scaling add rounding

This commit is contained in:
ilmar
2018-04-02 12:55:43 +03:00
parent 1dd1c65341
commit ee721ffbec
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 {
const newX = this.dimensions.emus.x * factorX;
const newY = this.dimensions.emus.y * factorY;
const newX = Math.round(this.dimensions.emus.x * factorX);
const newY = Math.round(this.dimensions.emus.y * factorY);
this.extent.setXY(newX, newY);
this.graphic.setXY(newX, newY);

View File

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