diff --git a/modules/skparagraph/include/TextStyle.h b/modules/skparagraph/include/TextStyle.h index e6f0ae46302d..b4608389bb68 100644 --- a/modules/skparagraph/include/TextStyle.h +++ b/modules/skparagraph/include/TextStyle.h @@ -173,10 +173,12 @@ class TextStyle { ParagraphPainter::SkPaintOrID getForegroundPaintOrID() const { return fForeground; } - void setForegroundColor(SkPaint paint) { + void setForegroundPaint(SkPaint paint) { fHasForeground = true; fForeground = std::move(paint); } + // DEPRECATED: prefer `setForegroundPaint`. + void setForegroundColor(SkPaint paint) { setForegroundPaint(paint); } // Set the foreground to a paint ID. This is intended for use by clients // that implement a custom ParagraphPainter that can not accept an SkPaint. void setForegroundPaintID(ParagraphPainter::PaintID paintID) { @@ -193,10 +195,12 @@ class TextStyle { ParagraphPainter::SkPaintOrID getBackgroundPaintOrID() const { return fBackground; } - void setBackgroundColor(SkPaint paint) { + void setBackgroundPaint(SkPaint paint) { fHasBackground = true; fBackground = std::move(paint); } + // DEPRECATED: prefer `setBackgroundPaint`. + void setBackgroundColor(SkPaint paint) { setBackgroundPaint(paint); } void setBackgroundPaintID(ParagraphPainter::PaintID paintID) { fHasBackground = true; fBackground = paintID;