提交 fea645b8 编写于 作者: R reed-at-google 提交者: Brian Osman

update site to use SkFont for text fields (#7464)

上级 e68a3fa9
......@@ -7,6 +7,7 @@
#include <string>
#include "flutter/flow/layers/performance_overlay_layer.h"
#include "third_party/skia/include/core/SkFont.h"
namespace flow {
namespace {
......@@ -15,12 +16,13 @@ void DrawStatisticsText(SkCanvas& canvas,
const std::string& string,
int x,
int y) {
SkFont font;
font.setSize(15);
font.setLinearMetrics(false);
SkPaint paint;
paint.setTextSize(15);
paint.setLinearText(false);
paint.setColor(SK_ColorGRAY);
paint.setAntiAlias(true);
canvas.drawText(string.c_str(), string.size(), x, y, paint);
canvas.drawSimpleText(string.c_str(), string.size(), kUTF8_SkTextEncoding, x,
y, font, paint);
}
void VisualizeStopWatch(SkCanvas& canvas,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册