add image folder and ne $lib path (FIX)
This commit is contained in:
|
Before Width: | Height: | Size: 457 KiB After Width: | Height: | Size: 457 KiB |
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import domtoimage from "dom-to-image";
|
import domtoimage from "dom-to-image";
|
||||||
import Cropper, { type OnCropCompleteEvent } from "svelte-easy-crop";
|
import Cropper, { type OnCropCompleteEvent } from "svelte-easy-crop";
|
||||||
|
import gradiImage from "$lib/images/image.png"
|
||||||
|
|
||||||
let crop = { x: 0, y: 0 };
|
let crop = { x: 0, y: 0 };
|
||||||
let zoom = 1;
|
let zoom = 1;
|
||||||
@@ -174,7 +175,7 @@
|
|||||||
</clipPath>
|
</clipPath>
|
||||||
|
|
||||||
<pattern id="imagePattern" patternUnits="userSpaceOnUse" width="512" height="512" >
|
<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>
|
</pattern>
|
||||||
</defs>
|
</defs>
|
||||||
<image href={image} width="512" height="512" clip-path="url(#circle-clip)" />
|
<image href={image} width="512" height="512" clip-path="url(#circle-clip)" />
|
||||||
|
|||||||
@@ -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}>
|
|
||||||
Reference in New Issue
Block a user