mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
update site to use SkFont for text fields (#7464)
This commit is contained in:
committed by
Brian Osman
parent
e68a3fa912
commit
fea645b801
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user