Changeset 448

Show
Ignore:
Timestamp:
08/20/08 16:48:12 (4 months ago)
Author:
odole
Message:

2008-08-20 Olivier DOLE <odole@pleyo.com>

Reviewed by Mario Bensi.
fix ticket #272:
Use boxRGBA from SDL_GFX to draw rectangle in order to fix some css
animations with SDL version.

  • WKAL/Concretizations/Graphics/SDL/BCGraphicsContextSDL.cpp:
    (WKAL::GraphicsContext::drawRect):
    (WKAL::GraphicsContext::fillRect):
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/BAL/ChangeLogOWB

    r444 r448  
     12008-08-20  Olivier DOLE  <odole@pleyo.com> 
     2 
     3        Reviewed by Mario Bensi. 
     4        fix ticket #272: 
     5        Use boxRGBA from SDL_GFX to draw rectangle in order to fix some css 
     6        animations with SDL version. 
     7 
     8        * WKAL/Concretizations/Graphics/SDL/BCGraphicsContextSDL.cpp: 
     9        (WKAL::GraphicsContext::drawRect): 
     10        (WKAL::GraphicsContext::fillRect): 
     11 
    1122008-08-19  Mario Bensi  <mbensi@pleyo.com> 
    213 
  • trunk/BAL/WKAL/Concretizations/Graphics/SDL/BCGraphicsContextSDL.cpp

    r437 r448  
    122122 
    123123    if (fillColor().alpha()) { 
    124         if (!m_data->layers.isEmpty()) 
    125         { 
    126             Color rectFillColor(fillColor().red(), fillColor().green(), fillColor().blue(), static_cast<int> (fillColor().alpha() * m_data->layers.last())); 
    127             SDL_FillRect(surf, &dstRect, rectFillColor.rgb()); 
    128         } 
    129         else 
     124        if (!m_data->layers.isEmpty()) { 
     125            uint8_t alpha = static_cast<uint8_t> (fillColor().alpha() * m_data->layers.last()); 
     126            boxRGBA(surf, dstRect.x, dstRect.y, 
     127                dstRect.w + dstRect.x - 1, dstRect.h + dstRect.y -1, 
     128                fillColor().red(), fillColor().green(), fillColor().blue(), alpha); 
     129        } else 
    130130            SDL_FillRect(surf, &dstRect, fillColor().rgb()); 
    131131    } 
     
    500500        if (!m_data->layers.isEmpty()) { 
    501501            alpha = static_cast<int> (strokeColor().alpha() * m_data->layers.last()); 
    502             WebCore::Color c(color.red(), color.green(), color.blue(), alpha); 
    503502            boxRGBA(surf, 
    504503                static_cast<Sint16>(rect.x()),