Changeset 80557 in webkit


Ignore:
Timestamp:
Mar 8, 2011 3:18:08 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-03-08 Andreas Kling <kling@webkit.org>

Reviewed by Antonio Gomes.

Path: Make measurement functions const
https://bugs.webkit.org/show_bug.cgi?id=55914

  • platform/graphics/Path.cpp: (WebCore::Path::length): (WebCore::Path::pointAtLength): (WebCore::Path::normalAngleAtLength):
  • platform/graphics/Path.h:
  • platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::strokeBoundingRect):
  • platform/graphics/cg/PathCG.cpp: (WebCore::Path::strokeBoundingRect):
  • platform/graphics/openvg/PathOpenVG.cpp: (WebCore::Path::strokeBoundingRect): (WebCore::Path::length): (WebCore::Path::pointAtLength): (WebCore::Path::normalAngleAtLength):
  • platform/graphics/qt/PathQt.cpp: (WebCore::Path::strokeBoundingRect): (WebCore::Path::length): (WebCore::Path::pointAtLength): (WebCore::Path::normalAngleAtLength):
  • platform/graphics/skia/PathSkia.cpp: (WebCore::Path::strokeBoundingRect):
  • platform/graphics/wince/PathWinCE.cpp: (WebCore::Path::strokeBoundingRect):
  • platform/graphics/wx/PathWx.cpp: (WebCore::Path::strokeBoundingRect):
Location:
trunk/Source/WebCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r80555 r80557  
     12011-03-08  Andreas Kling  <kling@webkit.org>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        Path: Make measurement functions const
     6        https://bugs.webkit.org/show_bug.cgi?id=55914
     7
     8        * platform/graphics/Path.cpp:
     9        (WebCore::Path::length):
     10        (WebCore::Path::pointAtLength):
     11        (WebCore::Path::normalAngleAtLength):
     12        * platform/graphics/Path.h:
     13        * platform/graphics/cairo/PathCairo.cpp:
     14        (WebCore::Path::strokeBoundingRect):
     15        * platform/graphics/cg/PathCG.cpp:
     16        (WebCore::Path::strokeBoundingRect):
     17        * platform/graphics/openvg/PathOpenVG.cpp:
     18        (WebCore::Path::strokeBoundingRect):
     19        (WebCore::Path::length):
     20        (WebCore::Path::pointAtLength):
     21        (WebCore::Path::normalAngleAtLength):
     22        * platform/graphics/qt/PathQt.cpp:
     23        (WebCore::Path::strokeBoundingRect):
     24        (WebCore::Path::length):
     25        (WebCore::Path::pointAtLength):
     26        (WebCore::Path::normalAngleAtLength):
     27        * platform/graphics/skia/PathSkia.cpp:
     28        (WebCore::Path::strokeBoundingRect):
     29        * platform/graphics/wince/PathWinCE.cpp:
     30        (WebCore::Path::strokeBoundingRect):
     31        * platform/graphics/wx/PathWx.cpp:
     32        (WebCore::Path::strokeBoundingRect):
     33
    1342011-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
    235
  • trunk/Source/WebCore/platform/graphics/Path.cpp

    r69519 r80557  
    8484}
    8585
    86 float Path::length()
     86float Path::length() const
    8787{
    8888    PathTraversalState traversalState(PathTraversalState::TraversalTotalLength);
     
    9191}
    9292
    93 FloatPoint Path::pointAtLength(float length, bool& ok)
     93FloatPoint Path::pointAtLength(float length, bool& ok) const
    9494{
    9595    PathTraversalState traversalState(PathTraversalState::TraversalPointAtLength);
     
    100100}
    101101
    102 float Path::normalAngleAtLength(float length, bool& ok)
     102float Path::normalAngleAtLength(float length, bool& ok) const
    103103{
    104104    PathTraversalState traversalState(PathTraversalState::TraversalNormalAngleAtLength);
  • trunk/Source/WebCore/platform/graphics/Path.h

    r79578 r80557  
    113113        bool strokeContains(StrokeStyleApplier*, const FloatPoint&) const;
    114114        FloatRect boundingRect() const;
    115         FloatRect strokeBoundingRect(StrokeStyleApplier* = 0);
     115        FloatRect strokeBoundingRect(StrokeStyleApplier* = 0) const;
    116116       
    117         float length();
    118         FloatPoint pointAtLength(float length, bool& ok);
    119         float normalAngleAtLength(float length, bool& ok);
     117        float length() const;
     118        FloatPoint pointAtLength(float length, bool& ok) const;
     119        float normalAngleAtLength(float length, bool& ok) const;
    120120
    121121        void clear();
  • trunk/Source/WebCore/platform/graphics/cairo/PathCairo.cpp

    r79541 r80557  
    282282}
    283283
    284 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
     284FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const
    285285{
    286286    cairo_t* cr = platformPath()->context();
  • trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp

    r74733 r80557  
    167167}
    168168
    169 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
     169FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const
    170170{
    171171    CGContextRef context = scratchContext();
  • trunk/Source/WebCore/platform/graphics/openvg/PathOpenVG.cpp

    r69505 r80557  
    170170}
    171171
    172 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
     172FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const
    173173{
    174174    notImplemented();
     
    465465// as primary path storage.
    466466
    467 float Path::length()
     467float Path::length() const
    468468{
    469469    m_path->makeCompatibleContextCurrent();
     
    473473}
    474474
    475 FloatPoint Path::pointAtLength(float length, bool& ok)
     475FloatPoint Path::pointAtLength(float length, bool& ok) const
    476476{
    477477    VGfloat x = 0, y = 0;
     
    484484}
    485485
    486 float Path::normalAngleAtLength(float length, bool& ok)
     486float Path::normalAngleAtLength(float length, bool& ok) const
    487487{
    488488    VGfloat tangentX, tangentY;
  • trunk/Source/WebCore/platform/graphics/qt/PathQt.cpp

    r76686 r80557  
    155155}
    156156
    157 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
     157FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const
    158158{
    159159    GraphicsContext* context = scratchContext();
     
    410410}
    411411
    412 float Path::length()
     412float Path::length() const
    413413{
    414414    return m_path.length();
    415415}
    416416
    417 FloatPoint Path::pointAtLength(float length, bool& ok)
     417FloatPoint Path::pointAtLength(float length, bool& ok) const
    418418{
    419419    ok = (length >= 0 && length <= m_path.length());
     
    425425}
    426426
    427 float Path::normalAngleAtLength(float length, bool& ok)
     427float Path::normalAngleAtLength(float length, bool& ok) const
    428428{
    429429    ok = (length >= 0 && length <= m_path.length());
  • trunk/Source/WebCore/platform/graphics/skia/PathSkia.cpp

    r80409 r80557  
    229229}
    230230
    231 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
     231FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const
    232232{
    233233    GraphicsContext* scratch = scratchContext();
  • trunk/Source/WebCore/platform/graphics/wince/PathWinCE.cpp

    r69505 r80557  
    134134}
    135135
    136 FloatRect Path::strokeBoundingRect(StrokeStyleApplier *)
     136FloatRect Path::strokeBoundingRect(StrokeStyleApplier*) const
    137137{
    138138    notImplemented();
  • trunk/Source/WebCore/platform/graphics/wx/PathWx.cpp

    r69505 r80557  
    106106}
    107107
    108 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
     108FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const
    109109{
    110110    notImplemented();
Note: See TracChangeset for help on using the changeset viewer.