-
Notifications
You must be signed in to change notification settings - Fork 74
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
字体颜色设置不生效,请问是什么问题呢? #17
Comments
尝试这样看看会不会生效: |
您好 我修改完之后 未生效 您看我是哪里修改错误了么 【字体颜色还是 黑色的】
let mc = new MC({
// width: 1000,
// height: 1000,
// backgroundColor: 'black',
});
// background : 准备底图;提供多种模式
mc.background(bg, {
left: 0,
top: 0,
color: '#FFFFFF',
type: 'origin',
})
// add 添加图片素材基础函数;
.add(userHeadImg, {
width: 130,
height: 130,
pos: {
x: 30,
y: 30,
rotate: 1,
},
})
// add 添加图片素材基础函数;
.add(ercode, {
width: 200,
pos: {
x: 515,
y: 1090,
},
})
// text 添加文字数据基础函数;
.text('MyUserName' ,{
width: '300px',
pos: {
x: 180,
y: 50,
},
})
.text('HELLO WORLD', {
width: '300px',
smallStyle:{
color:'#ffffff',
font:'50px Microsoft YaHei,sans-serif',
},
pos: {
x: 180,
y: 90,
},
})
// draw 最终绘制函数,用于最终的绘制;
.draw(b64 => {
that.$data.shareCanvasImg = b64
});
…------------------ 原始邮件 ------------------
发件人: "郭东东(Tayde Guo)"<notifications@github.com>;
发送时间: 2019年5月9日(星期四) 下午5:45
收件人: "xd-tayde/mcanvas"<mcanvas@noreply.github.com>;
抄送: "吃着皮皮虾的超哥"<916118932@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [xd-tayde/mcanvas] 字体颜色设置不生效,请问是什么问题呢? (#17)
尝试这样看看会不会生效:
smallStyle:{
color:'#ffffff',
font:'50px Microsoft YaHei,sans-serif',
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
哦。~我知道了。 .text('HELLO WORLD') 对应的是 normalStyle。。 你写的 smallStyle 需要使用 .text('<s>HELLO WORLD</s>') |
感谢感谢 问题已经解决了 给大佬点赞 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
let mc = new MC({
// width: 1000,
// height: 1000,
// backgroundColor: 'black',
});
The text was updated successfully, but these errors were encountered: