Skip to content

Commit

Permalink
Clearer names for foreground/background text style
Browse files Browse the repository at this point in the history
Skia bug: https://buganizer.corp.google.com/issues/279950321
Change-Id: I69ec00a8a6080abbe48f7c9539b4577a93bb246b

Change-Id: I1f173b2e701cc0ff7d369e20daea60bd80fdfe36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/686016
Reviewed-by: Ben Wagner <[email protected]>
Commit-Queue: Julia Lavrova <[email protected]>
  • Loading branch information
Rusino authored and SkCQ committed Apr 28, 2023
1 parent c8da8fb commit cf7d09a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/skparagraph/include/TextStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit cf7d09a

Please sign in to comment.