本文整理汇总了C++中TextRun::isAntiAlias方法的典型用法代码示例。如果您正苦于以下问题:C++ TextRun::isAntiAlias方法的具体用法?C++ TextRun::isAntiAlias怎么用?C++ TextRun::isAntiAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextRun
的用法示例。
在下文中一共展示了TextRun::isAntiAlias方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawTextBlob
void GrStencilAndCoverTextContext::drawTextBlob(GrContext* context, GrDrawContext* dc,
const GrClip& clip, const SkPaint& skPaint,
const SkMatrix& viewMatrix,
const SkSurfaceProps& props,
const SkTextBlob* skBlob, SkScalar x, SkScalar y,
SkDrawFilter* drawFilter,
const SkIRect& clipBounds) {
if (context->abandoned()) {
return;
}
if (!this->internalCanDraw(skPaint)) {
fFallbackTextContext->drawTextBlob(context, dc, clip, skPaint, viewMatrix, props, skBlob,
x, y, drawFilter, clipBounds);
return;
}
if (drawFilter || skPaint.getPathEffect()) {
// This draw can't be cached.
this->uncachedDrawTextBlob(context, dc, clip, skPaint, viewMatrix, props, skBlob, x, y,
drawFilter, clipBounds);
return;
}
GrPaint paint;
if (!SkPaintToGrPaint(context, dc, skPaint, viewMatrix, &paint)) {
return;
}
const TextBlob& blob = this->findOrCreateTextBlob(skBlob, skPaint);
TextBlob::Iter iter(blob);
for (TextRun* run = iter.get(); run; run = iter.next()) {
// The run's "font" overrides the anti-aliasing of the passed in paint!
paint.setAntiAlias(run->isAntiAlias());
run->draw(context, dc, paint, clip, viewMatrix, props, x, y,
clipBounds, fFallbackTextContext, skPaint);
run->releaseGlyphCache();
}
}