updates
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f976829ba3
commit
e9512d2529
Binary file not shown.
13
src/App.vue
13
src/App.vue
|
@ -82,15 +82,16 @@ const savePng = async () => {
|
||||||
<Page>
|
<Page>
|
||||||
<div id="typeSelector">
|
<div id="typeSelector">
|
||||||
<Button :size="ButtonSize.Small"
|
<Button :size="ButtonSize.Small"
|
||||||
:active="typeSelector == 'rus' && vRotation == 65 && vMargin == 15 && hMargin == 40 && hMargin2 == 20 && imageWidth == 210 && imageHeight == 297"
|
:active="typeSelector == 'rus' && vRotation == 65 && vMargin == 3 && hMargin == 8 && hMargin2 == 4 && imageWidth == 148 && imageHeight == 210 && marginEnable == true"
|
||||||
:click="() => {
|
:click="() => {
|
||||||
typeSelector = 'rus';
|
typeSelector = 'rus';
|
||||||
vRotation = 65;
|
vRotation = 65;
|
||||||
vMargin = 15;
|
vMargin = 3;
|
||||||
hMargin = 40;
|
hMargin = 8;
|
||||||
hMargin2 = 20;
|
hMargin2 = 4;
|
||||||
imageWidth = 210;
|
imageWidth = 148;
|
||||||
imageHeight = 297;
|
imageHeight = 210;
|
||||||
|
marginEnable = true;
|
||||||
}">Тетрадь в линию</Button>
|
}">Тетрадь в линию</Button>
|
||||||
<Button :size="ButtonSize.Small"
|
<Button :size="ButtonSize.Small"
|
||||||
:active="typeSelector == 'rus' && vRotation == 90 && vMargin == 30 && hMargin == 30 && hMargin2 == 30 && imageWidth == 210 && imageHeight == 297"
|
:active="typeSelector == 'rus' && vRotation == 90 && vMargin == 30 && hMargin == 30 && hMargin2 == 30 && imageWidth == 210 && imageHeight == 297"
|
||||||
|
|
|
@ -93,6 +93,10 @@ const render = () => {
|
||||||
ctx.value.lineTo(x, imageHeightPx);
|
ctx.value.lineTo(x, imageHeightPx);
|
||||||
ctx.value.stroke();
|
ctx.value.stroke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ctx.value.font = hMargins[1] * 3 * ONE_MM + "px propisi"; // todo хз почему тут x3
|
||||||
|
// ctx.value.fillStyle = "#cccccc";
|
||||||
|
// ctx.value.fillText("Привет мир", 100, (hMargins[0] + hMargins[1]) * ONE_MM);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -103,6 +107,12 @@ onMounted(() => {
|
||||||
ctx.value = canvas.getContext("2d");
|
ctx.value = canvas.getContext("2d");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var f = new FontFace('propisi', 'url(/fonts/ttf/propisi.ttf)');
|
||||||
|
f.load().then(function (font) {
|
||||||
|
console.log('font propisi ready');
|
||||||
|
document.fonts.add(font);
|
||||||
|
});
|
||||||
|
|
||||||
render();
|
render();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue