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. BZOJ1296 [SCOI2009]粉刷匠 【dp】

    题目 windy有 N 条木板需要被粉刷. 每条木板被分为 M 个格子. 每个格子要被刷成红色或蓝色. windy每次粉刷,只能选择一条木板上一段连续的格子,然后涂上一种颜色. 每个格子最多只能被粉刷 ...

  2. Educational Codeforces Round 2 A. Extract Numbers

    打开题目链接 题意:输入一个字符串,用,或:分隔输出字符串和整数(不含前导0和浮点数) ACcode: #include <iostream> #include <cstdio> ...

  3. Java面试题之CyclicBarrier和CountDownLatch的区别

    1.CyclicBarrier的某个线程运行到某个点后停止运行,直到所有线程都达到同一个点,所有线程才会重新运行: CountDownLatch线程运行到某个点后,计数值-1,该线程继续运行,直到计数 ...

  4. atan 和 atan2

     转自http://blog.csdn.net/chinabinlang/article/details/6802686 atan函数与atan2函数的一点区别 . atan 和 atan2 都是求反 ...

  5. CodeVS1611_APIO2009_抢掠计划_C++

    题目:http://codevs.cn/problem/1611/ 关于题解请戳这里:http://www.cnblogs.com/hadilo/p/5892765.html 下面给一个可以A的代码, ...

  6. zmap zgrab 环境搭建

    yum install cmake gmp-devel gengetopt libpcap-devel flex byacc json-c-devel libunistring-devel golan ...

  7. 全文索引CONTAINS语法

    Like直接在数据据中查找可以查到所有所需记录但是会扫描整个表会影响性能CONTAINS是基于全文索引进行查询,查询结果受系统全文索引分词的方法影响查询结果会不全.Select * FROM A Wh ...

  8. react setState里的作用域

    从接触racet开始,我们就认识了setState,它是对全局变量进去更新的一个重要方法, 不仅可以更新数据,还能在更新后执行方法时直接调用刚刚更新的数据 今天碰到的问题就在于它的作用域的先后问题 先 ...

  9. Closest Binary Search Tree Value -- LeetCode

    Given a non-empty binary search tree and a target value, find the value in the BST that is closest t ...

  10. POJ 3713 Transferring Sylla (三连通图)

    [题目链接] http://poj.org/problem?id=3713 [题目大意] 给出一个图判断是不是三连通图,三连通图的意思是对于图中任意两点, 至少有三条路是可以相互连通的. [题解] 我 ...