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

Side by Side Diff: samplecode/SampleCode.h

Issue 808793002: add sample for arcTo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « include/core/SkRect.h ('k') | samplecode/SamplePath.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SampleCode_DEFINED 10 #ifndef SampleCode_DEFINED
11 #define SampleCode_DEFINED 11 #define SampleCode_DEFINED
12 12
13 #include "SkColor.h" 13 #include "SkColor.h"
14 #include "SkEvent.h" 14 #include "SkEvent.h"
15 #include "SkKey.h" 15 #include "SkKey.h"
16 #include "SkView.h" 16 #include "SkView.h"
17 #include "SkOSMenu.h" 17 #include "SkOSMenu.h"
18 class GrContext; 18 class GrContext;
19 19
20 #define DEF_SAMPLE(code) \
21 static SkView* SK_MACRO_APPEND_LINE(F_)() { code } \
22 static SkViewRegister SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_));
23
24
20 class SampleCode { 25 class SampleCode {
21 public: 26 public:
22 static bool KeyQ(const SkEvent&, SkKey* outKey); 27 static bool KeyQ(const SkEvent&, SkKey* outKey);
23 static bool CharQ(const SkEvent&, SkUnichar* outUni); 28 static bool CharQ(const SkEvent&, SkUnichar* outUni);
24 29
25 static bool TitleQ(const SkEvent&); 30 static bool TitleQ(const SkEvent&);
26 static void TitleR(SkEvent*, const char title[]); 31 static void TitleR(SkEvent*, const char title[]);
27 static bool RequestTitle(SkView* view, SkString* title); 32 static bool RequestTitle(SkView* view, SkString* title);
28 33
29 static bool PrefSizeQ(const SkEvent&); 34 static bool PrefSizeQ(const SkEvent&);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 SkOSMenu::TriState fPipeState; 146 SkOSMenu::TriState fPipeState;
142 SkColor fBGColor; 147 SkColor fBGColor;
143 148
144 private: 149 private:
145 int fRepeatCount; 150 int fRepeatCount;
146 151
147 typedef SkView INHERITED; 152 typedef SkView INHERITED;
148 }; 153 };
149 154
150 #endif 155 #endif
OLDNEW
« no previous file with comments | « include/core/SkRect.h ('k') | samplecode/SamplePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698