/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
LayoutDeviceRect rect(aRect); // Deflate the rect by half the border width, so that the middle of the // stroke fills exactly the area we want to fill and not more.
rect.Deflate(borderWidth * 0.5f);
LayoutDeviceCoord radius(aRadius * aDpiRatio - borderWidth * 0.5f); // Fix up the radius if it's too large with the rect we're going to paint.
{
LayoutDeviceCoord min = std::min(rect.width, rect.height); if (radius * 2.0f > min) {
radius = min * 0.5f;
}
}
if (backgroundPattern) {
aDrawTarget.Fill(roundedRect, *backgroundPattern);
} if (borderPattern) {
aDrawTarget.Stroke(roundedRect, *borderPattern,
gfx::StrokeOptions(borderWidth));
}
} else { if (backgroundPattern) {
aDrawTarget.FillRect(rect.ToUnknownRect(), *backgroundPattern);
} if (borderPattern) {
aDrawTarget.StrokeRect(rect.ToUnknownRect(), *borderPattern,
gfx::StrokeOptions(borderWidth));
}
}
}
if (needsClip) {
aDrawTarget.PopClip();
}
}
} // namespace mozilla::widget
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.19Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.