rustq / vue-skia

Skia based 2d graphics vue rendering library. It is based on Rust to implement software rasterization to perform rendering. 基于 Skia 的 2D 图形 Vue 渲染库 —— 使用 Rust 语言实现纯软件光栅化
https://vue-skia.netlify.app
MIT License
293 stars 12 forks source link

feat: v-group #7

Closed boenfu closed 1 year ago

boenfu commented 1 year ago

5

  1. 基础嵌套,属性继承 group-basic 支持 x,y 的偏移及其他形状的验证 group-rect

  2. 简单的 group shape clip 支持 group-clip

  3. playground 小功能,把代码加到 url 上,方便分享 20230810100956_rec_

meloalright commented 1 year ago

强哇!

meloalright commented 1 year ago

我周六晚上看下

meloalright commented 1 year ago

很好的例子 我备忘一下

<v-surface :width="360" :height="360">
  <v-group color="'yellow'" :style="'fill'" :strokeWidth="6">
  <v-circle :cx="100" :cy="160" :r="50" :color="'fuchsia'" />
  <v-group :x="40" :y="40" color="blue" :style="'stroke'">
    <v-circle :cx="100" :cy="160" :r="50" :style="'fill'"/>
    <v-circle :cx="100" :cy="160" :r="70"/>
  </v-group>
  </v-group>
</v-surface>
meloalright commented 1 year ago
  <v-group :x="140" :y="40" color="blue" :style="'stroke'" :invertClip="true">
    <template #clip>
      <v-circle :cx="110" :cy="170" :r="40"/>
    </template>
    <v-circle :cx="100" :cy="160" :r="50" :style="'fill'"/>
    <v-circle :cx="100" :cy="160" :r="70"/>
  </v-group>

很好的例子 我备忘一下

meloalright commented 1 year ago
截屏2023-08-13 12 59 28

我貌似玩出来了什么不得了的图形

meloalright commented 1 year ago

merged!