michael@0: michael@0: /* michael@0: * Copyright 2006 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: #ifndef SkStrokerPriv_DEFINED michael@0: #define SkStrokerPriv_DEFINED michael@0: michael@0: #include "SkStroke.h" michael@0: michael@0: #define CWX(x, y) (-y) michael@0: #define CWY(x, y) (x) michael@0: #define CCWX(x, y) (y) michael@0: #define CCWY(x, y) (-x) michael@0: michael@0: #define CUBIC_ARC_FACTOR ((SK_ScalarSqrt2 - SK_Scalar1) * 4 / 3) michael@0: michael@0: class SkStrokerPriv { michael@0: public: michael@0: typedef void (*CapProc)(SkPath* path, michael@0: const SkPoint& pivot, michael@0: const SkVector& normal, michael@0: const SkPoint& stop, michael@0: SkPath* otherPath); michael@0: michael@0: typedef void (*JoinProc)(SkPath* outer, SkPath* inner, michael@0: const SkVector& beforeUnitNormal, michael@0: const SkPoint& pivot, michael@0: const SkVector& afterUnitNormal, michael@0: SkScalar radius, SkScalar invMiterLimit, michael@0: bool prevIsLine, bool currIsLine); michael@0: michael@0: static CapProc CapFactory(SkPaint::Cap); michael@0: static JoinProc JoinFactory(SkPaint::Join); michael@0: }; michael@0: michael@0: #endif