Documentation: fix drawSimpleText
Change-Id: I72302576824484eadef9f0e1b045e4095fc443e6 Reviewed-on: https://skia-review.googlesource.com/c/184068 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
This commit is contained in:
parent
75294fe3e8
commit
35d1470c71
@ -3900,7 +3900,7 @@ void draw(SkCanvas* canvas) {
|
||||
float textSizes[] = { 12, 18, 24, 36 };
|
||||
for (auto size: textSizes ) {
|
||||
font.setSize(size);
|
||||
canvas->drawText("Aa", 2, kUTF8_SkTextEncoding, 10, 20, font, paint);
|
||||
canvas->drawSimpleText("Aa", 2, kUTF8_SkTextEncoding, 10, 20, font, paint);
|
||||
canvas->translate(0, size * 2);
|
||||
}
|
||||
font.setSize(12);
|
||||
@ -3910,7 +3910,8 @@ void draw(SkCanvas* canvas) {
|
||||
canvas->resetMatrix();
|
||||
canvas->translate(100, 0);
|
||||
canvas->scale(scale, scale);
|
||||
canvas->drawText("Aa", 2, kUTF8_SkTextEncoding, 10 / scale, yPos / scale, font, paint);
|
||||
canvas->drawSimpleText("Aa", 2, kUTF8_SkTextEncoding,
|
||||
10 / scale, yPos / scale, font, paint);
|
||||
yPos += size * 2;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user