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

Side by Side Diff: Source/platform/graphics/Path.cpp

Issue 815933006: Change all uses of the RoundedRect class to use FloatRoundedRect instead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/graphics/Path.h ('k') | Source/platform/graphics/paint/ClipDisplayItem.h » ('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 (C) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * 2006 Rob Buis <buis@kde.org> 3 * 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * Copyright (C) 2013 Intel Corporation. All rights reserved. 6 * Copyright (C) 2013 Intel Corporation. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 transform(inverseEllipseTransform); 381 transform(inverseEllipseTransform);
382 addEllipse(FloatPoint::zero(), radiusX, radiusY, startAngle, endAngle, antic lockwise); 382 addEllipse(FloatPoint::zero(), radiusX, radiusY, startAngle, endAngle, antic lockwise);
383 transform(ellipseTransform); 383 transform(ellipseTransform);
384 } 384 }
385 385
386 void Path::addEllipse(const FloatRect& rect) 386 void Path::addEllipse(const FloatRect& rect)
387 { 387 {
388 m_path.addOval(rect); 388 m_path.addOval(rect);
389 } 389 }
390 390
391 void Path::addRoundedRect(const RoundedRect& r) 391 void Path::addRoundedRect(const FloatRoundedRect& r)
392 { 392 {
393 addRoundedRect(r.rect(), r.radii().topLeft(), r.radii().topRight(), r.radii( ).bottomLeft(), r.radii().bottomRight()); 393 addRoundedRect(r.rect(), r.radii().topLeft(), r.radii().topRight(), r.radii( ).bottomLeft(), r.radii().bottomRight());
394 } 394 }
395 395
396 void Path::addRoundedRect(const FloatRect& rect, const FloatSize& roundingRadii) 396 void Path::addRoundedRect(const FloatRect& rect, const FloatSize& roundingRadii)
397 { 397 {
398 if (rect.isEmpty()) 398 if (rect.isEmpty())
399 return; 399 return;
400 400
401 FloatSize radius(roundingRadii); 401 FloatSize radius(roundingRadii);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 #if ENABLE(ASSERT) 503 #if ENABLE(ASSERT)
504 bool ellipseIsRenderable(float startAngle, float endAngle) 504 bool ellipseIsRenderable(float startAngle, float endAngle)
505 { 505 {
506 return (std::abs(endAngle - startAngle) < twoPiFloat) 506 return (std::abs(endAngle - startAngle) < twoPiFloat)
507 || WebCoreFloatNearlyEqual(std::abs(endAngle - startAngle), twoPiFloat); 507 || WebCoreFloatNearlyEqual(std::abs(endAngle - startAngle), twoPiFloat);
508 } 508 }
509 #endif 509 #endif
510 510
511 } // namespace blink 511 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/Path.h ('k') | Source/platform/graphics/paint/ClipDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698