Hi ,I want to draw underline for my text. I have set TextDecoration::kUnderline in Textstyle. I can get desired text with properties set in Textstyle like fontsize, foregroundcolor but underline alone is not drawn. Am i missing something?below is my code.--SkPaint paint = SkPaint();
paint.setColor(SkColorSetRGB(0, 0, 25));
paint.setStyle(SkPaint::kFill_Style);
ParagraphStyle paraStyle;
TextStyle textStyle;
textStyle.setForegroundColor(paint);
textStyle.setFontSize(13*scale);
textStyle.setDecoration(TextDecoration::kUnderline); paraStyle.setTextAlign(skia::textlayout::TextAlign::kCenter);
auto fontCollection = sk_make_sp<FontCollection>();
fontCollection->setDefaultFontManager(SkFontMgr::RefDefault());
auto builder = ParagraphBuilderImpl::make(paraStyle, fontCollection);
builder->pushStyle(textStyle);
std::string text = "Hellobuddy";
builder->addText(text.c_str(), text.length());
auto para = builder->Build();
para.get()->layout(80);
auto rect = SkRect();
rect.fTop = y;
rect.fLeft = x;
rect.fBottom = y+rowHt;
rect.fRight = x+colWidth-1;
canvas->save();
canvas->clipRect(rect);
para.get()->paint(canvas, x, y);
canvas->restore();
Thanks in advance
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/4ec28eb5-123a-450b-9d20-2cf9266bf467n%40googlegroups.com.