File size: 1,186 Bytes
89ce340 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
<template>
<div class="image-outline">
<ImageRectOutline
v-if="clipShape.type === 'rect'"
:width="elementInfo.width"
:height="elementInfo.height"
:radius="clipShape.radius"
:outline="elementInfo.outline"
/>
<ImageEllipseOutline
v-else-if="clipShape.type === 'ellipse'"
:width="elementInfo.width"
:height="elementInfo.height"
:outline="elementInfo.outline"
/>
<ImagePolygonOutline
v-else-if="clipShape.type === 'polygon'"
:width="elementInfo.width"
:height="elementInfo.height"
:outline="elementInfo.outline"
:createPath="clipShape.createPath!"
/>
</div>
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import type { PPTImageElement } from '@/types/slides'
import useClipImage from '../useClipImage'
import ImageRectOutline from './ImageRectOutline.vue'
import ImageEllipseOutline from './ImageEllipseOutline.vue'
import ImagePolygonOutline from './ImagePolygonOutline.vue'
const props = defineProps<{
elementInfo: PPTImageElement
}>()
const imageElement = computed(() => props.elementInfo)
const { clipShape } = useClipImage(imageElement)
</script> |