15#include <initializer_list>
19 paint.setAntiAlias(
true);
20 static constexpr SkScalar kOuterRadius = 35.f;
22 canvas->translate(10.f, 10.f);
24 for (
bool offcenter : {
false,
true}) {
25 for (
bool oval : {
false,
true}) {
26 for (
SkScalar innerRadiusX : {1.f, 0.5f, 0.1f, .01f}) {
27 SkScalar innerRadiusY = innerRadiusX;
29 innerRadiusY *= 0.95f;
31 SkScalar tx = kOuterRadius - innerRadiusX;
32 SkScalar ty = kOuterRadius - innerRadiusY;
38 canvas->drawDRRect(outer, inner,
paint);
39 canvas->translate(0, 2 * kOuterRadius + 5);
43 canvas->translate(2 * kOuterRadius + 2, 0);
static SkRRect MakeOval(const SkRect &oval)
DEF_SIMPLE_GM(drrect_small_inner, canvas, 170, 610)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)