哈哈,水印字体竟如此简单
直接上代码
- 透明度设置
- 旋转角度设置
// 水印字体
Text {
id: watermark;
// 锚布局
anchors.centerIn: parent;
// 透明度
opacity: 0.1;
// 内容
text: qsTr("客户端");
// 文本颜色
color: "#ffc0c0c0";
// 字体设置
font.pixelSize: 200;
//
// 转换: 角度旋转
transform: Rotation {
id: rotation;
origin{// 轴心
x: watermark.width/2;
y: watermark.height/2;
}
axis{// 轴
x: 0;
y: 0;
z: 1;
}
angle: 30;
}
}