transformStyle method
Applies this matrix to style.
Implementation
UvStyle transformStyle(
UvStyle style, {
bool foreground = true,
bool background = true,
bool underlineColor = true,
}) {
if (style.isZero || isIdentity) return style;
final fg = foreground ? transformColor(style.fg) : style.fg;
final bg = background ? transformColor(style.bg) : style.bg;
final uc = underlineColor
? transformColor(style.underlineColor)
: style.underlineColor;
if (fg == style.fg && bg == style.bg && uc == style.underlineColor) {
return style;
}
return UvStyle(
fg: fg,
bg: bg,
underlineColor: uc,
underline: style.underline,
attrs: style.attrs,
);
}