let line1 = new fabric.Line([lineleft, lineheight, lineleft, 0],
{//终止位置,线长,起始位置,top,这里是从项目中截下来的我用了变量代替,你要用的话lineheight和lineleft用自己的变量或者数字代替。如果两个终止位置和起始位置的数值一样那么这个线条会垂直,这个应该很好理解。
fill: '#5E2300',//填充颜色
stroke: '#5E2300',//笔触颜色
strokeWidth: 2,//笔触宽度
hasControls: false, //选中时是否可以放大缩小
hasRotatingPoint: false,//选中时是否可以旋转
hasBorders:false,//选中时是否有边框
transparentCorners:true,
perPixelTargetFind:true,//默认false。当设置为true,对象的检测会以像互点为基础,而不是以边界的盒模型为基础。
selectable:true,//是否可被选中
lockMovementX: true,//X轴是否可被移动(true为不可,因为前缀是lock)
lockMovementY: true,//Y轴是否可被移动(true为不可,因为前缀是lock)
});

fabricjs line的更多相关文章

  1. ILJMALL project过程中遇到Fragment嵌套问题:IllegalArgumentException: Binary XML file line #23: Duplicate id

    出现场景:当点击"分类"再返回"首页"时,发生error退出   BUG描述:Caused by: java.lang.IllegalArgumentExcep ...

  2. Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.

    启动tomcat, 出现, ( 之前都是好好的... ) [lk ] ERROR [08-12 15:10:02] [main] org.springframework.web.context.Con ...

  3. 关于xml加载提示: Error on line 1 of document : 前言中不允许有内容

    我是在java中做的相关测试, 首先粘贴下报错: 读取xml配置文件:xmls\property.xml org.dom4j.DocumentException: Error on line 1 of ...

  4. Eclipse "Unable to install breakpoint due to missing line number attributes..."

    Eclipse 无法找到 该 断点,原因是编译时,字节码改变了,导致eclipse无法读取对应的行了 1.ANT编译的class Eclipse不认,因为eclipse也会编译class.怎么让它们统 ...

  5. Linix登录报"/etc/profile: line 11: syntax error near unexpected token `$'{\r''"

    同事反馈他在一测试服务器(CentOS Linux release 7.2.1511)上修改了/etc/profile文件后,使用source命令不能生效,让我帮忙看看,结果使用SecureCRT一登 ...

  6. [LeetCode] Line Reflection 直线对称

    Given n points on a 2D plane, find if there is such a line parallel to y-axis that reflect the given ...

  7. [LeetCode] Tenth Line 第十行

    How would you print just the 10th line of a file? For example, assume that file.txt has the followin ...

  8. [LeetCode] Max Points on a Line 共线点个数

    Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. ...

  9. "Installation failed !" in GUI but not in CLI (/usr/bin/winusb: line 78: 18265 Terminated )

    "Installation failed !" in GUI but not in CLI (/usr/bin/winusb: line 78: 18265 Terminated ...

随机推荐

  1. BZOJ1176 [Balkan2007]Mokia 【CDQ分治】

    题目 维护一个W*W的矩阵,初始值均为S.每次操作可以增加某格子的权值,或询问某子矩阵的总权值.修改操作数M<=160000,询问数Q<=10000,W<=2000000. 输入格式 ...

  2. CSU 2031

    2031: Barareh on Fire Submit Page   Summary   Time Limit: 3 Sec     Memory Limit: 512 Mb     Submitt ...

  3. Echarts 基础知识浅析

    1. 引入Echarts Echarts是基于canvas的数据可视化产品,由百度公司推出 参考官方文档,引入教程示例即可,注意有两种引入方式: (1)直接引入 (2)模块化引入 2. 基本API使用 ...

  4. template.js 模板引擎

    例子: html代码: <div id="box"></div> css代码: table{ border-collapse: collapse; text ...

  5. POST JSON fails with 415 Unsupported media type, SpringMVC

    网上的解决办法非常多,但是大多不靠谱. 归结原因:SpringMVC 无法通过 httprequest headers 中的 Content-Type 和 Accept 匹配到对应的HttpMessa ...

  6. 【TEST】NOI-Linux可用 gedit c++精简配置 附Emacs日常配置

    这里是backup的测试随笔,用于测试 CSS / Markdown 效果. 同时也是是本菜鸡考场上一般使用的Gedit配置. 只有6行,挺短的.应该算好记吧. 使用之前记得勾选首选项里的外部工具. ...

  7. haskell处理JSON(aeson)

    aeson是haskell的一个库,其实我也不太懂,不过大概是这样的:   定义一个类型 如   data Person = Person { firstName :: String , lastNa ...

  8. matlab sqlite

    转自: http://www.douban.com/note/359606646/和http://blog.csdn.net/yinxing408033943/article/details/7677 ...

  9. 配置wpa_supplicant调试wifi linux下命令行连接wifi

    调试wpa_supplicant先读一下对应的README.txt文件.根据README.txt修改编译配置. wpa_supplicant需要打开以下开关进行编译CONFIG_DRIVER_NL80 ...

  10. linux题目整理(二)

    1.如何过滤出已知当前目录下oldboy中的所有一级目录(不包含子目录,即只能是一级目录) 方法1:find ./ -type d -maxdepth 1方法2:ls -F方法3:ls -l  | g ...