Home
last modified time | relevance | path

Searched refs:SkScalar (Results 1 – 25 of 776) sorted by relevance

12345678910>>...32

/external/skia/include/core/
DSkMatrix.h26 static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar sx, SkScalar sy) { in MakeScale()
32 static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar scale) { in MakeScale()
38 static SkMatrix SK_WARN_UNUSED_RESULT MakeTrans(SkScalar dx, SkScalar dy) { in MakeTrans()
103 bool isSimilarity(SkScalar tol = SK_ScalarNearlyZero) const;
109 bool preservesRightAngles(SkScalar tol = SK_ScalarNearlyZero) const;
135 SkScalar operator[](int index) const {
140 SkScalar get(int index) const { in get()
145 SkScalar getScaleX() const { return fMat[kMScaleX]; } in getScaleX()
146 SkScalar getScaleY() const { return fMat[kMScaleY]; } in getScaleY()
147 SkScalar getSkewY() const { return fMat[kMSkewY]; } in getSkewY()
[all …]
DSkScalar.h22 typedef float SkScalar; typedef
65 typedef double SkScalar; typedef
110 #define SkIntToScalar(x) static_cast<SkScalar>(x)
114 #define SkFloatToScalar(x) static_cast<SkScalar>(x)
116 #define SkDoubleToScalar(x) static_cast<SkScalar>(x)
120 static inline bool SkScalarIsNaN(SkScalar x) { return x != x; } in SkScalarIsNaN()
124 static inline bool SkScalarIsFinite(SkScalar x) { in SkScalarIsFinite()
129 SkScalar prod = x * 0; in SkScalarIsFinite()
134 static inline bool SkScalarsAreFinite(SkScalar a, SkScalar b) { in SkScalarsAreFinite()
135 SkScalar prod = 0; in SkScalarsAreFinite()
[all …]
DSkPath.h322 void moveTo(SkScalar x, SkScalar y);
341 void rMoveTo(SkScalar dx, SkScalar dy);
350 void lineTo(SkScalar x, SkScalar y);
371 void rLineTo(SkScalar dx, SkScalar dy);
382 void quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2);
408 void rQuadTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2);
410 void conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
411 SkScalar w);
412 void conicTo(const SkPoint& p1, const SkPoint& p2, SkScalar w) { in conicTo()
415 void rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
[all …]
DSkPoint.h157 SkScalar fX, fY;
159 static SkPoint Make(SkScalar x, SkScalar y) { in Make()
165 SkScalar x() const { return fX; } in x()
166 SkScalar y() const { return fY; } in y()
174 void set(SkScalar x, SkScalar y) { fX = x; fY = y; } in set()
208 void setRectFan(SkScalar l, SkScalar t, SkScalar r, SkScalar b) { in setRectFan()
216 void setRectFan(SkScalar l, SkScalar t, SkScalar r, SkScalar b, size_t stride) { in setRectFan()
230 static void Offset(SkPoint points[], int count, SkScalar dx, SkScalar dy) { in Offset()
236 void offset(SkScalar dx, SkScalar dy) { in offset()
243 SkScalar length() const { return SkPoint::Length(fX, fY); } in length()
[all …]
DSkRect.h391 SkScalar fLeft, fTop, fRight, fBottom;
405 static SkRect SK_WARN_UNUSED_RESULT MakeWH(SkScalar w, SkScalar h) { in MakeWH()
423 static SkRect SK_WARN_UNUSED_RESULT MakeLTRB(SkScalar l, SkScalar t, SkScalar r, SkScalar b) { in MakeLTRB()
429 static SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScalar w, SkScalar h) { in MakeXYWH()
484 SkScalar x() const { return fLeft; } in x()
485 SkScalar y() const { return fTop; } in y()
486 SkScalar left() const { return fLeft; } in left()
487 SkScalar top() const { return fTop; } in top()
488 SkScalar right() const { return fRight; } in right()
489 SkScalar bottom() const { return fBottom; } in bottom()
[all …]
DSkPaint.h413 SkScalar getStrokeWidth() const { return fWidth; } in getStrokeWidth()
421 void setStrokeWidth(SkScalar width);
428 SkScalar getStrokeMiter() const { return fMiterLimit; } in getStrokeMiter()
436 void setStrokeMiter(SkScalar miter);
503 SkScalar resScale = 1) const;
713 SkScalar getTextSize() const { return fTextSize; } in getTextSize()
718 void setTextSize(SkScalar textSize);
724 SkScalar getTextScaleX() const { return fTextScaleX; } in getTextScaleX()
732 void setTextScaleX(SkScalar scaleX);
738 SkScalar getTextSkewX() const { return fTextSkewX; } in getTextSkewX()
[all …]
DSkPathMeasure.h37 SkScalar getLength();
44 bool SK_WARN_UNUSED_RESULT getPosTan(SkScalar distance, SkPoint* position,
58 bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix* matrix,
67 bool getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, bool startWithMoveTo);
85 SkScalar fLength; // relative to the current contour
91 SkScalar fDistance; // total distance up to this point
96 SkScalar getScalarT() const;
104 SkScalar compute_quad_segs(const SkPoint pts[3], SkScalar distance,
106 SkScalar compute_conic_segs(const SkConic&, SkScalar distance, int mint, int maxt, int ptIndex);
107 SkScalar compute_cubic_segs(const SkPoint pts[3], SkScalar distance,
[all …]
/external/skia/include/utils/
DSkCamera.h18 SkScalar fX, fY, fZ;
20 void set(SkScalar x, SkScalar y, SkScalar z) { in set()
23 static SkScalar Dot(const SkUnit3D&, const SkUnit3D&);
28 SkScalar fX, fY, fZ;
30 void set(SkScalar x, SkScalar y, SkScalar z) { in set()
33 SkScalar normalize(SkUnit3D*) const;
38 SkScalar fMat[3][4];
42 void setRow(int row, SkScalar a, SkScalar b, SkScalar c, SkScalar d = 0) {
50 void setRotateX(SkScalar deg);
51 void setRotateY(SkScalar deg);
[all …]
DSkInterpolator.h52 void setRepeatCount(SkScalar repeatCount) { fRepeat = repeatCount; } in setRepeatCount()
62 Result timeToT(SkMSec time, SkScalar* T, int* index, SkBool* exact) const;
70 static SkScalar ComputeRelativeT(SkMSec time, SkMSec prevTime,
71 SkMSec nextTime, const SkScalar blend[4] = NULL);
75 SkScalar fRepeat;
78 SkScalar fBlend[4];
104 bool setKeyFrame(int index, SkMSec time, const SkScalar values[],
105 const SkScalar blend[4] = NULL);
114 Result timeToValues(SkMSec time, SkScalar values[] = NULL) const;
117 SkScalar* fValues; // pointer into fStorage
[all …]
/external/skia/src/effects/
DSkColorMatrix.cpp19 static bool component_needs_clamping(const SkScalar row[5]) { in component_needs_clamping()
20 SkScalar maxValue = row[4] / 255; in component_needs_clamping()
21 SkScalar minValue = row[4] / 255; in component_needs_clamping()
31 bool SkColorMatrix::NeedsClamping(const SkScalar matrix[20]) { in NeedsClamping()
38 void SkColorMatrix::SetConcat(SkScalar result[20], in SetConcat()
39 const SkScalar outer[20], const SkScalar inner[20]) { in SetConcat()
40 SkScalar tmp[20]; in SetConcat()
41 SkScalar* target; in SetConcat()
65 memcpy(result, target, 20 * sizeof(SkScalar)); in SetConcat()
76 void SkColorMatrix::setScale(SkScalar rScale, SkScalar gScale, SkScalar bScale, in setScale()
[all …]
/external/skia/include/effects/
DSkColorMatrix.h18 SkScalar fMat[kCount];
33 void setScale(SkScalar rScale, SkScalar gScale, SkScalar bScale,
34 SkScalar aScale = SK_Scalar1);
35 void preScale(SkScalar rScale, SkScalar gScale, SkScalar bScale,
36 SkScalar aScale = SK_Scalar1);
37 void postScale(SkScalar rScale, SkScalar gScale, SkScalar bScale,
38 SkScalar aScale = SK_Scalar1);
39 void postTranslate(SkScalar rTrans, SkScalar gTrans, SkScalar bTrans,
40 SkScalar aTrans = 0);
47 void setRotate(Axis, SkScalar degrees);
[all …]
DSkLightingImageFilter.h17 SkPoint3(SkScalar x, SkScalar y, SkScalar z) in SkPoint3()
19 SkScalar dot(const SkPoint3& other) const { in dot()
22 SkScalar maxComponent() const { in maxComponent()
27 SkScalar scale = SkScalarInvert(SkScalarSqrt(dot(*this)) + SK_ScalarNearlyZero); in normalize()
32 SkPoint3 operator*(SkScalar scalar) const {
41 SkScalar fX, fY, fZ;
49 SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
52 SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
55 const SkPoint3& target, SkScalar specularExponent, SkScalar cutoffAngle,
56 SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
[all …]
DSkGradientShader.h46 const SkColor colors[], const SkScalar pos[], int count,
51 const SkColor colors[], const SkScalar pos[], int count, in CreateLinear()
72 static SkShader* CreateRadial(const SkPoint& center, SkScalar radius,
73 const SkColor colors[], const SkScalar pos[], int count,
77 static SkShader* CreateRadial(const SkPoint& center, SkScalar radius, in CreateRadial()
78 const SkColor colors[], const SkScalar pos[], int count, in CreateRadial()
89 static SkShader* CreateTwoPointConical(const SkPoint& start, SkScalar startRadius,
90 const SkPoint& end, SkScalar endRadius,
91 const SkColor colors[], const SkScalar pos[], int count,
95 static SkShader* CreateTwoPointConical(const SkPoint& start, SkScalar startRadius, in CreateTwoPointConical()
[all …]
/external/skia/src/core/
DSkGeometry.cpp38 static int is_not_monotonic(SkScalar a, SkScalar b, SkScalar c) { in is_not_monotonic()
39 SkScalar ab = a - b; in is_not_monotonic()
40 SkScalar bc = b - c; in is_not_monotonic()
49 static bool is_unit_interval(SkScalar x) { in is_unit_interval()
53 static int valid_unit_divide(SkScalar numer, SkScalar denom, SkScalar* ratio) { in valid_unit_divide()
65 SkScalar r = numer / denom; in valid_unit_divide()
83 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2]) { in SkFindUnitQuadRoots()
90 SkScalar* r = roots; in SkFindUnitQuadRoots()
92 SkScalar R = B*B - 4*A*C; in SkFindUnitQuadRoots()
98 SkScalar Q = (B < 0) ? -(B-R)/2 : -(B+R)/2; in SkFindUnitQuadRoots()
[all …]
DSkGeometry.h32 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2]);
36 SkPoint SkEvalQuadAt(const SkPoint src[3], SkScalar t);
37 SkPoint SkEvalQuadTangentAt(const SkPoint src[3], SkScalar t);
42 void SkEvalQuadAt(const SkPoint src[3], SkScalar t, SkPoint* pt, SkVector* tangent = NULL);
58 void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t);
73 int SkFindQuadExtrema(SkScalar a, SkScalar b, SkScalar c, SkScalar tValues[1]);
88 SkScalar SkFindQuadMaxCurvature(const SkPoint src[3]);
110 void SkEvalCubicAt(const SkPoint src[4], SkScalar t, SkPoint* locOrNull,
117 void SkChopCubicAt(const SkPoint src[4], SkPoint dst[7], SkScalar t);
123 void SkChopCubicAt(const SkPoint src[4], SkPoint dst[], const SkScalar t[],
[all …]
DSkMaskGamma.cpp15 SkScalar toLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luminance) const override { in toLuma()
19 SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const override { in fromLuma()
26 SkScalar toLuma(SkScalar gamma, SkScalar luminance) const override { in toLuma()
29 SkScalar fromLuma(SkScalar gamma, SkScalar luma) const override { in fromLuma()
35 SkScalar toLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luminance) const override { in toLuma()
45 SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const override { in fromLuma()
57 /*static*/ const SkColorSpaceLuminance& SkColorSpaceLuminance::Fetch(SkScalar gamma) { in Fetch()
75 void SkTMaskGamma_build_correcting_lut(uint8_t table[256], U8CPU srcI, SkScalar contrast, in SkTMaskGamma_build_correcting_lut()
76 const SkColorSpaceLuminance& srcConvert, SkScalar srcGamma, in SkTMaskGamma_build_correcting_lut()
77 const SkColorSpaceLuminance& dstConvert, SkScalar dstGamma) { in SkTMaskGamma_build_correcting_lut()
DSkCubicClipper.cpp23 static bool chopMonoCubicAtY(SkPoint pts[4], SkScalar y, SkScalar* t) { in chopMonoCubicAtY()
24 SkScalar ycrv[4]; in chopMonoCubicAtY()
34 SkScalar t1 = ycrv[0] / (ycrv[0] - ycrv[3]); in chopMonoCubicAtY()
37 const SkScalar tol = SK_Scalar1 / 16384; // This leaves 2 fixed noise bits. in chopMonoCubicAtY()
38 SkScalar t0; in chopMonoCubicAtY()
44 SkScalar y01 = SkScalarInterp(ycrv[0], ycrv[1], t0); in chopMonoCubicAtY()
45 SkScalar y12 = SkScalarInterp(ycrv[1], ycrv[2], t0); in chopMonoCubicAtY()
46 SkScalar y23 = SkScalarInterp(ycrv[2], ycrv[3], t0); in chopMonoCubicAtY()
47 SkScalar y012 = SkScalarInterp(y01, y12, t0); in chopMonoCubicAtY()
48 SkScalar y123 = SkScalarInterp(y12, y23, t0); in chopMonoCubicAtY()
[all …]
DSkMatrix.cpp15 static void normalize_perspective(SkScalar mat[9]) { in normalize_perspective()
26 SkScalar p2 = mat[SkMatrix::kMPersp2]; in normalize_perspective()
70 void SkMatrix::set9(const SkScalar buffer[]) { in set9()
71 memcpy(fMat, buffer, 9 * sizeof(SkScalar)); in set9()
76 void SkMatrix::setAffine(const SkScalar buffer[]) { in setAffine()
179 const SkScalar* SK_RESTRICT ma = a.fMat; in operator ==()
180 const SkScalar* SK_RESTRICT mb = b.fMat; in operator ==()
190 static inline bool is_degenerate_2x2(SkScalar scaleX, SkScalar skewX, in is_degenerate_2x2()
191 SkScalar skewY, SkScalar scaleY) { in is_degenerate_2x2()
192 SkScalar perp_dot = scaleX*scaleY - skewX*skewY; in is_degenerate_2x2()
[all …]
/external/skia/src/utils/
DSkCamera.cpp10 static SkScalar SkScalarDotDiv(int count, const SkScalar a[], int step_a, in SkScalarDotDiv()
11 const SkScalar b[], int step_b, in SkScalarDotDiv()
12 SkScalar denom) { in SkScalarDotDiv()
13 SkScalar prod = 0; in SkScalarDotDiv()
22 static SkScalar SkScalarDot(int count, const SkScalar a[], int step_a, in SkScalarDot()
23 const SkScalar b[], int step_b) { in SkScalarDot()
24 SkScalar prod = 0; in SkScalarDot()
35 SkScalar SkPoint3D::normalize(SkUnit3D* unit) const { in normalize()
36 SkScalar mag = SkScalarSqrt(fX*fX + fY*fY + fZ*fZ); in normalize()
38 SkScalar scale = SkScalarInvert(mag); in normalize()
[all …]
DSkCubicInterval.cpp10 static SkScalar eval_cubic(SkScalar c1, SkScalar c2, SkScalar c3, in eval_cubic()
11 SkScalar t) { in eval_cubic()
15 static SkScalar find_cubic_t(SkScalar c1, SkScalar c2, SkScalar c3, in find_cubic_t()
16 SkScalar targetX) { in find_cubic_t()
17 SkScalar minT = 0; in find_cubic_t()
18 SkScalar maxT = SK_Scalar1; in find_cubic_t()
19 SkScalar t; in find_cubic_t()
23 SkScalar x = eval_cubic(c1, c2, c3, t); in find_cubic_t()
49 SkScalar SkEvalCubicInterval(SkScalar x1, SkScalar y1, in SkEvalCubicInterval()
50 SkScalar x2, SkScalar y2, in SkEvalCubicInterval()
[all …]
/external/skia/src/gpu/
DGrAtlasTextContext.h49 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) override;
53 const SkScalar pos[], int scalarsPerPosition,
56 const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x, SkScalar y,
125 SkScalar fTextRatio; // df property
155 BigGlyph(const SkPath& path, SkScalar vx, SkScalar vy) in BigGlyph()
160 SkScalar fVx;
161 SkScalar fVy;
184 SkScalar fFrameWidth;
185 SkScalar fMiterLimit;
205 SkScalar fX;
[all …]
DGrPathUtils.cpp13 SkScalar GrPathUtils::scaleToleranceToSrc(SkScalar devTol, in scaleToleranceToSrc()
18 SkScalar stretch = viewM.getMaxScale(); in scaleToleranceToSrc()
19 SkScalar srcTol = devTol; in scaleToleranceToSrc()
36 static const SkScalar gMinCurveTol = 0.0001f;
39 SkScalar tol) { in quadraticPointCount()
45 SkScalar d = points[1].distanceToLineSegmentBetween(points[0], points[2]); in quadraticPointCount()
53 SkScalar divSqrt = SkScalarSqrt(d / tol); in quadraticPointCount()
54 if (((SkScalar)SK_MaxS32) <= divSqrt) { in quadraticPointCount()
73 SkScalar tolSqd, in generateQuadraticPoints()
96 SkScalar tol) { in cubicPointCount()
[all …]
/external/skia/src/pathops/
DSkPathOpsCurve.h20 SkScalar fWeight;
67 SkDPoint conicTop(const SkPoint curve[3], SkScalar curveWeight,
69 SkDPoint cubicTop(const SkPoint curve[4], SkScalar , double s, double e, double* topT);
71 SkDPoint lineTop(const SkPoint[2], SkScalar , double , double , double* topT);
72 SkDPoint quadTop(const SkPoint curve[3], SkScalar , double s, double e, double* topT);
74 void setConicBounds(const SkPoint curve[3], SkScalar curveWeight,
76 void setCubicBounds(const SkPoint curve[4], SkScalar ,
78 void setQuadBounds(const SkPoint curve[3], SkScalar ,
83 extern SkDPoint (SkDCurve::* const Top[])(const SkPoint curve[], SkScalar cWeight,
86 static SkDPoint dline_xy_at_t(const SkPoint a[2], SkScalar , double t) { in dline_xy_at_t() argument
[all …]
/external/skia/gm/
Dinversepaths.cpp14 static SkPath generate_square(SkScalar cx, SkScalar cy, SkScalar w) { in generate_square()
21 static SkPath generate_rect_line(SkScalar cx, SkScalar cy, SkScalar l) { in generate_rect_line()
28 static SkPath generate_circle(SkScalar cx, SkScalar cy, SkScalar d) { in generate_circle()
34 static SkPath generate_line(SkScalar cx, SkScalar cy, SkScalar l) { in generate_line()
46 SkScalar pathSizes[] = {
51 SkScalar strokeWidths[] = {
55 SkPath ((*paths[])(SkScalar, SkScalar, SkScalar)) = {
62 const SkScalar slideWidth = 90, slideHeight = 90;
63 const SkScalar slideBoundary = 5;
83 SkScalar cx = slideWidth / 2 + slideBoundary; in onDraw()
[all …]
/external/skia/experimental/
DSkSetPoly3To3_A.cpp15 static SkScalar SkDScalar_toScalar(SkDScalar value) { in SkDScalar_toScalar()
18 static SkScalar divide(SkDScalar numer, SkDScalar denom) { in divide()
22 static SkDScalar SkDScalar_setMul(SkScalar a, SkScalar b) { in SkDScalar_setMul()
26 static void computeOuterProduct(SkScalar op[4], in computeOuterProduct()
31 SkScalar x0 = pts0[i].fX - ave0.fX; in computeOuterProduct()
32 SkScalar y0 = pts0[i].fY - ave0.fY; in computeOuterProduct()
33 SkScalar x1 = pts1[i].fX - ave1.fX; in computeOuterProduct()
34 SkScalar y1 = pts1[i].fY - ave1.fY; in computeOuterProduct()
42 static SkDScalar ddot(SkScalar ax, SkScalar ay, SkScalar bx, SkScalar by) { in ddot()
46 static SkScalar dot(SkScalar ax, SkScalar ay, SkScalar bx, SkScalar by) { in dot()
[all …]

12345678910>>...32