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

Side by Side Diff: include/core/SkPathEffect.h

Issue 2230143003: Add constructor to DashInfo to enable initializer lists (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 SkPathEffect_DEFINED 10 #ifndef SkPathEffect_DEFINED
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 * in info, then call asADash again with the same info and the intervals wi ll get copied in. 111 * in info, then call asADash again with the same info and the intervals wi ll get copied in.
112 */ 112 */
113 113
114 enum DashType { 114 enum DashType {
115 kNone_DashType, //!< ignores the info parameter 115 kNone_DashType, //!< ignores the info parameter
116 kDash_DashType, //!< fills in all of the info parameter 116 kDash_DashType, //!< fills in all of the info parameter
117 }; 117 };
118 118
119 struct DashInfo { 119 struct DashInfo {
120 DashInfo() : fIntervals(NULL), fCount(0), fPhase(0) {} 120 DashInfo() : fIntervals(NULL), fCount(0), fPhase(0) {}
121 DashInfo(SkScalar* intervals, int32_t count, SkScalar phase)
122 : fIntervals(intervals), fCount(count), fPhase(phase) {}
121 123
122 SkScalar* fIntervals; //!< Length of on/off intervals for dash ed lines 124 SkScalar* fIntervals; //!< Length of on/off intervals for dash ed lines
123 // Even values represent ons, and odds offs 125 // Even values represent ons, and odds offs
124 int32_t fCount; //!< Number of intervals in the dash. Sh ould be even number 126 int32_t fCount; //!< Number of intervals in the dash. Sh ould be even number
125 SkScalar fPhase; //!< Offset into the dashed interval pat tern 127 SkScalar fPhase; //!< Offset into the dashed interval pat tern
126 // mod the sum of all intervals 128 // mod the sum of all intervals
127 }; 129 };
128 130
129 virtual DashType asADash(DashInfo* info) const; 131 virtual DashType asADash(DashInfo* info) const;
130 132
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 264
263 private: 265 private:
264 // illegal 266 // illegal
265 SkSumPathEffect(const SkSumPathEffect&); 267 SkSumPathEffect(const SkSumPathEffect&);
266 SkSumPathEffect& operator=(const SkSumPathEffect&); 268 SkSumPathEffect& operator=(const SkSumPathEffect&);
267 269
268 typedef SkPairPathEffect INHERITED; 270 typedef SkPairPathEffect INHERITED;
269 }; 271 };
270 272
271 #endif 273 #endif
OLDNEW
« 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