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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Gradient.cpp

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 position_.X(), position_.Y(), colors.data(), pos.data(), 292 position_.X(), position_.Y(), colors.data(), pos.data(),
293 static_cast<int>(colors.size()), flags, adjusted_local_matrix, 293 static_cast<int>(colors.size()), flags, adjusted_local_matrix,
294 fallback_color); 294 fallback_color);
295 } 295 }
296 296
297 private: 297 private:
298 const FloatPoint position_; 298 const FloatPoint position_;
299 const float angle_; 299 const float angle_;
300 }; 300 };
301 301
302 } // anonymous ns 302 } // namespace
303 303
304 PassRefPtr<Gradient> Gradient::CreateLinear(const FloatPoint& p0, 304 PassRefPtr<Gradient> Gradient::CreateLinear(const FloatPoint& p0,
305 const FloatPoint& p1, 305 const FloatPoint& p1,
306 GradientSpreadMethod spread_method, 306 GradientSpreadMethod spread_method,
307 ColorInterpolation interpolation) { 307 ColorInterpolation interpolation) {
308 return AdoptRef(new LinearGradient(p0, p1, spread_method, interpolation)); 308 return AdoptRef(new LinearGradient(p0, p1, spread_method, interpolation));
309 } 309 }
310 310
311 PassRefPtr<Gradient> Gradient::CreateRadial(const FloatPoint& p0, 311 PassRefPtr<Gradient> Gradient::CreateRadial(const FloatPoint& p0,
312 float r0, 312 float r0,
313 const FloatPoint& p1, 313 const FloatPoint& p1,
314 float r1, 314 float r1,
315 float aspect_ratio, 315 float aspect_ratio,
316 GradientSpreadMethod spread_method, 316 GradientSpreadMethod spread_method,
317 ColorInterpolation interpolation) { 317 ColorInterpolation interpolation) {
318 return AdoptRef(new RadialGradient(p0, r0, p1, r1, aspect_ratio, 318 return AdoptRef(new RadialGradient(p0, r0, p1, r1, aspect_ratio,
319 spread_method, interpolation)); 319 spread_method, interpolation));
320 } 320 }
321 321
322 PassRefPtr<Gradient> Gradient::CreateConic(const FloatPoint& position, 322 PassRefPtr<Gradient> Gradient::CreateConic(const FloatPoint& position,
323 float angle, 323 float angle,
324 ColorInterpolation interpolation) { 324 ColorInterpolation interpolation) {
325 return AdoptRef(new ConicGradient(position, angle, interpolation)); 325 return AdoptRef(new ConicGradient(position, angle, interpolation));
326 } 326 }
327 327
328 } // namespace blink 328 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698