Reviewed by Eric.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2006 21:15:33 +0000 (21:15 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2006 21:15:33 +0000 (21:15 +0000)
commit4b32df52e8779c599ffb0f73a19c43a07cc1ed51
tree2084074a3f1475a8ad6518bb753922f39c577d91
parenteeb14748b0e83d8d27848ede4deedb026ba1fbca
    Reviewed by Eric.

        - http://bugzilla.opendarwin.org/show_bug.cgi?id=8696
          another round of GraphicsContext improvements

        * WebCore.xcodeproj/project.pbxproj: Added GraphicsContextCG.cpp.
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::scale): Use new GraphicsContext function.
        (WebCore::CanvasRenderingContext2D::rotate): Ditto.
        (WebCore::CanvasRenderingContext2D::translate): Ditto.
        * kwq/KWQComboBox.mm: Added include (not sure if this is needed for this patch,
        but it's needed for one of my upcoming ones).

        * platform/GraphicsContext.h: Changed fillColor and setFillColor to use Color
        instead of RGBA32. Removed setColorFromFillColor and setColorFromPen. Added
        scale, rotate, and translate functions.
        * platform/GraphicsContext.cpp:
        (WebCore::GraphicsContext::setFillColor): Changed to use Color instead of RGBA32.
        (WebCore::GraphicsContext::fillColor): Ditto.

        * platform/GraphicsTypes.h: Moved HorizontalAlignment here.
        * platform/Widget.h: Removed HorizontalAlignment from here.

        * platform/cg/GraphicsContextCG.cpp: Added. Started as a copy of GraphicsContextMac.mm.
        (WebCore::GraphicsContext::drawRect): Rewrote to not rely on [NSGraphicsContext currentContext].
        (WebCore::GraphicsContext::drawLine): Ditto.
        (WebCore::GraphicsContext::drawEllipse): Ditto.
        (WebCore::GraphicsContext::drawArc): Ditto.
        (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
        (WebCore::GraphicsContext::fillRect): Ditto.
        (WebCore::GraphicsContext::setLineWidth):  Added check of paintingDisabled().
        (WebCore::GraphicsContext::setMiterLimit): Ditto.
        (WebCore::GraphicsContext::setAlpha): Ditto.
        (WebCore::GraphicsContext::clearRect): Ditto.
        (WebCore::GraphicsContext::strokeRect): Ditto.
        (WebCore::GraphicsContext::setLineCap): Ditto.
        (WebCore::GraphicsContext::setLineJoin): Ditto.
        (WebCore::GraphicsContext::clip): Ditto.
        (WebCore::GraphicsContext::scale): Added.
        (WebCore::GraphicsContext::rotate): Added.
        (WebCore::GraphicsContext::translate): Added.

        * platform/mac/GraphicsContextMac.mm: Moved most of this file into GraphicsContextCG.cpp.
        (WebCore::GraphicsContext::setCompositeOperation): Added check of paintingDisabled().

        * platform/mac/WebCoreSystemInterface.h: Added declarations so this header
        stands alone.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/html/CanvasRenderingContext2D.cpp
WebCore/kwq/KWQComboBox.mm
WebCore/kwq/KWQLineEdit.h
WebCore/kwq/KWQTextEdit.h
WebCore/platform/GraphicsContext.cpp
WebCore/platform/GraphicsContext.h
WebCore/platform/GraphicsTypes.h
WebCore/platform/Widget.h
WebCore/platform/cg/GraphicsContextCG.cpp [new file with mode: 0644]
WebCore/platform/mac/GraphicsContextMac.mm
WebCore/platform/mac/WebCoreSystemInterface.h