在 php 中打印带镜子、折叠、划痕边框的画布

问题描述

我正在处理一个项目,我想在打印前在其中显示画布预览。我给了一些选择边框的选项,如拉伸、折叠、镜像等。我显示这样的边缘。我使用以下代码在画布上显示图像。

class Human:
    def get():
      print("OK")

class Person(Human):
  def printw(a,b):
    print("ayush")

x = hasattr(Person,'get')

print(x)

下面是js代码

<canvas id="myCanvas" width="400" height="400"></canvas>
<div style="display:none;">
   <img id="source" src="image/img1.png" width="300" height="300">
   <img id="frame" src="image/img1.png" width="132" height="150">
</div>

它给了我以下输出

enter image description here

但我实际上想在用户选择 scrached

enter image description here

显示如下设计的图像

像这样镜像

enter image description here

是否可以在画布上进行或有任何其他库

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)