コード例 #1
0
ファイル: ShadowList.cpp プロジェクト: HansMuller/engine
void ShadowList::adjustRectForShadow(FloatRect& rect) const {
  float shadowLeft = 0;
  float shadowRight = 0;
  float shadowTop = 0;
  float shadowBottom = 0;
  calculateShadowExtent(this, shadowLeft, shadowRight, shadowTop, shadowBottom);

  rect.move(shadowLeft, shadowTop);
  rect.setWidth(rect.width() - shadowLeft + shadowRight);
  rect.setHeight(rect.height() - shadowTop + shadowBottom);
}
コード例 #2
0
ファイル: ShadowData.cpp プロジェクト: achellies/WinCEWebKit
void ShadowData::adjustRectForShadow(FloatRect& rect, int additionalOutlineSize) const
{
    int shadowLeft = 0;
    int shadowRight = 0;
    int shadowTop = 0;
    int shadowBottom = 0;
    calculateShadowExtent(this, additionalOutlineSize, shadowLeft, shadowRight, shadowTop, shadowBottom);

    rect.move(shadowLeft, shadowTop);
    rect.setWidth(rect.width() - shadowLeft + shadowRight);
    rect.setHeight(rect.height() - shadowTop + shadowBottom);
}