Memory hardening for AlsaDriver.

This commit is contained in:
Robin Davies
2024-10-05 02:14:58 -04:00
parent 46669cfda9
commit 9d4cc6e978
22 changed files with 1137 additions and 409 deletions
+32
View File
@@ -0,0 +1,32 @@
export default class Rectangle {
top: number;
left: number;
width: number;
height: number;
constructor(top?: number, left?: number, width?: number, height?: number) {
this.top = top ? top: 0;
this.left = left ? left: 0;
this.width = width ? width: 0;
this.height = height ? height: 0;
}
get right(): number {
return this.left + this.width;
}
get bottom(): number {
return this.top + this.height;
}
set right(value: number) {
this.width = value - this.left;
}
set bottom(value: number) {
this.height = value - this.top;
}
};