Show
Ignore:
Timestamp:
04/23/07 00:13:21 (21 months ago)
Author:
bdash
Message:

2007-04-23 Alp Toker <alp@atoker.com>

Reviewed by Hyatt.

  • platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawEllipse): (WebCore::GraphicsContext::drawConvexPolygon): Fix stroking and filling of ellipses and polygons.
  • platform/graphics/cairo/ImageCairo.cpp: (WebCore::BitmapImage::draw): Make use of a new GraphicsContext function to simplify the code. (WebCore::Image::drawPattern): Now implemented. This makes content with tiled patterns (eg. CSS repeat) render correctly.
  • platform/graphics/gdk/ImageGdk.cpp: (WebCore::Image::drawPattern): Remove old stub.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp

    r19675 r21022  
    11/* 
    22 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved. 
     3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 
    34 * 
    45 * Redistribution and use in source and binary forms, with or without 
     
    292293    if (fillColor().alpha()) { 
    293294        setColor(context, fillColor()); 
    294         cairo_fill(context); 
    295     } 
     295        cairo_fill_preserve(context); 
     296    } 
     297 
    296298    if (strokeStyle() != NoStroke) { 
    297299        setColor(context, strokeColor()); 
     
    299301        cairo_stroke(context); 
    300302    } 
     303 
     304    cairo_new_path(context); 
    301305} 
    302306 
     
    348352        setColor(context, fillColor()); 
    349353        cairo_set_fill_rule(context, CAIRO_FILL_RULE_EVEN_ODD); 
    350         cairo_fill(context); 
     354        cairo_fill_preserve(context); 
    351355    } 
    352356 
     
    356360        cairo_stroke(context); 
    357361    } 
     362 
     363    cairo_new_path(context); 
    358364    cairo_restore(context); 
    359365}