Exemple #1
0
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);
}
Exemple #2
0
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);
}