2011-07-28 14:26:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2018-09-19 15:31:27 +00:00
|
|
|
|
2018-08-08 15:36:17 +00:00
|
|
|
#include "Sample.h"
|
2018-09-19 15:31:27 +00:00
|
|
|
|
|
|
|
#include "DecodeFile.h"
|
2008-12-17 15:59:43 +00:00
|
|
|
#include "Sk1DPathEffect.h"
|
|
|
|
#include "Sk2DPathEffect.h"
|
2018-09-19 15:31:27 +00:00
|
|
|
#include "SkBlurMask.h"
|
2008-12-17 15:59:43 +00:00
|
|
|
#include "SkBlurMaskFilter.h"
|
2018-09-19 15:31:27 +00:00
|
|
|
#include "SkCanvas.h"
|
2016-01-11 20:34:04 +00:00
|
|
|
#include "SkColorMatrixFilter.h"
|
2008-12-17 15:59:43 +00:00
|
|
|
#include "SkColorPriv.h"
|
|
|
|
#include "SkCornerPathEffect.h"
|
|
|
|
#include "SkDashPathEffect.h"
|
|
|
|
#include "SkDiscretePathEffect.h"
|
|
|
|
#include "SkEmbossMaskFilter.h"
|
|
|
|
#include "SkGradientShader.h"
|
|
|
|
#include "SkMath.h"
|
|
|
|
#include "SkPath.h"
|
|
|
|
#include "SkPathMeasure.h"
|
|
|
|
#include "SkPicture.h"
|
2018-09-19 15:31:27 +00:00
|
|
|
#include "SkPictureRecorder.h"
|
2008-12-17 15:59:43 +00:00
|
|
|
#include "SkRandom.h"
|
2018-09-19 15:31:27 +00:00
|
|
|
#include "SkReadBuffer.h"
|
|
|
|
#include "SkRegion.h"
|
|
|
|
#include "SkShader.h"
|
2008-12-17 15:59:43 +00:00
|
|
|
#include "SkTypeface.h"
|
2018-08-21 15:45:46 +00:00
|
|
|
#include "SkUTF.h"
|
2018-09-19 15:31:27 +00:00
|
|
|
#include "SkWriteBuffer.h"
|
2008-12-17 15:59:43 +00:00
|
|
|
|
|
|
|
#include <math.h>
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
class Dot2DPathEffect : public Sk2DPathEffect {
|
|
|
|
public:
|
|
|
|
Dot2DPathEffect(SkScalar radius, const SkMatrix& matrix)
|
|
|
|
: Sk2DPathEffect(matrix), fRadius(radius) {}
|
|
|
|
|
|
|
|
protected:
|
2015-03-26 01:17:31 +00:00
|
|
|
void next(const SkPoint& loc, int u, int v, SkPath* dst) const override {
|
2008-12-17 15:59:43 +00:00
|
|
|
dst->addCircle(loc.fX, loc.fY, fRadius);
|
|
|
|
}
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2015-03-26 01:17:31 +00:00
|
|
|
void flatten(SkWriteBuffer& buffer) const override {
|
2012-03-29 15:18:04 +00:00
|
|
|
this->INHERITED::flatten(buffer);
|
|
|
|
buffer.writeScalar(fRadius);
|
|
|
|
}
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
private:
|
2018-10-18 21:27:16 +00:00
|
|
|
SK_FLATTENABLE_HOOKS(Dot2DPathEffect)
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
SkScalar fRadius;
|
|
|
|
|
|
|
|
typedef Sk2DPathEffect INHERITED;
|
|
|
|
};
|
|
|
|
|
2018-08-08 15:36:17 +00:00
|
|
|
class DemoView : public Sample {
|
2008-12-17 15:59:43 +00:00
|
|
|
public:
|
2011-05-02 17:33:45 +00:00
|
|
|
DemoView() {}
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
protected:
|
2018-08-08 15:36:17 +00:00
|
|
|
virtual bool onQuery(Sample::Event* evt) {
|
|
|
|
if (Sample::TitleQ(*evt)) {
|
|
|
|
Sample::TitleR(evt, "Demo");
|
2008-12-17 15:59:43 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return this->INHERITED::onQuery(evt);
|
|
|
|
}
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2011-05-05 01:59:48 +00:00
|
|
|
virtual bool onClick(Click* click) {
|
2008-12-17 15:59:43 +00:00
|
|
|
return this->INHERITED::onClick(click);
|
|
|
|
}
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2011-05-05 01:59:48 +00:00
|
|
|
void makePath(SkPath& path) {
|
2008-12-17 15:59:43 +00:00
|
|
|
path.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(20),
|
|
|
|
SkPath::kCCW_Direction);
|
|
|
|
for (int index = 0; index < 10; index++) {
|
2013-11-25 19:44:07 +00:00
|
|
|
SkScalar x = (float) cos(index / 10.0f * 2 * 3.1415925358f);
|
|
|
|
SkScalar y = (float) sin(index / 10.0f * 2 * 3.1415925358f);
|
2008-12-17 15:59:43 +00:00
|
|
|
x *= index & 1 ? 7 : 14;
|
|
|
|
y *= index & 1 ? 7 : 14;
|
|
|
|
x += SkIntToScalar(20);
|
|
|
|
y += SkIntToScalar(20);
|
|
|
|
if (index == 0)
|
|
|
|
path.moveTo(x, y);
|
|
|
|
else
|
|
|
|
path.lineTo(x, y);
|
|
|
|
}
|
|
|
|
path.close();
|
|
|
|
}
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2011-05-05 01:59:48 +00:00
|
|
|
virtual void onDrawContent(SkCanvas* canvas) {
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->save();
|
2014-04-13 19:09:42 +00:00
|
|
|
this->drawPicture(canvas, 0);
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->restore();
|
|
|
|
|
|
|
|
{
|
2014-04-13 19:09:42 +00:00
|
|
|
SkPictureRecorder recorder;
|
|
|
|
{
|
2015-08-27 14:41:13 +00:00
|
|
|
SkCanvas* record = recorder.beginRecording(320, 480, nullptr, 0);
|
2014-04-13 19:09:42 +00:00
|
|
|
this->drawPicture(record, 120);
|
|
|
|
}
|
2016-03-18 14:25:55 +00:00
|
|
|
sk_sp<SkPicture> picture(recorder.finishRecordingAsPicture());
|
2014-04-13 19:09:42 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->translate(0, SkIntToScalar(120));
|
|
|
|
|
|
|
|
SkRect clip;
|
|
|
|
clip.set(0, 0, SkIntToScalar(160), SkIntToScalar(160));
|
|
|
|
do {
|
|
|
|
canvas->save();
|
|
|
|
canvas->clipRect(clip);
|
2014-09-04 15:42:50 +00:00
|
|
|
picture->playback(canvas);
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->restore();
|
|
|
|
if (clip.fRight < SkIntToScalar(320))
|
|
|
|
clip.offset(SkIntToScalar(160), 0);
|
|
|
|
else if (clip.fBottom < SkIntToScalar(480))
|
|
|
|
clip.offset(-SkIntToScalar(320), SkIntToScalar(160));
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
} while (true);
|
|
|
|
}
|
|
|
|
}
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2011-05-05 01:59:48 +00:00
|
|
|
void drawPicture(SkCanvas* canvas, int spriteOffset) {
|
2012-08-23 18:19:56 +00:00
|
|
|
SkMatrix matrix; matrix.reset();
|
|
|
|
SkPaint paint;
|
|
|
|
SkPath path;
|
2008-12-17 15:59:43 +00:00
|
|
|
SkPoint start = {0, 0};
|
|
|
|
SkPoint stop = { SkIntToScalar(40), SkIntToScalar(40) };
|
2012-08-23 18:19:56 +00:00
|
|
|
SkRect rect = {0, 0, SkIntToScalar(40), SkIntToScalar(40) };
|
|
|
|
SkRect rect2 = {0, 0, SkIntToScalar(65), SkIntToScalar(20) };
|
|
|
|
SkScalar left = 0, top = 0, x = 0, y = 0;
|
2014-01-27 13:42:58 +00:00
|
|
|
int index;
|
2012-08-23 18:19:56 +00:00
|
|
|
|
|
|
|
char ascii[] = "ascii...";
|
2014-01-27 13:42:58 +00:00
|
|
|
int asciiLength = sizeof(ascii) - 1;
|
2012-08-23 18:19:56 +00:00
|
|
|
char utf8[] = "utf8" "\xe2\x80\xa6";
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
makePath(path);
|
2017-10-17 21:33:44 +00:00
|
|
|
SkTDArray<SkPoint> pos;
|
2012-08-23 18:19:56 +00:00
|
|
|
pos.setCount(asciiLength);
|
|
|
|
for (index = 0; index < asciiLength; index++)
|
|
|
|
pos[index].set(SkIntToScalar((unsigned int)index * 10),
|
2012-05-17 15:38:00 +00:00
|
|
|
SkIntToScalar((unsigned int)index * 2));
|
2017-10-17 21:33:44 +00:00
|
|
|
SkTDArray<SkPoint> pos2;
|
2012-08-23 18:19:56 +00:00
|
|
|
pos2.setCount(asciiLength);
|
|
|
|
for (index = 0; index < asciiLength; index++)
|
|
|
|
pos2[index].set(SkIntToScalar((unsigned int)index * 10),
|
2012-05-17 15:38:00 +00:00
|
|
|
SkIntToScalar(20));
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
// shaders
|
2011-05-19 19:58:58 +00:00
|
|
|
SkPoint linearPoints[] = { { 0, 0, }, { SkIntToScalar(40), SkIntToScalar(40) } };
|
2008-12-17 15:59:43 +00:00
|
|
|
SkColor linearColors[] = { SK_ColorRED, SK_ColorBLUE };
|
2015-08-27 14:41:13 +00:00
|
|
|
SkScalar* linearPos = nullptr;
|
2008-12-17 15:59:43 +00:00
|
|
|
int linearCount = 2;
|
|
|
|
SkShader::TileMode linearMode = SkShader::kMirror_TileMode;
|
2016-03-09 02:50:00 +00:00
|
|
|
auto linear = SkGradientShader::MakeLinear(linearPoints,
|
2014-05-22 12:27:41 +00:00
|
|
|
linearColors, linearPos, linearCount, linearMode);
|
2008-12-17 15:59:43 +00:00
|
|
|
|
|
|
|
SkPoint radialCenter = { SkIntToScalar(25), SkIntToScalar(25) };
|
|
|
|
SkScalar radialRadius = SkIntToScalar(25);
|
|
|
|
SkColor radialColors[] = { SK_ColorGREEN, SK_ColorGRAY, SK_ColorRED };
|
|
|
|
SkScalar radialPos[] = { 0, SkIntToScalar(3) / 5, SkIntToScalar(1)};
|
|
|
|
int radialCount = 3;
|
|
|
|
SkShader::TileMode radialMode = SkShader::kRepeat_TileMode;
|
2016-03-09 02:50:00 +00:00
|
|
|
auto radial = SkGradientShader::MakeRadial(radialCenter,
|
2008-12-17 15:59:43 +00:00
|
|
|
radialRadius, radialColors, radialPos, radialCount,
|
2014-05-22 12:27:41 +00:00
|
|
|
radialMode);
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
SkEmbossMaskFilter::Light light;
|
|
|
|
light.fDirection[0] = SK_Scalar1/2;
|
|
|
|
light.fDirection[1] = SK_Scalar1/2;
|
|
|
|
light.fDirection[2] = SK_Scalar1/3;
|
2012-08-23 18:19:56 +00:00
|
|
|
light.fAmbient = 0x48;
|
|
|
|
light.fSpecular = 0x80;
|
|
|
|
|
2016-03-22 17:17:23 +00:00
|
|
|
auto lightingFilter = SkColorMatrixFilter::MakeLightingFilter(
|
2008-12-17 15:59:43 +00:00
|
|
|
0xff89bc45, 0xff112233);
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->save();
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->translate(SkIntToScalar(0), SkIntToScalar(5));
|
2013-07-22 17:18:18 +00:00
|
|
|
paint.setAntiAlias(true);
|
2015-03-16 17:08:34 +00:00
|
|
|
paint.setFilterQuality(kLow_SkFilterQuality);
|
2012-08-23 18:19:56 +00:00
|
|
|
// !!! draw through a clip
|
|
|
|
paint.setColor(SK_ColorLTGRAY);
|
|
|
|
paint.setStyle(SkPaint::kFill_Style);
|
2008-12-17 15:59:43 +00:00
|
|
|
SkRect clip = {0, 0, SkIntToScalar(320), SkIntToScalar(120)};
|
|
|
|
canvas->clipRect(clip);
|
2016-03-09 02:50:00 +00:00
|
|
|
paint.setShader(SkShader::MakeBitmapShader(fTx,
|
|
|
|
SkShader::kMirror_TileMode, SkShader::kRepeat_TileMode));
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->drawPaint(paint);
|
|
|
|
canvas->save();
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
// line (exercises xfermode, colorShader, colorFilter, filterShader)
|
2012-08-23 18:19:56 +00:00
|
|
|
paint.setColor(SK_ColorGREEN);
|
|
|
|
paint.setStrokeWidth(SkIntToScalar(10));
|
|
|
|
paint.setStyle(SkPaint::kStroke_Style);
|
2016-10-06 00:33:02 +00:00
|
|
|
paint.setBlendMode(SkBlendMode::kXor);
|
2016-03-22 17:17:23 +00:00
|
|
|
paint.setColorFilter(lightingFilter);
|
2017-05-15 17:35:35 +00:00
|
|
|
canvas->drawLine(start, stop, paint); // should not be green
|
2016-10-06 00:33:02 +00:00
|
|
|
paint.setBlendMode(SkBlendMode::kSrcOver);
|
2015-08-27 14:41:13 +00:00
|
|
|
paint.setColorFilter(nullptr);
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
// rectangle
|
2012-08-23 18:19:56 +00:00
|
|
|
paint.setStyle(SkPaint::kFill_Style);
|
|
|
|
canvas->translate(SkIntToScalar(50), 0);
|
|
|
|
paint.setColor(SK_ColorYELLOW);
|
2016-03-09 02:50:00 +00:00
|
|
|
paint.setShader(linear);
|
2016-03-18 18:22:57 +00:00
|
|
|
paint.setPathEffect(pathEffectTest());
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->drawRect(rect, paint);
|
2015-08-27 14:41:13 +00:00
|
|
|
paint.setPathEffect(nullptr);
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
// circle w/ emboss & transparent (exercises 3dshader)
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->translate(SkIntToScalar(50), 0);
|
2016-04-04 17:02:58 +00:00
|
|
|
paint.setMaskFilter(SkEmbossMaskFilter::Make(
|
|
|
|
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(12)/5), light));
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->drawOval(rect, paint);
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
|
2015-06-05 18:31:26 +00:00
|
|
|
// paint.setShader(transparentShader)->unref();
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->drawOval(rect, paint);
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->translate(0, SkIntToScalar(-10));
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
// path
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->translate(SkIntToScalar(50), 0);
|
|
|
|
paint.setColor(SK_ColorRED);
|
|
|
|
paint.setStyle(SkPaint::kStroke_Style);
|
|
|
|
paint.setStrokeWidth(SkIntToScalar(5));
|
2016-03-09 02:50:00 +00:00
|
|
|
paint.setShader(radial);
|
2015-08-27 14:41:13 +00:00
|
|
|
paint.setMaskFilter(nullptr);
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->drawPath(path, paint);
|
|
|
|
|
2015-08-27 14:41:13 +00:00
|
|
|
paint.setShader(nullptr);
|
2015-11-04 16:34:07 +00:00
|
|
|
// bitmap
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->translate(SkIntToScalar(50), 0);
|
|
|
|
paint.setStyle(SkPaint::kFill_Style);
|
|
|
|
canvas->drawBitmap(fBug, left, top, &paint);
|
2008-12-17 15:59:43 +00:00
|
|
|
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->translate(-SkIntToScalar(30), SkIntToScalar(30));
|
2016-03-09 02:50:00 +00:00
|
|
|
paint.setShader(shaderTest()); // test compose shader
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->drawRect(rect2, paint);
|
2015-08-27 14:41:13 +00:00
|
|
|
paint.setShader(nullptr);
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->restore();
|
|
|
|
// text
|
2012-08-23 18:19:56 +00:00
|
|
|
canvas->translate(0, SkIntToScalar(60));
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->save();
|
2012-08-23 18:19:56 +00:00
|
|
|
paint.setColor(SK_ColorGRAY);
|
|
|
|
canvas->drawPosText(ascii, asciiLength, pos.begin(), paint);
|
|
|
|
canvas->drawPosText(ascii, asciiLength, pos2.begin(), paint);
|
|
|
|
|
|
|
|
canvas->translate(SkIntToScalar(50), 0);
|
|
|
|
paint.setColor(SK_ColorCYAN);
|
|
|
|
canvas->drawText(utf8, sizeof(utf8) - 1, x, y, paint);
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->translate(0, SkIntToScalar(60));
|
2012-08-23 18:19:56 +00:00
|
|
|
paint.setTextEncoding(SkPaint::kUTF8_TextEncoding);
|
2008-12-17 15:59:43 +00:00
|
|
|
canvas->restore();
|
|
|
|
}
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2018-08-08 15:36:17 +00:00
|
|
|
virtual Sample::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) {
|
2008-12-17 15:59:43 +00:00
|
|
|
fClickPt.set(x, y);
|
2013-01-08 16:17:50 +00:00
|
|
|
return this->INHERITED::onFindClickHandler(x, y, modi);
|
2008-12-17 15:59:43 +00:00
|
|
|
}
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2016-03-18 18:22:57 +00:00
|
|
|
sk_sp<SkPathEffect> pathEffectTest() {
|
2008-12-17 15:59:43 +00:00
|
|
|
static const int gXY[] = { 1, 0, 0, -1, 2, -1, 3, 0, 2, 1, 0, 1 };
|
|
|
|
SkScalar gPhase = 0;
|
|
|
|
SkPath path;
|
|
|
|
path.moveTo(SkIntToScalar(gXY[0]), SkIntToScalar(gXY[1]));
|
|
|
|
for (unsigned i = 2; i < SK_ARRAY_COUNT(gXY); i += 2)
|
|
|
|
path.lineTo(SkIntToScalar(gXY[i]), SkIntToScalar(gXY[i+1]));
|
|
|
|
path.close();
|
|
|
|
path.offset(SkIntToScalar(-6), 0);
|
2016-03-18 18:22:57 +00:00
|
|
|
auto outer = SkPath1DPathEffect::Make(path, SkIntToScalar(12),
|
2008-12-17 15:59:43 +00:00
|
|
|
gPhase, SkPath1DPathEffect::kRotate_Style);
|
2016-03-18 18:22:57 +00:00
|
|
|
auto inner = SkDiscretePathEffect::Make(SkIntToScalar(2),
|
2008-12-17 15:59:43 +00:00
|
|
|
SkIntToScalar(1)/10); // SkCornerPathEffect(SkIntToScalar(2));
|
2017-02-26 03:34:32 +00:00
|
|
|
return SkPathEffect::MakeCompose(outer, inner);
|
2008-12-17 15:59:43 +00:00
|
|
|
}
|
2012-05-10 13:04:59 +00:00
|
|
|
|
2016-03-09 02:50:00 +00:00
|
|
|
sk_sp<SkShader> shaderTest() {
|
2011-05-19 19:58:58 +00:00
|
|
|
SkPoint pts[] = { { 0, 0, }, { SkIntToScalar(100), 0 } };
|
2008-12-17 15:59:43 +00:00
|
|
|
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
|
2016-03-09 02:50:00 +00:00
|
|
|
auto shaderA = SkGradientShader::MakeLinear(pts, colors, nullptr,
|
2008-12-17 15:59:43 +00:00
|
|
|
2, SkShader::kClamp_TileMode);
|
|
|
|
pts[1].set(0, SkIntToScalar(100));
|
|
|
|
SkColor colors2[] = {SK_ColorBLACK, SkColorSetARGB(0x80, 0, 0, 0)};
|
2016-03-09 02:50:00 +00:00
|
|
|
auto shaderB = SkGradientShader::MakeLinear(pts, colors2, nullptr,
|
2008-12-17 15:59:43 +00:00
|
|
|
2, SkShader::kClamp_TileMode);
|
2016-03-29 18:32:50 +00:00
|
|
|
return SkShader::MakeComposeShader(std::move(shaderA), std::move(shaderB),
|
2016-10-28 19:42:34 +00:00
|
|
|
SkBlendMode::kDstIn);
|
2008-12-17 15:59:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual void startTest() {
|
2016-03-18 22:48:49 +00:00
|
|
|
decode_file("/Users/caryclark/Desktop/bugcirc.gif", &fBug);
|
|
|
|
decode_file("/Users/caryclark/Desktop/tbcirc.gif", &fTb);
|
|
|
|
decode_file("/Users/caryclark/Desktop/05psp04.gif", &fTx);
|
2012-08-23 18:19:56 +00:00
|
|
|
}
|
2008-12-17 15:59:43 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
SkPoint fClickPt;
|
|
|
|
SkBitmap fBug, fTb, fTx;
|
2018-08-08 15:36:17 +00:00
|
|
|
typedef Sample INHERITED;
|
2008-12-17 15:59:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-08-08 15:36:17 +00:00
|
|
|
DEF_SAMPLE( return new DemoView(); )
|