add image folder and ne $lib path (FIX)

This commit is contained in:
2025-08-26 23:07:36 +03:00
parent 2fcbaf5fcf
commit 323f6659f9
3 changed files with 2 additions and 31 deletions

View File

Before

Width:  |  Height:  |  Size: 457 KiB

After

Width:  |  Height:  |  Size: 457 KiB

View File

@@ -1,6 +1,7 @@
<script lang="ts">
import domtoimage from "dom-to-image";
import Cropper, { type OnCropCompleteEvent } from "svelte-easy-crop";
import gradiImage from "$lib/images/image.png"
let crop = { x: 0, y: 0 };
let zoom = 1;
@@ -174,7 +175,7 @@
</clipPath>
<pattern id="imagePattern" patternUnits="userSpaceOnUse" width="512" height="512" >
<image href="/src/routes/test/image.png" width="512" height="512"/>
<image href={gradiImage} width="512" height="512"/>
</pattern>
</defs>
<image href={image} width="512" height="512" clip-path="url(#circle-clip)" />

View File

@@ -1,30 +0,0 @@
<script lang="ts">
var text: String = $state()
</script>
<svg width="400" height="200">
<defs>
<pattern id="imagePattern" patternUnits="userSpaceOnUse" width="100" height="100" >
<image href="/src/routes/test/image.png" width="100" height="100"/>
</pattern>
<!-- Определяем путь для текста -->
<path id="textPath" d="M 256,26 a 230,230 0 0,0 0,460 a 230,230 0 0,0 0,-460" fill="none"/>
</defs>
<!-- Отображаем путь (опционально, для визуализации) -->
<path d="M50,100 Q150,50 250,100 T450,100"
fill="none"
stroke="lightgray"
stroke-width="1"
stroke-dasharray="5,5"/>
<!-- Текст по пути -->
<text font-family="Arial" font-size="16" fill="url(#imagePattern)">
<textPath href="#textPath" startOffset="0%">
{text}
</textPath>
</text>
</svg>
<input type="text" bind:value={text}>