circle_sizes.cpp 515 B

1234567891011121314151617181920
  1. /*
  2. * Copyright 2017 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #include "gm/gm.h"
  8. #include "include/core/SkCanvas.h"
  9. #include "include/core/SkPaint.h"
  10. // https://crbug.com/772953
  11. DEF_SIMPLE_GM(circle_sizes, canvas, 128, 128) {
  12. SkPaint p;
  13. p.setAntiAlias(true);
  14. for (int i = 0; i < 16; ++i) {
  15. canvas->drawCircle({14.0f + 32.0f * (i % 4),
  16. 14.0f + 32.0f * (i / 4)}, i + 1.0f, p);
  17. }
  18. }