From 807cec4397cb50a64de7355ae129cc7c8f2c772b Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Thu, 10 Mar 2011 19:20:15 +0000 Subject: Add complex clip gm sample and cleanup unused headers/code in SampleComplexClip git-svn-id: http://skia.googlecode.com/svn/trunk@919 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleComplexClip.cpp | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'samplecode/SampleComplexClip.cpp') diff --git a/samplecode/SampleComplexClip.cpp b/samplecode/SampleComplexClip.cpp index 8aee1bfb6a..c7c4896d02 100644 --- a/samplecode/SampleComplexClip.cpp +++ b/samplecode/SampleComplexClip.cpp @@ -1,34 +1,9 @@ #include "SampleCode.h" #include "SkCanvas.h" -#include "SkParsePath.h" #include "SkPath.h" -#include "SkRandom.h" #include "SkView.h" -static void scale_to_width(SkPath* path, SkScalar dstWidth) { - const SkRect& bounds = path->getBounds(); - SkScalar scale = dstWidth / bounds.width(); - SkMatrix matrix; - - matrix.setScale(scale, scale); - path->transform(matrix); -} - -static const struct { - SkPaint::Style fStyle; - SkPaint::Join fJoin; - int fStrokeWidth; -} gRec[] = { - { SkPaint::kFill_Style, SkPaint::kMiter_Join, 0 }, - { SkPaint::kStroke_Style, SkPaint::kMiter_Join, 0 }, - { SkPaint::kStroke_Style, SkPaint::kMiter_Join, 10 }, - { SkPaint::kStrokeAndFill_Style, SkPaint::kMiter_Join, 10 }, -}; - -#define TEST_INVERSE 1 - class ComplexClipView : public SkView { - SkScalar fWidth; public: ComplexClipView() { } @@ -116,8 +91,7 @@ protected: canvas->scale(3 * SK_Scalar1 / 4, 3 * SK_Scalar1 / 4); canvas->save(); - int invALimit = TEST_INVERSE ? 2 : 1; - for (int invA = 0; invA < invALimit; ++invA) { + for (int invA = 0; invA < 2; ++invA) { for (int op = 0; op < SK_ARRAY_COUNT(gOps); ++op) { int idx = invA * SK_ARRAY_COUNT(gOps) + op; if (!(idx % 3)) { -- cgit v1.2.3