Searched refs:pts (Results 151 - 175 of 314) sorted by relevance

1234567891011>>

/external/skia/tools/debugger/
H A DSkDebugCanvas.cpp609 const SkPoint pts[], const SkPaint& paint) {
610 this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint));
739 void SkDebugCanvas::outputPointsCommon(const SkPoint* pts, int count) { argument
741 this->outputScalar(pts[index].fX);
743 this->outputScalar(pts[index].fY);
750 void SkDebugCanvas::outputPoints(const SkPoint* pts, int count) { argument
751 this->outputPointsCommon(pts, count);
755 void SkDebugCanvas::outputConicPoints(const SkPoint* pts, SkScalar weight) { argument
756 this->outputPointsCommon(pts, 2);
770 SkPoint pts[ local
608 onDrawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint& paint) argument
[all...]
H A DSkDebugCanvas.h227 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override;
303 void outputConicPoints(const SkPoint* pts, SkScalar weight);
304 void outputPoints(const SkPoint* pts, int count);
305 void outputPointsCommon(const SkPoint* pts, int count);
H A DSkObjectParser.h78 @param pts[] Array of SkPoints
81 static SkString* PointsToString(const SkPoint pts[], size_t count);
/external/skia/samplecode/
H A DSampleRegion.cpp71 const SkPoint pts[] = { local
78 // of our pts[] array.
82 p.setShader(SkGradientShader::MakeLinear(pts, colors, pos, 3, SkShader::kClamp_TileMode));
103 const SkPoint pts[] = { { x, y }, { x + paint.measureText(str, len), y } }; local
106 paint.setShader(SkGradientShader::MakeLinear(pts, colors, pos,
232 void drawPredicates(SkCanvas* canvas, const SkPoint pts[]) { argument
236 drawstr(canvas, "Intersects", pts[0], rgn.intersects(fRect));
237 drawstr(canvas, "Contains", pts[1], rgn.contains(fRect));
H A DSampleDitherBitmap.cpp28 SkPoint pts[] = { { r.fLeft, r.fTop }, { r.fRight, r.fTop } }; local
31 p.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode));
H A DSampleTiling.cpp31 SkPoint pts[] = { { 0, 0 }, { SkIntToScalar(w), SkIntToScalar(h) } }; local
37 paint.setShader(SkGradientShader::MakeLinear(pts, colors, pos,
/external/skia/src/core/
H A DSkRegion_path.cpp278 SkPoint pts[4]; local
285 while ((verb = iter.next(pts, false)) != SkPath::kDone_Verb) {
291 if (top > pts[i].fY) {
292 top = pts[i].fY;
293 } else if (bot < pts[i].fY) {
294 bot = pts[i].fY;
298 if (top > pts[0].fY) {
299 top = pts[0].fY;
300 } else if (bot < pts[0].fY) {
301 bot = pts[
[all...]
H A DSkGeometry.cpp843 dst[i] = pair.pts[i].asSkPoint();
1132 static SkPoint* subdivide(const SkConic& src, SkPoint pts[], int level) { argument
1136 memcpy(pts, &src.fPts[1], 2 * sizeof(SkPoint));
1137 return pts + 2;
1168 pts = subdivide(dst[0], pts, level);
1169 return subdivide(dst[1], pts, level);
1173 int SkConic::chopIntoQuadsPOW2(SkPoint pts[], int pow2) const {
1175 *pts = fPts[0];
1183 pts[
1250 SkPoint pts[4]; local
1276 TransformW(const SkPoint pts[], SkScalar w, const SkMatrix& matrix) argument
[all...]
/external/skia/tests/
H A DGrShapeTest.cpp206 SkPoint pts[2]; local
207 if (!fPath.isLine(pts)) {
210 return pts[0].fX == pts[1].fX || pts[0].fY == pts[1].fY;
552 SkPoint pts[4] {{0, 0,}, {0, 0}, {0, 0}, {0, 0}} ;
554 REPORTER_ASSERT(r, a.asLine(pts, &invertedLine[0]) == b.asLine(pts + 2, &invertedLine[1]));
565 REPORTER_ASSERT(r, pts[
[all...]
/external/skia/src/effects/gradients/
H A DSkLinearGradient.cpp28 static SkMatrix pts_to_unit_matrix(const SkPoint pts[2]) { argument
29 SkVector vec = pts[1] - pts[0];
35 matrix.setSinCos(-vec.fY, vec.fX, pts[0].fX, pts[0].fY);
36 matrix.postTranslate(-pts[0].fX, -pts[0].fY);
52 SkLinearGradient::SkLinearGradient(const SkPoint pts[2], const Descriptor& desc) argument
53 : SkGradientShaderBase(desc, pts_to_unit_matrix(pts))
54 , fStart(pts[
63 SkPoint pts[2]; local
[all...]
/external/pdfium/fpdfsdk/pdfwindow/
H A DPWL_Utils.cpp57 CFX_PointF pts[8][3] = {{CFX_PointF(0.28f, 0.52f), CFX_PointF(0.27f, 0.48f), local
74 for (size_t i = 0; i < FX_ArraySize(pts); ++i) {
75 for (size_t j = 0; j < FX_ArraySize(pts[0]); ++j) {
76 pts[i][j].x = pts[i][j].x * fWidth + crBBox.left;
77 pts[i][j].y *= pts[i][j].y * fHeight + crBBox.bottom;
82 csAP << pts[0][0].x << " " << pts[0][0].y << " m\n";
84 for (size_t i = 0; i < FX_ArraySize(pts);
[all...]
/external/skia/include/core/
H A DSkPath.h647 * Chop a conic into N quads, stored continguously in pts[], where
651 SkScalar w, SkPoint pts[], int pow2);
833 * this->moveTo(pts[0]);
835 * this->lineTo(pts[i]);
841 void addPoly(const SkPoint pts[], int count, bool close);
985 @param pts The points representing the current verb and/or segment
994 Verb next(SkPoint pts[4], bool doConsumeDegerates = true, bool exact = false) { argument
998 return this->doNext(pts);
1035 Verb autoClose(SkPoint pts[2]);
1037 Verb doNext(SkPoint pts[
1060 next(SkPoint pts[4]) argument
[all...]
H A DSkRect.h554 void set(const SkPoint pts[], int count) {
558 (void)this->setBoundsCheck(pts, count);
561 // alias for set(pts, count)
562 void setBounds(const SkPoint pts[], int count) {
563 (void)this->setBoundsCheck(pts, count);
571 bool setBoundsCheck(const SkPoint pts[], int count);
781 void growToInclude(const SkPoint pts[], int count) {
782 this->growToInclude(pts, sizeof(SkPoint), count);
786 void growToInclude(const SkPoint pts[], size_t stride, int count) {
789 const SkPoint* end = (const SkPoint*)((intptr_t)pts
268 SkASSERT(fLeft < fRight && fTop < fBottom); SkASSERT(left < right && top < bottom); return fLeft <= left && fTop <= top && fRight >= right && fBottom >= bottom; } bool containsNoEmptyCheck(const SkIRect& r) const { return containsNoEmptyCheck(r.fLeft, r.fTop, r.fRight, r.fBottom); } bool intersect(const SkIRect& r) { return this->intersect(r.fLeft, r.fTop, r.fRight, r.fBottom); } bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& a, const SkIRect& b) { if (!a.isEmpty() && !b.isEmpty() && a.fLeft < b.fRight && b.fLeft < a.fRight && a.fTop < b.fBottom && b.fTop < a.fBottom) { fLeft = SkMax32(a.fLeft, b.fLeft); fTop = SkMax32(a.fTop, b.fTop); fRight = SkMin32(a.fRight, b.fRight); fBottom = SkMin32(a.fBottom, b.fBottom); return true; } return false; } bool SK_WARN_UNUSED_RESULT intersectNoEmptyCheck(const SkIRect& a, const SkIRect& b) { SkASSERT(!a.isEmpty() && !b.isEmpty()); if (a.fLeft < b.fRight && b.fLeft < a.fRight && a.fTop < b.fBottom && b.fTop < a.fBottom) { fLeft = SkMax32(a.fLeft, b.fLeft); fTop = SkMax32(a.fTop, b.fTop); fRight = SkMin32(a.fRight, b.fRight); fBottom = SkMin32(a.fBottom, b.fBottom); return true; } return false; } bool intersect(int32_t left, int32_t top, int32_t right, int32_t bottom) { if (left < right && top < bottom && !this->isEmpty() && fLeft < right && left < fRight && fTop < bottom && top < fBottom) { if (fLeft < left) fLeft = left; if (fTop < top) fTop = top; if (fRight > right) fRight = right; if (fBottom > bottom) fBottom = bottom; return true; } return false; } static bool Intersects(const SkIRect& a, const SkIRect& b) { return !a.isEmpty() && !b.isEmpty() && a.fLeft < b.fRight && b.fLeft < a.fRight && a.fTop < b.fBottom && b.fTop < a.fBottom; } static bool IntersectsNoEmptyCheck(const SkIRect& a, const SkIRect& b) { SkASSERT(!a.isEmpty()); SkASSERT(!b.isEmpty()); return a.fLeft < b.fRight && b.fLeft < a.fRight && a.fTop < b.fBottom && b.fTop < a.fBottom; } void join(int32_t left, int32_t top, int32_t right, int32_t bottom); void join(const SkIRect& r) { this->join(r.fLeft, r.fTop, r.fRight, r.fBottom); } void sort(); static const SkIRect& SK_WARN_UNUSED_RESULT EmptyIRect() { static const SkIRect gEmpty = { 0, 0, 0, 0 }; return gEmpty; } }; struct SK_API SkRect { SkScalar fLeft, fTop, fRight, fBottom; static constexpr SkRect SK_WARN_UNUSED_RESULT MakeEmpty() { return SkRect{0, 0, 0, 0}; } static SkRect SK_WARN_UNUSED_RESULT MakeLargest() { SkRect r; r.setLargest(); return r; } static SkRect SK_WARN_UNUSED_RESULT MakeWH(SkScalar w, SkScalar h) { SkRect r; r.set(0, 0, w, h); return r; } static SkRect SK_WARN_UNUSED_RESULT MakeIWH(int w, int h) { SkRect r; r.set(0, 0, SkIntToScalar(w), SkIntToScalar(h)); return r; } static SkRect SK_WARN_UNUSED_RESULT MakeSize(const SkSize& size) { SkRect r; r.set(0, 0, size.width(), size.height()); return r; } static constexpr SkRect SK_WARN_UNUSED_RESULT MakeLTRB(SkScalar l, SkScalar t, SkScalar r, SkScalar b) { return SkRect {l, t, r, b}; } static SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScalar w, SkScalar h) { SkRect r; r.set(x, y, x + w, y + h); return r; } SK_ATTR_DEPRECATED(�) static SkRect SK_WARN_UNUSED_RESULT MakeFromIRect(const SkIRect& irect) { SkRect r; r.set(SkIntToScalar(irect.fLeft), SkIntToScalar(irect.fTop), SkIntToScalar(irect.fRight), SkIntToScalar(irect.fBottom)); return r; } static SkRect Make(const SkISize& size) { return MakeIWH(size.width(), size.height()); } static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect) { SkRect r; r.set(SkIntToScalar(irect.fLeft), SkIntToScalar(irect.fTop), SkIntToScalar(irect.fRight), SkIntToScalar(irect.fBottom)); return r; } bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; } bool isLargest() const { return SK_ScalarMin == fLeft && SK_ScalarMin == fTop && SK_ScalarMax == fRight && SK_ScalarMax == fBottom; } bool isFinite() const { float accum = 0; accum *= fLeft; accum *= fTop; accum *= fRight; accum *= fBottom; SkASSERT(0 == accum || SkScalarIsNaN(accum)); return !SkScalarIsNaN(accum); } SkScalar x() const { return fLeft; } SkScalar y() const { return fTop; } SkScalar left() const { return fLeft; } SkScalar top() const { return fTop; } SkScalar right() const { return fRight; } SkScalar bottom() const { return fBottom; } SkScalar width() const { return fRight - fLeft; } SkScalar height() const { return fBottom - fTop; } SkScalar centerX() const { return SkScalarHalf(fLeft + fRight); } SkScalar centerY() const { return SkScalarHalf(fTop + fBottom); } friend bool operator==(const SkRect& a, const SkRect& b) { return SkScalarsEqual((SkScalar*)&a, (SkScalar*)&b, 4); } friend bool operator!=(const SkRect& a, const SkRect& b) { return !SkScalarsEqual((SkScalar*)&a, (SkScalar*)&b, 4); } void toQuad(SkPoint quad[4]) const; void setEmpty() { *this = MakeEmpty(); } void set(const SkIRect& src) { fLeft = SkIntToScalar(src.fLeft); fTop = SkIntToScalar(src.fTop); fRight = SkIntToScalar(src.fRight); fBottom = SkIntToScalar(src.fBottom); } void set(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) { fLeft = left; fTop = top; fRight = right; fBottom = bottom; } void setLTRB(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) { this->set(left, top, right, bottom); } void iset(int left, int top, int right, int bottom) { fLeft = SkIntToScalar(left); fTop = SkIntToScalar(top); fRight = SkIntToScalar(right); fBottom = SkIntToScalar(bottom); } void isetWH(int width, int height) { fLeft = fTop = 0; fRight = SkIntToScalar(width); fBottom = SkIntToScalar(height); } void set(const SkPoint pts[], int count) { (void)this->setBoundsCheck(pts, count); } void setBounds(const SkPoint pts[], int count) { (void)this->setBoundsCheck(pts, count); } bool setBoundsCheck(const SkPoint pts[], int count); void set(const SkPoint& p0, const SkPoint& p1) { fLeft = SkMinScalar(p0.fX, p1.fX); fRight = SkMaxScalar(p0.fX, p1.fX); fTop = SkMinScalar(p0.fY, p1.fY); fBottom = SkMaxScalar(p0.fY, p1.fY); } void setXYWH(SkScalar x, SkScalar y, SkScalar width, SkScalar height) { fLeft = x; fTop = y; fRight = x + width; fBottom = y + height; } void setWH(SkScalar width, SkScalar height) { fLeft = 0; fTop = 0; fRight = width; fBottom = height; } void setLargest() { fLeft = fTop = SK_ScalarMin; fRight = fBottom = SK_ScalarMax; } void setLargestInverted() { fLeft = fTop = SK_ScalarMax; fRight = fBottom = SK_ScalarMin; } SkRect makeOffset(SkScalar dx, SkScalar dy) const { return MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy); } SkRect makeInset(SkScalar dx, SkScalar dy) const { return MakeLTRB(fLeft + dx, fTop + dy, fRight - dx, fBottom - dy); } SkRect makeOutset(SkScalar dx, SkScalar dy) const { return MakeLTRB(fLeft - dx, fTop - dy, fRight + dx, fBottom + dy); } void offset(SkScalar dx, SkScalar dy) { fLeft += dx; fTop += dy; fRight += dx; fBottom += dy; } void offset(const SkPoint& delta) { this->offset(delta.fX, delta.fY); } void offsetTo(SkScalar newX, SkScalar newY) { fRight += newX - fLeft; fBottom += newY - fTop; fLeft = newX; fTop = newY; } void inset(SkScalar dx, SkScalar dy) { fLeft += dx; fTop += dy; fRight -= dx; fBottom -= dy; } void outset(SkScalar dx, SkScalar dy) { this->inset(-dx, -dy); } bool intersect(const SkRect& r); bool intersect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom); bool SK_WARN_UNUSED_RESULT intersect(const SkRect& a, const SkRect& b); private: static bool Intersects(SkScalar al, SkScalar at, SkScalar ar, SkScalar ab, SkScalar bl, SkScalar bt, SkScalar br, SkScalar bb) { SkScalar L = SkMaxScalar(al, bl); SkScalar R = SkMinScalar(ar, br); SkScalar T = SkMaxScalar(at, bt); SkScalar B = SkMinScalar(ab, bb); return L < R && T < B; } public: bool intersects(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) const { return Intersects(fLeft, fTop, fRight, fBottom, left, top, right, bottom); } bool intersects(const SkRect& r) const { return Intersects(fLeft, fTop, fRight, fBottom, r.fLeft, r.fTop, r.fRight, r.fBottom); } static bool Intersects(const SkRect& a, const SkRect& b) { return Intersects(a.fLeft, a.fTop, a.fRight, a.fBottom, b.fLeft, b.fTop, b.fRight, b.fBottom); } void join(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom); void join(const SkRect& r) { this->join(r.fLeft, r.fTop, r.fRight, r.fBottom); } void joinNonEmptyArg(const SkRect& r) { SkASSERT(!r.isEmpty()); if (fLeft >= fRight || fTop >= fBottom) { *this = r; } else { this->joinPossiblyEmptyRect(r); } } void joinPossiblyEmptyRect(const SkRect& r) { fLeft = SkMinScalar(fLeft, r.left()); fTop = SkMinScalar(fTop, r.top()); fRight = SkMaxScalar(fRight, r.right()); fBottom = SkMaxScalar(fBottom, r.bottom()); } void growToInclude(SkScalar x, SkScalar y) { fLeft = SkMinScalar(x, fLeft); fRight = SkMaxScalar(x, fRight); fTop = SkMinScalar(y, fTop); fBottom = SkMaxScalar(y, fBottom); } void growToInclude(const SkPoint pts[], int count) { this->growToInclude(pts, sizeof(SkPoint), count); } void growToInclude(const SkPoint pts[], size_t stride, int count) { SkASSERT(count >= 0); SkASSERT(stride >= sizeof(SkPoint)); const SkPoint* end = (const SkPoint*)((intptr_t)pts + count * stride); for (; pts < end; pts = (const SkPoint*)((intptr_t)pts + stride)) { this->growToInclude(pts->fX, pts->fY); } } bool contains(const SkRect& r) const { return !r.isEmpty() && !this->isEmpty() && fLeft <= r.fLeft && fTop <= r.fTop && fRight >= r.fRight && fBottom >= r.fBottom; } bool contains(const SkIRect& r) const { return !r.isEmpty() && !this->isEmpty() && fLeft <= SkIntToScalar(r.fLeft) && fTop <= SkIntToScalar(r.fTop) && fRight >= SkIntToScalar(r.fRight) && fBottom >= SkIntToScalar(r.fBottom); } void round(SkIRect* dst) const { SkASSERT(dst); dst->set(SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop), SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom)); } void roundOut(SkIRect* dst) const { SkASSERT(dst); dst->set(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop), SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)); } void roundOut(SkRect* dst) const { dst->set(SkScalarFloorToScalar(fLeft), SkScalarFloorToScalar(fTop), SkScalarCeilToScalar(fRight), SkScalarCeilToScalar(fBottom)); } void roundIn(SkIRect* dst) const { SkASSERT(dst); dst->set(SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop), SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)); } SkIRect round() const { SkIRect ir; this->round(&ir); return ir; } SkIRect roundOut() const { SkIRect ir; this->roundOut(&ir); return ir; } void sort() { if (fLeft > fRight) argument
[all...]
H A DSkMatrix.h443 dst[] = M * pts[]
444 @param pts The points to be transformed. It must contain at least
446 @param count The number of points in pts.
448 void mapPoints(SkPoint pts[], int count) const { argument
449 this->mapPoints(pts, pts, count);
455 void mapPointsWithStride(SkPoint pts[], size_t stride, int count) const { argument
459 this->mapPoints(pts, pts, 1);
460 pts
[all...]
/external/libvpx/libvpx/test/
H A Dvideo_source.h118 virtual vpx_codec_pts_t pts() const = 0;
155 // Models a stream where Timebase = 1/FPS, so pts == frame.
156 virtual vpx_codec_pts_t pts() const { return frame_; } function in class:libvpx_test::DummyVideoSource
/external/libvpx/libvpx/vpx/
H A Dvpx_encoder.h178 vpx_codec_pts_t pts; member in struct:vpx_codec_cx_pkt::__anon12000::__anon12001
354 * pts to correspond to the frame number, which can be handy. For
867 * \param[in] pts Presentation time stamp, in timebase units.
880 vpx_codec_pts_t pts, unsigned long duration,
/external/skia/experimental/svg/model/
H A DSkSVGLinearGradient.cpp122 const SkPoint pts[2] = { {x1, y1}, {x2, y2}}; local
141 paint->setShader(SkGradientShader::MakeLinear(pts, colors.begin(), pos.begin(), colors.count(),
/external/skia/gm/
H A Daarectmodes.cpp17 SkPoint pts[] = { local
37 SkPoint* ptPtr = pts;
H A Dcolormatrix.cpp68 SkPoint pts[] = {{0, 0}, {SkIntToScalar(width), SkIntToScalar(height)}}; local
71 paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2,
H A Dlcdblendmodes.cpp27 const SkPoint pts[] = { local
34 return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
H A Dmatrixconvolution.cpp43 SkPoint pts[2] = { SkPoint::Make(0, 0), local
47 pts, fColors, pos, 2, SkShader::kClamp_TileMode));
H A Dpatch.cpp17 const SkPoint pts[] = { { 100.f / 4.f, 0.f }, { 3.f * 100.f / 4.f, 100.f } }; local
19 return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
H A Dsrcmode.cpp26 const SkPoint pts[] = { { 0, 0 }, { W, H } }; local
27 paint->setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
H A Dstrokes.cpp246 SkPoint pts[] = {{105.738571f,13.126318f}, local
249 SkVector tangent = pts[1] - pts[2];
252 memcpy(pts2, pts, sizeof(pts));
265 path.moveTo(pts[0]);
266 path.quadTo(pts[1], pts[2]);
/external/skia/src/c/
H A Dsk_effects.cpp49 sk_shader_t* sk_shader_new_linear_gradient(const sk_point_t pts[2], argument
65 return (sk_shader_t*)SkGradientShader::MakeLinear(reinterpret_cast<const SkPoint*>(pts),

Completed in 1328 milliseconds

1234567891011>>