[haiku-webkit-commits] r334 - webkit/trunk/WebCore/platform/graphics/haiku

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Fri, 19 Mar 2010 15:59:11 +0000

Author: stippi
Date: Fri Mar 19 15:59:11 2010
New Revision: 334
URL: http://mmlr.dyndns.org/changeset/334

Log:
Found a test that allowed me to tweak the precision of round corners even more.
Previously the corner rect was layouted too large for some cases, which resulted
in the fill and the stroke not overlapping perfectly.

Modified:
   webkit/trunk/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp

Modified: webkit/trunk/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
==============================================================================
--- webkit/trunk/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp       
Fri Mar 19 13:03:26 2010        (r333)
+++ webkit/trunk/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp       
Fri Mar 19 15:59:11 2010        (r334)
@@ -409,8 +409,9 @@
     m_data->view()->SetPenSize(penSize);
     BRect bRect(rect.x(), rect.y(), rect.right(), rect.bottom());
     if (startAngle >= 0 && startAngle < 90) {
-        bRect.right -= penSize / 2 + 0.5;
+               bRect.left += penSize / 2 - 0.5;
         bRect.top += penSize / 2 - 0.5;
+        bRect.right -= penSize / 2 + 0.5;
         bRect.bottom -= penSize / 2 - 0.5;
     } else if (startAngle >= 90 && startAngle < 180) {
         bRect.left += penSize / 2 - 0.5;
@@ -419,9 +420,12 @@
         bRect.bottom -= penSize / 2 - 0.5;
     } else if (startAngle >= 180 && startAngle < 270) {
         bRect.left += penSize / 2 - 0.5;
+        bRect.top += penSize / 2 - 0.5;
         bRect.right -= penSize / 2 - 0.5;
         bRect.bottom -= penSize / 2 + 0.5;
     } else if (startAngle >= 270 && startAngle < 360) {
+        bRect.left += penSize / 2 - 0.5;
+        bRect.top += penSize / 2 - 0.5;
         bRect.right -= penSize / 2 + 0.5;
         bRect.bottom -= penSize / 2 + 0.5;
     }

Other related posts:

  • » [haiku-webkit-commits] r334 - webkit/trunk/WebCore/platform/graphics/haiku - webkit