crbug_908646.cpp 734 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright 2019 Google LLC
  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. #include "include/core/SkPath.h"
  11. DEF_SIMPLE_GM(crbug_908646, canvas, 300, 300) {
  12. SkPaint paint;
  13. paint.setAntiAlias(true);
  14. SkPath path;
  15. path.setFillType(SkPath::kEvenOdd_FillType);
  16. path.moveTo(50, 50);
  17. path.lineTo(50, 300);
  18. path.lineTo(250, 300);
  19. path.lineTo(250, 50);
  20. path.moveTo(200, 100);
  21. path.lineTo(100, 100);
  22. path.lineTo(150, 200);
  23. path.moveTo(100, 250);
  24. path.lineTo(150, 150);
  25. path.lineTo(200, 250);
  26. canvas->drawPath(path, paint);
  27. }