Add scalable image feature
This commit is contained in:
@ -2,14 +2,23 @@ import { XmlComponent } from "file/xml-components";
|
||||
import { ExtentAttributes } from "./extent-attributes";
|
||||
|
||||
export class Extent extends XmlComponent {
|
||||
private attributes: ExtentAttributes;
|
||||
|
||||
constructor(x: number, y: number) {
|
||||
super("wp:extent");
|
||||
|
||||
this.root.push(
|
||||
new ExtentAttributes({
|
||||
cx: x,
|
||||
cy: y,
|
||||
}),
|
||||
);
|
||||
this.attributes = new ExtentAttributes({
|
||||
cx: x,
|
||||
cy: y,
|
||||
});
|
||||
|
||||
this.root.push(this.attributes);
|
||||
}
|
||||
|
||||
public setXY(x: number, y: number): void {
|
||||
this.attributes.set({
|
||||
cx: x,
|
||||
cy: y,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user