Show
Ignore:
Timestamp:
02/16/07 22:33:26 (23 months ago)
Author:
kjk
Message:

Reviewed by Adam Roben.

Move Path implementation from TemporaryLinkStubs.cpp to
its own file.
Implement setLineCap, setLineJoin and setMiterLimit for
cairo's GraphicsContext.

  • WebCoreSources.bkl:
  • platform/gdk/TemporaryLinkStubs.cpp:
  • platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::setPlatformFillColor): (WebCore::GraphicsContext::setPlatformStrokeColor): (WebCore::GraphicsContext::setLineCap): (WebCore::GraphicsContext::setLineJoin): (WebCore::GraphicsContext::setMiterLimit):
  • platform/graphics/cairo/PathCairo.cpp: Added. (WebCore::Path::Path): (WebCore::Path::~Path): (WebCore::Path::contains): (WebCore::Path::translate): (WebCore::Path::boundingRect): (WebCore::Path::operator=): (WebCore::Path::clear): (WebCore::Path::moveTo): (WebCore::Path::addLineTo): (WebCore::Path::addQuadCurveTo): (WebCore::Path::addBezierCurveTo): (WebCore::Path::addArcTo): (WebCore::Path::closeSubpath): (WebCore::Path::addArc): (WebCore::Path::addRect): (WebCore::Path::addEllipse): (WebCore::Path::transform): (WebCore::Path::apply):
Files:
1 modified

Legend:

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

    r19587 r19675  
    478478{ 
    479479    // FIXME: this is probably a no-op but I'm not sure 
    480     notImplemented(); 
     480    // notImplemented(); // commented-out because it's chatty and clutters output 
    481481} 
    482482 
     
    484484{ 
    485485    // FIXME: this is probably a no-op but I'm not sure 
    486     notImplemented(); 
     486    //notImplemented(); // commented-out because it's chatty and clutters output 
    487487} 
    488488 
     
    579579} 
    580580 
    581 void GraphicsContext::setLineCap(LineCap) 
    582 { 
    583     notImplemented(); 
    584 } 
    585  
    586 void GraphicsContext::setLineJoin(LineJoin) 
    587 { 
    588     notImplemented(); 
    589 } 
    590  
    591 void GraphicsContext::setMiterLimit(float) 
    592 { 
    593     notImplemented(); 
     581void GraphicsContext::setLineCap(LineCap lineCap) 
     582{ 
     583    if (paintingDisabled()) 
     584        return; 
     585 
     586    cairo_line_cap_t cairoCap = CAIRO_LINE_CAP_BUTT; 
     587    switch (lineCap) { 
     588        case ButtCap: 
     589            // no-op 
     590            break; 
     591        case RoundCap: 
     592            cairoCap = CAIRO_LINE_CAP_ROUND; 
     593            break; 
     594        case SquareCap: 
     595            cairoCap = CAIRO_LINE_CAP_SQUARE; 
     596            break; 
     597    } 
     598    cairo_set_line_cap(m_data->context, cairoCap); 
     599} 
     600 
     601void GraphicsContext::setLineJoin(LineJoin lineJoin) 
     602{ 
     603    if (paintingDisabled()) 
     604        return; 
     605 
     606    cairo_line_join_t cairoJoin = CAIRO_LINE_JOIN_MITER; 
     607    switch (lineJoin) { 
     608        case MiterJoin: 
     609            // no-op 
     610            break; 
     611        case RoundJoin: 
     612            cairoJoin = CAIRO_LINE_JOIN_ROUND; 
     613            break; 
     614        case BevelJoin: 
     615            cairoJoin = CAIRO_LINE_JOIN_BEVEL; 
     616            break; 
     617    } 
     618    cairo_set_line_join(m_data->context, cairoJoin); 
     619} 
     620 
     621void GraphicsContext::setMiterLimit(float miter) 
     622{ 
     623    if (paintingDisabled()) 
     624        return; 
     625    cairo_set_miter_limit(m_data->context, miter); 
    594626} 
    595627