1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/pathops/SkReduceOrder.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +/* 1.5 + * Copyright 2012 Google Inc. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license that can be 1.8 + * found in the LICENSE file. 1.9 + */ 1.10 +#ifndef SkReduceOrder_DEFINED 1.11 +#define SkReduceOrder_DEFINED 1.12 + 1.13 +#include "SkPath.h" 1.14 +#include "SkPathOpsCubic.h" 1.15 +#include "SkPathOpsLine.h" 1.16 +#include "SkPathOpsQuad.h" 1.17 +#include "SkTArray.h" 1.18 + 1.19 +union SkReduceOrder { 1.20 + enum Quadratics { 1.21 + kNo_Quadratics, 1.22 + kAllow_Quadratics 1.23 + }; 1.24 + 1.25 + int reduce(const SkDCubic& cubic, Quadratics); 1.26 + int reduce(const SkDLine& line); 1.27 + int reduce(const SkDQuad& quad); 1.28 + 1.29 + static SkPath::Verb Cubic(const SkPoint pts[4], SkPoint* reducePts); 1.30 + static SkPath::Verb Quad(const SkPoint pts[3], SkPoint* reducePts); 1.31 + 1.32 + SkDLine fLine; 1.33 + SkDQuad fQuad; 1.34 + SkDCubic fCubic; 1.35 +}; 1.36 + 1.37 +#endif