Test text rendering

This commit is contained in:
2026-03-29 10:15:22 -05:00
parent ea898da6c2
commit 1c5e50cc4d
10 changed files with 503 additions and 81 deletions

View File

@@ -151,23 +151,24 @@
const getValues = () => {
if(!pixels) return null;
const right = parseInt(elRight.value) || 0;
const bottom = parseInt(elBottom.value) || 0;
let tileWidth, tileHeight, columnCount, rowCount;
if(elDefineBySize.checked) {
console.log('Defining by size');
tileWidth = parseInt(elTileWidth.value) || 0;
tileHeight = parseInt(elTileHeight.value) || 0;
columnCount = Math.floor(imageWidth / tileWidth);
rowCount = Math.floor(imageHeight / tileHeight);
columnCount = Math.floor((imageWidth - right) / tileWidth);
rowCount = Math.floor((imageHeight - bottom) / tileHeight);
} else {
console.log('Defining by count');
columnCount = parseInt(elColumnCount.value) || 0;
rowCount = parseInt(elRowCount.value) || 0;
tileWidth = Math.floor(imageWidth / columnCount);
tileHeight = Math.floor(imageHeight / rowCount);
tileWidth = Math.floor((imageWidth - right) / columnCount);
tileHeight = Math.floor((imageHeight - bottom) / rowCount);
}
const right = parseInt(elRight.value) || 0;
const bottom = parseInt(elBottom.value) || 0;
const scale = parseInt(elScale.value) || 1;
const scaledWidth = imageWidth * scale;