image scaling add rounding
This commit is contained in:
@ -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);
|
||||||
|
@ -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;
|
||||||
|
Reference in New Issue
Block a user