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

Side by Side Diff: src/utils/SkPatchGrid.h

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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 | « src/utils/SkParsePath.cpp ('k') | src/utils/SkPatchGrid.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPatchGrid_DEFINED 8 #ifndef SkPatchGrid_DEFINED
9 #define SkPatchGrid_DEFINED 9 #define SkPatchGrid_DEFINED
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 public: 81 public:
82 82
83 enum VertexType { 83 enum VertexType {
84 kNone_VertexType = 0X00, 84 kNone_VertexType = 0X00,
85 kColors_VertexType = 0x01, 85 kColors_VertexType = 0x01,
86 kTexs_VertexType = 0x02, 86 kTexs_VertexType = 0x02,
87 kColorsAndTexs_VertexType = 0x03 87 kColorsAndTexs_VertexType = 0x03
88 }; 88 };
89 89
90 SkPatchGrid(int rows = 0, int cols = 0, VertexType flags = kNone_VertexType, 90 SkPatchGrid(int rows = 0, int cols = 0, VertexType flags = kNone_VertexType,
91 SkXfermode* xfer = NULL); 91 SkXfermode* xfer = nullptr);
92 92
93 ~SkPatchGrid(); 93 ~SkPatchGrid();
94 94
95 /** 95 /**
96 * Add a patch at location (x,y) overwriting the previous patch and shared p oints so they 96 * Add a patch at location (x,y) overwriting the previous patch and shared p oints so they
97 * mantain C0 connectivity. 97 * mantain C0 connectivity.
98 * The control points must be passed in a clockwise order starting at the to p left corner. 98 * The control points must be passed in a clockwise order starting at the to p left corner.
99 * The colors and texCoords are the values at the corners of the patch which will be bilerp 99 * The colors and texCoords are the values at the corners of the patch which will be bilerp
100 * across it, they must also be in counterclockwise order starting at the to p left corner. 100 * across it, they must also be in counterclockwise order starting at the to p left corner.
101 */ 101 */
102 bool setPatch(int x, int y, const SkPoint cubics[12], const SkColor colors[4 ], 102 bool setPatch(int x, int y, const SkPoint cubics[12], const SkColor colors[4 ],
103 const SkPoint texCoords[4]); 103 const SkPoint texCoords[4]);
104 104
105 /** 105 /**
106 * Get patch at location (x,y). If cubics, colors or texCoords is not NULL i t sets patch's 106 * Get patch at location (x,y). If cubics, colors or texCoords is not nullpt r it sets patch's
107 * array with its corresponding values. 107 * array with its corresponding values.
108 * The function returns false if the cubics parameter is NULL or if the (x,y ) coordinates are 108 * The function returns false if the cubics parameter is nullptr or if the ( x,y) coordinates are
109 * not within the range of the grid. 109 * not within the range of the grid.
110 */ 110 */
111 bool getPatch(int x, int y, SkPoint cubics[12], SkColor colors[4], SkPoint t exCoords[4]) const; 111 bool getPatch(int x, int y, SkPoint cubics[12], SkColor colors[4], SkPoint t exCoords[4]) const;
112 112
113 /** 113 /**
114 * Resets the grid of patches to contain rows and cols of patches. 114 * Resets the grid of patches to contain rows and cols of patches.
115 */ 115 */
116 void reset(int rows, int cols, VertexType flags, SkXfermode* xMode); 116 void reset(int rows, int cols, VertexType flags, SkXfermode* xMode);
117 117
118 /** 118 /**
(...skipping 16 matching lines...) Expand all
135 SkPoint* fCornerPts; 135 SkPoint* fCornerPts;
136 SkColor* fCornerColors; 136 SkColor* fCornerColors;
137 SkPoint* fTexCoords; 137 SkPoint* fTexCoords;
138 SkPoint* fHrzCtrlPts; 138 SkPoint* fHrzCtrlPts;
139 SkPoint* fVrtCtrlPts; 139 SkPoint* fVrtCtrlPts;
140 SkXfermode* fXferMode; 140 SkXfermode* fXferMode;
141 }; 141 };
142 142
143 143
144 #endif 144 #endif
OLDNEW
« no previous file with comments | « src/utils/SkParsePath.cpp ('k') | src/utils/SkPatchGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698