• Home
  • Raw
  • Download

Lines Matching refs:pts

40 static sk_sp<SkShader> Make2ConicalOutside(const SkPoint pts[2], const GradData& data,  in Make2ConicalOutside()
43 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutside()
44 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutside()
45 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutside()
46 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutside()
51 static sk_sp<SkShader> Make2ConicalOutsideStrip(const SkPoint pts[2], const GradData& data, in Make2ConicalOutsideStrip()
54 SkScalar radius = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutsideStrip()
55 center0.set(pts[0].fX, pts[0].fY); in Make2ConicalOutsideStrip()
56 center1.set(pts[1].fX, pts[1].fY); in Make2ConicalOutsideStrip()
61 static sk_sp<SkShader> Make2ConicalOutsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalOutsideFlip()
64 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutsideFlip()
65 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutsideFlip()
66 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutsideFlip()
67 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutsideFlip()
72 static sk_sp<SkShader> Make2ConicalInside(const SkPoint pts[2], const GradData& data, in Make2ConicalInside()
75 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalInside()
76 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalInside()
77 center1.set(SkScalarInterp(pts[0].fX, pts[1].fX, SkIntToScalar(3)/5), in Make2ConicalInside()
78 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalInside()
79 return SkGradientShader::MakeTwoPointConical(center1, (pts[1].fX - pts[0].fX) / 7, in Make2ConicalInside()
80 center0, (pts[1].fX - pts[0].fX) / 2, in Make2ConicalInside()
85 static sk_sp<SkShader> Make2ConicalInsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideFlip()
88 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalInsideFlip()
89 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalInsideFlip()
90 center1.set(SkScalarInterp(pts[0].fX, pts[1].fX, SkIntToScalar(3)/5), in Make2ConicalInsideFlip()
91 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalInsideFlip()
92 return SkGradientShader::MakeTwoPointConical(center0, (pts[1].fX - pts[0].fX) / 2, in Make2ConicalInsideFlip()
93 center1, (pts[1].fX - pts[0].fX) / 7, in Make2ConicalInsideFlip()
98 static sk_sp<SkShader> Make2ConicalInsideCenter(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideCenter()
101 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalInsideCenter()
102 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalInsideCenter()
103 return SkGradientShader::MakeTwoPointConical(center0, (pts[1].fX - pts[0].fX) / 7, in Make2ConicalInsideCenter()
104 center0, (pts[1].fX - pts[0].fX) / 2, in Make2ConicalInsideCenter()
109 static sk_sp<SkShader> Make2ConicalInsideCenterReversed(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideCenterReversed()
112 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalInsideCenterReversed()
113 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalInsideCenterReversed()
114 return SkGradientShader::MakeTwoPointConical(center0, (pts[1].fX - pts[0].fX) / 2, in Make2ConicalInsideCenterReversed()
115 center0, (pts[1].fX - pts[0].fX) / 7, in Make2ConicalInsideCenterReversed()
120 static sk_sp<SkShader> Make2ConicalZeroRad(const SkPoint pts[2], const GradData& data, in Make2ConicalZeroRad()
123 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalZeroRad()
124 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalZeroRad()
125 center1.set(SkScalarInterp(pts[0].fX, pts[1].fX, SkIntToScalar(3)/5), in Make2ConicalZeroRad()
126 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalZeroRad()
128 center0, (pts[1].fX - pts[0].fX) / 2, in Make2ConicalZeroRad()
133 static sk_sp<SkShader> Make2ConicalZeroRadFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalZeroRadFlip()
136 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalZeroRadFlip()
137 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalZeroRadFlip()
138 center1.set(SkScalarInterp(pts[0].fX, pts[1].fX, SkIntToScalar(3)/5), in Make2ConicalZeroRadFlip()
139 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalZeroRadFlip()
140 return SkGradientShader::MakeTwoPointConical(center1, (pts[1].fX - pts[0].fX) / 2, in Make2ConicalZeroRadFlip()
146 static sk_sp<SkShader> Make2ConicalZeroRadCenter(const SkPoint pts[2], const GradData& data, in Make2ConicalZeroRadCenter()
149 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalZeroRadCenter()
150 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalZeroRadCenter()
151 center1.set(SkScalarInterp(pts[0].fX, pts[1].fX, SkIntToScalar(3)/5), in Make2ConicalZeroRadCenter()
152 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalZeroRadCenter()
153 return SkGradientShader::MakeTwoPointConical(center0, 0.f, center0, (pts[1].fX - pts[0].fX) / 2, in Make2ConicalZeroRadCenter()
158 static sk_sp<SkShader> Make2ConicalZeroRadOutside(const SkPoint pts[2], const GradData& data, in Make2ConicalZeroRadOutside()
163 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalZeroRadOutside()
164 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalZeroRadOutside()
165 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalZeroRadOutside()
171 static sk_sp<SkShader> Make2ConicalZeroRadFlipOutside(const SkPoint pts[2], const GradData& data, in Make2ConicalZeroRadFlipOutside()
176 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalZeroRadFlipOutside()
177 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalZeroRadFlipOutside()
178 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalZeroRadFlipOutside()
183 static sk_sp<SkShader> Make2ConicalEdgeX(const SkPoint pts[2], const GradData& data, in Make2ConicalEdgeX()
186 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 7; in Make2ConicalEdgeX()
187 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalEdgeX()
188 center1.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalEdgeX()
189 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalEdgeX()
195 static sk_sp<SkShader> Make2ConicalEdgeY(const SkPoint pts[2], const GradData& data, in Make2ConicalEdgeY()
198 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 7; in Make2ConicalEdgeY()
199 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalEdgeY()
200 center1.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalEdgeY()
201 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalEdgeY()
207 static sk_sp<SkShader> Make2ConicalZeroRadEdgeX(const SkPoint pts[2], const GradData& data, in Make2ConicalZeroRadEdgeX()
212 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalZeroRadEdgeX()
213 center1.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalZeroRadEdgeX()
214 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalZeroRadEdgeX()
220 static sk_sp<SkShader> Make2ConicalZeroRadEdgeY(const SkPoint pts[2], const GradData& data, in Make2ConicalZeroRadEdgeY()
224 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalZeroRadEdgeY()
225 center1.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalZeroRadEdgeY()
226 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalZeroRadEdgeY()
232 static sk_sp<SkShader> Make2ConicalTouchX(const SkPoint pts[2], const GradData& data, in Make2ConicalTouchX()
235 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 7; in Make2ConicalTouchX()
236 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalTouchX()
237 center1.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalTouchX()
238 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalTouchX()
244 static sk_sp<SkShader> Make2ConicalTouchY(const SkPoint pts[2], const GradData& data, in Make2ConicalTouchY()
247 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 7; in Make2ConicalTouchY()
248 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalTouchY()
249 center1.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalTouchY()
250 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalTouchY()
256 static sk_sp<SkShader> Make2ConicalInsideSmallRad(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideSmallRad()
259 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2ConicalInsideSmallRad()
260 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalInsideSmallRad()
261 center1.set(SkScalarInterp(pts[0].fX, pts[1].fX, SkIntToScalar(3)/5), in Make2ConicalInsideSmallRad()
262 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalInsideSmallRad()
264 center0, (pts[1].fX - pts[0].fX) / 2, in Make2ConicalInsideSmallRad()
269 typedef sk_sp<SkShader> (*GradMaker)(const SkPoint pts[2], const GradData& data,
341 SkPoint pts[2] = { in onDraw() local
365 paint.setShader(gradMaker[j](pts, gGradData[i], fMode, scale)); in onDraw()