72c9faab45
This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
59 lines
1.3 KiB
C++
59 lines
1.3 KiB
C++
/*
|
|
* Copyright 2013 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "gm.h"
|
|
#include "SkCanvas.h"
|
|
#include "SkPath.h"
|
|
|
|
/**
|
|
* Skia may draw from outlines when the size is very large, so we exercise that
|
|
* here.
|
|
*/
|
|
|
|
class BigTextGM : public skiagm::GM {
|
|
public:
|
|
BigTextGM() {}
|
|
|
|
protected:
|
|
uint32_t onGetFlags() const SK_OVERRIDE {
|
|
return kSkipTiled_Flag;
|
|
}
|
|
|
|
SkString onShortName() SK_OVERRIDE {
|
|
return SkString("bigtext");
|
|
}
|
|
|
|
SkISize onISize() SK_OVERRIDE {
|
|
return SkISize::Make(640, 480);
|
|
}
|
|
|
|
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
|
|
SkPaint paint;
|
|
paint.setAntiAlias(true);
|
|
sk_tool_utils::set_portable_typeface(&paint);
|
|
paint.setTextSize(1500);
|
|
|
|
SkRect r;
|
|
(void)paint.measureText("/", 1, &r);
|
|
SkPoint pos = {
|
|
this->width()/2 - r.centerX(),
|
|
this->height()/2 - r.centerY()
|
|
};
|
|
|
|
paint.setColor(SK_ColorRED);
|
|
canvas->drawText("/", 1, pos.fX, pos.fY, paint);
|
|
|
|
paint.setColor(SK_ColorBLUE);
|
|
canvas->drawPosText("\\", 1, &pos, paint);
|
|
}
|
|
|
|
private:
|
|
typedef skiagm::GM INHERITED;
|
|
};
|
|
|
|
DEF_GM( return SkNEW(BigTextGM); )
|