Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

画圆的时候多了一条半径长度的边框 #9

Closed
xcchcaptain opened this issue Dec 5, 2017 · 4 comments
Closed

画圆的时候多了一条半径长度的边框 #9

xcchcaptain opened this issue Dec 5, 2017 · 4 comments

Comments

@xcchcaptain
Copy link

xcchcaptain commented Dec 5, 2017

image
let epotinNo=new Shape('circle',{x:60,y:300,r:35,strokeStyle:"#cecece",lineWidth:3},'stroke',false);
我想要的就是一个圆,多了个半径,不知道怎么解决呢。
画一个圆弧页会遇到同样的问题
难道需要再画一层盖住么 o(╯□╰)o

@bobiscool
Copy link
Owner

都不喜欢那条线呀 。。好的 明天解决

@xcchcaptain
Copy link
Author

xcchcaptain commented Dec 6, 2017

首先感谢作者
不是不喜欢,主要是和官方的 api行为不一样
多余的这条线,需要完全可以让用户自己去加的啦
另外想问问 ,你怎么做到控制层级的呢,官方的api中好像没看到有控制层级的

@bobiscool
Copy link
Owner

已经改了 添加一个 closePath 选项 默认为 false 也就不会添加那条线了
设置为 true 就会添加那条线。

图层这个是我自己设计出来的,canvas 本来就没有图层这个概念,需要用代码来实现

@xcchcaptain
Copy link
Author

@bobiscool 感谢你及时的回复
建议 :把 canvasContext暴露出来,canvas转图片是一个很常用的业务场景

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants