OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include "SkPathOpsBounds.h" | 7 #include "SkPathOpsBounds.h" |
8 #include "SkPathOpsCubic.h" | 8 #include "SkPathOpsCubic.h" |
9 #include "SkPathOpsLine.h" | 9 #include "SkPathOpsLine.h" |
10 #include "SkPathOpsQuad.h" | 10 #include "SkPathOpsQuad.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 void SkPathOpsBounds::setQuadBounds(const SkPoint a[3]) { | 26 void SkPathOpsBounds::setQuadBounds(const SkPoint a[3]) { |
27 SkDQuad quad; | 27 SkDQuad quad; |
28 quad.set(a); | 28 quad.set(a); |
29 SkDRect dRect; | 29 SkDRect dRect; |
30 dRect.setBounds(quad); | 30 dRect.setBounds(quad); |
31 set(SkDoubleToScalar(dRect.fLeft), SkDoubleToScalar(dRect.fTop), | 31 set(SkDoubleToScalar(dRect.fLeft), SkDoubleToScalar(dRect.fTop), |
32 SkDoubleToScalar(dRect.fRight), SkDoubleToScalar(dRect.fBottom)); | 32 SkDoubleToScalar(dRect.fRight), SkDoubleToScalar(dRect.fBottom)); |
33 } | 33 } |
34 | 34 |
35 void (SkPathOpsBounds::*SetCurveBounds[])(const SkPoint[]) = { | 35 void (SkPathOpsBounds::* const SetCurveBounds[])(const SkPoint[]) = { |
36 NULL, | 36 NULL, |
37 &SkPathOpsBounds::setLineBounds, | 37 &SkPathOpsBounds::setLineBounds, |
38 &SkPathOpsBounds::setQuadBounds, | 38 &SkPathOpsBounds::setQuadBounds, |
39 &SkPathOpsBounds::setCubicBounds | 39 &SkPathOpsBounds::setCubicBounds |
40 }; | 40 }; |
OLD | NEW |