Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: samplecode/SampleBox.cpp

Issue 1634683006: remove unused sample (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleBox.cpp
diff --git a/samplecode/SampleBox.cpp b/samplecode/SampleBox.cpp
deleted file mode 100644
index 8aec99265ac08727425a0acf2ba903f4934f660f..0000000000000000000000000000000000000000
--- a/samplecode/SampleBox.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#include "SampleCode.h"
-#include "SkView.h"
-#include "SkCanvas.h"
-
-class SimpleView : public SampleView {
-public:
- SimpleView() {
- this->setBGColor(0xFFDDDDDD);
- }
-
-protected:
- // overrides from SkEventSink
- virtual bool onQuery(SkEvent* evt) {
- if (SampleCode::TitleQ(*evt)) {
- SampleCode::TitleR(evt, "Box Gradient");
- return true;
- }
- return this->INHERITED::onQuery(evt);
- }
-
- virtual void onDrawContent(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(SkScalarHalf(SkIntToScalar(3)));
- paint.setStyle(SkPaint::kFill_Style);
-
- SkRect r;
- SkScalar x,y;
- x = 10;
- y = 10;
-
- r.set(x, y, x + SkIntToScalar(100), y + SkIntToScalar(100));
- for (int i = 0; i < 256; ++i) {
- canvas->translate(1, 1);
- paint.setColor(0xFF000000 + i * 0x00010000);
- canvas->drawRect(r, paint);
- }
- }
-
-private:
- typedef SampleView INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-static SkView* MyFactory() { return new SimpleView; }
-static SkViewRegister reg(MyFactory);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698