Canvas_getLocalClipBounds_2.cpp 656 B

1234567891011121314151617
  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
  3. #include "tools/fiddle/examples.h"
  4. // HASH=85496614e90c66b020f8a70db8d06f4a
  5. REG_FIDDLE(Canvas_getLocalClipBounds_2, 256, 256, true, 0) {
  6. void draw(SkCanvas* canvas) {
  7. SkCanvas local(256, 256);
  8. canvas = &local;
  9. SkRect bounds;
  10. SkDebugf("local bounds empty = %s\n", canvas->getLocalClipBounds(&bounds)
  11. ? "false" : "true");
  12. SkPath path;
  13. canvas->clipPath(path);
  14. SkDebugf("local bounds empty = %s\n", canvas->getLocalClipBounds(&bounds)
  15. ? "false" : "true");
  16. }
  17. } // END FIDDLE