-
{
'targets': [
{
'../samplecode/GMSampleView.h',
'../samplecode/ClockFaceView.cpp',
'../samplecode/OverView.cpp',
+ '../samplecode/OverView.h',
'../samplecode/Sample2PtRadial.cpp',
'../samplecode/SampleAAClip.cpp',
'../samplecode/SampleAARects.cpp',
'../samplecode/ClockFaceView.cpp',
'../samplecode/OverView.cpp',
+ '../samplecode/OverView.h',
'../samplecode/Sample2PtRadial.cpp',
'../samplecode/SampleAll.cpp',
'../samplecode/SampleAnimator.cpp',
* found in the LICENSE file.
*/
+#include "OverView.h"
+
#include "SampleCode.h"
#include "SkCanvas.h"
typedef SkView INHERITED;
};
-// FIXME: this should be in a header
-SkView* create_overview(int count, const SkViewFactory* factories[]);
SkView* create_overview(int count, const SkViewFactory* factories[]) {
return SkNEW_ARGS(OverView, (count, factories));
}
-// FIXME: this should be in a header
-bool is_overview(SkView* view);
bool is_overview(SkView* view) {
SkEvent isOverview(gIsOverview);
return view->doQuery(&isOverview);
--- /dev/null
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SAMPLECODE_OVERVIEW_H_
+#define SAMPLECODE_OVERVIEW_H_
+
+class SkView;
+class SkViewFactory;
+
+SkView* create_overview(int, const SkViewFactory*[]);
+
+bool is_overview(SkView* view);
+
+#endif // SAMPLECODE_OVERVIEW_H_
#include "SkGPipe.h"
#include "SamplePipeControllers.h"
+#include "OverView.h"
#include "TransitionView.h"
SK_DEFINE_INST_COUNT(SampleWindow::DeviceManager)
//#define DEFAULT_TO_GPU 1
#endif
-extern SkView* create_overview(int, const SkViewFactory*[]);
-extern bool is_overview(SkView* view);
-extern bool is_transition(SkView* view);
-
-
#define ANIMATING_EVENTTYPE "nextSample"
#define ANIMATING_DELAY 750
*/
#include "TransitionView.h"
+#include "OverView.h"
#include "SampleCode.h"
#include "SkView.h"
#include "SkCanvas.h"
#include "SkTime.h"
#include "SkInterpolator.h"
-extern bool is_overview(SkView* view);
-
static const char gIsTransitionQuery[] = "is-transition";
static const char gReplaceTransitionEvt[] = "replace-transition-view";
-static bool is_transition(SkView* view) {
+bool is_transition(SkView* view) {
SkEvent isTransition(gIsTransitionQuery);
return view->doQuery(&isTransition);
}
class TransitionView : public SampleView {
enum {
-// kDurationMS = 500
+ // kDurationMS = 500
kDurationMS = 1
};
+
public:
TransitionView(SkView* prev, SkView* next, int direction) : fInterp(4, 2){
fAnimationDirection = (Direction)(1 << (direction % 8));
SkView* create_transition(SkView* prev, SkView* next, int direction);
+bool is_transition(SkView* view);
+
#endif // SAMPLECODE_TRANSITIONVIEW_H_