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. javascript的Date操作(月初,月末)

    var cur = new Date(), unitDay = 24 * 60 * 60 * 1000; //月初 var sFirstDay = cur.getFullYear() + '/' + ...

  2. Tomcat学习笔记(十三)

    服务器组件和服务组件 服务器组件 org.apache.catalina.Server接口的实例表示Catalina的整个servlet引擎,包含了所有的组件.使用一种优雅的方法来启动/关闭整个系统, ...

  3. Codeforces 932.A Palindromic Supersequence

    A. Palindromic Supersequence time limit per test 2 seconds memory limit per test 256 megabytes input ...

  4. 乌龟git

    相关操作 链接:http://www.cnblogs.com/hbujt/p/5554038.html 避免乌龟每次输入账户密码 链接:http://www.cnblogs.com/bldf/p/60 ...

  5. [03]使用阿里RAP搭建前端Mock Server

    MockServer可以减少前端开发对后端的依赖,提高前端开发的效率,同时也利于团队的协作. 什么是RAP? RAP是阿里团队出的一款WEB接口管理工具,帮助开发人员更高效的管理接口文档,同时通过分析 ...

  6. Restful 权限的思考

      转自:https://cnodejs.org/topic/551802d3687c387d2f5b2906 基于RESTful API 怎么设计用户权限控制? 原文链接:简书 前言 有人说,每个人 ...

  7. ARM嵌入式开发中的GCC内联汇编__asm__

    在针对ARM体系结构的编程中,一般很难直接使用C语言产生操作协处理器的相关代码,因此使用汇编语言来实现就成为了唯一的选择.但如果完全通过汇编代码实现,又会过于复杂.难以调试.因此,C语言内嵌汇编的方式 ...

  8. C语言.c和.h

    简单的说其实要理解C文件与头文件(即.h)有什么不同之处,首先需要弄明白编译器的工作过程,一般说来编译器会做以下几个过程:       1.预处理阶段 2.词法与语法分析阶段 3.编译阶段,首先编译成 ...

  9. 【ZOJ4062】Plants vs. Zombies(二分)

    题意:有n个植物排成一排,标号为1-n,每株植物有自己的生长速度ai,每对植物浇一次水,该株植物就长高ai, 现在机器人从第0个格子出发,每次走一步,不能停留,每一步浇一次水,总共可以走m步,问最矮的 ...

  10. javascript jquery document.ready window.onload

    网易 博客 下载LOFTER客户端 注册登录  加关注 凡图的编程之路 2012年7月从一个编程新手的点点滴滴 首页 日志 LOFTER 相册 博友 关于我     日志       关于我 Holy ...