在线工具
网站地图    收藏    合作   
<

快捷菜单 返回顶部

fabric.js中文API

fabric.js中文在线API,fabric.js中文文档API大全

Class: SprayBrush

fabric.SprayBrush

new SprayBrush()

SprayBrush class SprayBrush类
Source:

Members

density :Number

Density of a spray (number of dots per chunk) 喷雾密度(每块的点数)
Type:
  • Number
Default Value:
  • 20
Source:

dotWidth :Number

Width of spray dots 喷点宽度
Type:
  • Number
Default Value:
  • 1
Source:

dotWidthVariance :Number

Width variance of spray dots 喷点宽度变化
Type:
  • Number
Default Value:
  • 1
Source:

optimizeOverlapping :Boolean

Whether overlapping dots (rectangles) should be removed (for performance reasons) 是否应该删除重叠的点(矩形)(出于性能原因)
Type:
  • Boolean
Default Value:
  • true
Source:

randomOpacity :Boolean

Whether opacity of a dot should be random 点的不透明度是否应该随机
Type:
  • Boolean
Source:

width :Number

Width of a spray 喷淋宽度
Type:
  • Number
Default Value:
  • 10
Source:

Methods

_render()

Render all spray chunks 渲染所有喷雾块
Source:

addSprayChunk(pointer)

Parameters:
Name Type Description
pointer Object
Source:

initialize(canvas) → {fabric.SprayBrush}

Constructor 构造函数
Parameters:
Name Type Description
canvas fabric.Canvas
Source:
Returns:
Instance of a spray brush
Type
fabric.SprayBrush

onMouseDown(pointer)

Invoked on mouse down 按下鼠标调用
Parameters:
Name Type Description
pointer Object
Source:

onMouseMove(pointer)

Invoked on mouse move 鼠标移动时调用
Parameters:
Name Type Description
pointer Object
Source:

onMouseUp()

Invoked on mouse up 鼠标向上调用
Source:

render()

Render new chunk of spray brush 渲染新的喷雾刷块
Source:

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com