mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 02:46:20 +00:00
wip
This commit is contained in:
parent
1579be27cc
commit
b3871c8bfc
@ -284,11 +284,14 @@ class CanvasKit {
|
|||||||
for (const paragraphText of child.children) {
|
for (const paragraphText of child.children) {
|
||||||
if (paragraphText.text === '') continue;
|
if (paragraphText.text === '') continue;
|
||||||
for (const fill of paragraphText.fills) {
|
for (const fill of paragraphText.fills) {
|
||||||
|
const color = this.CanvasKit.parseColorString(fill["fill-color"]);
|
||||||
|
color[3] = fill["fill-opacity"];
|
||||||
|
const decoration = this.getTextDecorationFromString(paragraphText["text-decoration"]);
|
||||||
const paragraphStyle = new this.CanvasKit.ParagraphStyle({
|
const paragraphStyle = new this.CanvasKit.ParagraphStyle({
|
||||||
textDirection,
|
textDirection,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: this.CanvasKit.parseColorString(fill["fill-color"]),
|
color,
|
||||||
decoration: this.getTextDecorationFromString(paragraphText["text-decoration"]),
|
decoration,
|
||||||
fontFamilies: [paragraphText["font-family"]],
|
fontFamilies: [paragraphText["font-family"]],
|
||||||
fontSize: parseInt(paragraphText["font-size"], 10),
|
fontSize: parseInt(paragraphText["font-size"], 10),
|
||||||
/*
|
/*
|
||||||
@ -353,6 +356,9 @@ class CanvasKit {
|
|||||||
case "group":
|
case "group":
|
||||||
this.drawGroup(canvas, object);
|
this.drawGroup(canvas, object);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
console.warn("Unknown object type", object.type);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
canvas.restore();
|
canvas.restore();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user