Home
last modified time | relevance | path

Searched refs:inset (Results 1 - 25 of 110) sorted by relevance

12345

/third_party/skia/docs/examples/
H A DImageInfo_makeWH.cpp13 SkBitmap inset; in REG_FIDDLE() local
14 inset.allocPixels(insetImageInfo); in REG_FIDDLE()
15 SkCanvas offscreen(inset); in REG_FIDDLE()
16 offscreen.drawImageRect(image, SkRect::Make(source.bounds()), SkRect::Make(inset.bounds()), in REG_FIDDLE()
18 canvas->drawImage(inset.asImage(), canvasBounds.width() / 4, canvasBounds.height() / 4); in REG_FIDDLE()
H A DPixmap_addr.cpp13 SkPixmap inset; in REG_FIDDLE() local
14 if (pixmap.extractSubset(&inset, {128, 128, 512, 512})) { in REG_FIDDLE()
15 SkDebugf("inset address: 0x%p\n", inset.addr()); in REG_FIDDLE()
H A DPixmap_info.cpp12 SkPixmap inset; in REG_FIDDLE() local
13 if (pixmap.extractSubset(&inset, {128, 128, 512, 512})) { in REG_FIDDLE()
14 const SkImageInfo& info = inset.info(); in REG_FIDDLE()
H A DPixmap_extractSubset.cpp12 SkPixmap inset; in REG_FIDDLE() local
13 if (pixmap.extractSubset(&inset, {128, 128, 512, 512})) { in REG_FIDDLE()
15 bitmap.installPixels(inset); in REG_FIDDLE()
H A DRect_inset.cpp8 rect.inset(5, 13); in REG_FIDDLE()
/third_party/skia/experimental/graphite/src/geom/
H A DRect.h21 * Some operations (e.g., intersect, inset) may return a negative or empty rect
123 AI Rect makeInset(float inset) const { return fVals + inset; } in makeInset()
124 AI Rect makeInset(float2 inset) const { return fVals + inset.xyxy(); } in makeInset()
134 AI Rect& inset(float inset) { return *this = this->makeInset(inset); } in inset() argument
135 AI Rect& inset(float2 inset) { retur in inset() argument
[all...]
/third_party/skia/src/effects/imagefilters/
H A DSkMagnifierImageFilter.cpp30 SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, sk_sp<SkImageFilter> input, in SkMagnifierImageFilter() argument
34 , fInset(inset) { in SkMagnifierImageFilter()
35 SkASSERT(srcRect.left() >= 0 && srcRect.top() >= 0 && inset >= 0); in SkMagnifierImageFilter()
56 const SkRect& srcRect, SkScalar inset, sk_sp<SkImageFilter> input, in Magnifier()
58 if (!SkScalarIsFinite(inset) || !SkIsValidRect(srcRect)) { in Magnifier()
61 if (inset < 0) { in Magnifier()
68 return sk_sp<SkImageFilter>(new SkMagnifierImageFilter(srcRect, inset, std::move(input), in Magnifier()
245 // a square twice the size of the inset. in onFilterImage()
55 Magnifier( const SkRect& srcRect, SkScalar inset, sk_sp<SkImageFilter> input, const CropRect& cropRect) Magnifier() argument
/third_party/skia/gm/
H A Dpathinterior.cpp19 static SkRect inset(const SkRect& r) { in inset() function
21 rect.inset(r.width() / 8, r.height() / 8); in inset()
82 SkRect r = insetFirst ? inset(rect) : rect;
88 r = insetFirst ? rect : inset(rect);
H A Daddarc.cpp44 const SkScalar inset = paint.getStrokeWidth() + 4; variable
60 r.inset(inset, inset);
144 r.inset(delta, delta);
197 r.inset(delta, delta);
H A Drrect.cpp26 r.inset(dx, dy); in inset0()
46 r.inset(dx, dy); in inset1()
62 r.inset(dx, dy); in inset2()
90 r.inset(dx, dy); in inset3()
H A Daaclip.cpp40 target.inset(SkIntToScalar(-2), SkIntToScalar(-2)); in draw()
42 target.inset(SkIntToScalar(2), SkIntToScalar(2)); in draw()
45 target.inset(SkIntToScalar(-4), SkIntToScalar(-4)); in draw()
H A Dstrokes.cpp339 static SkRect inset(const SkRect& r) { in inset() function
341 rr.inset(r.width()/10, r.height()/10); in inset()
348 path->addRect(inset(bounds), SkPathDirection::kCW); in make0()
354 path->addRect(inset(bounds), SkPathDirection::kCCW); in make1()
360 path->addOval(inset(bounds), SkPathDirection::kCW); in make2()
366 path->addOval(inset(bounds), SkPathDirection::kCCW); in make3()
373 r.inset(bounds.width() / 10, -bounds.height() / 10); in make4()
381 r.inset(bounds.width() / 10, -bounds.height() / 10); in make5()
H A Dresizeimagefilter.cpp62 ovalRect.inset(SkIntToScalar(4), SkIntToScalar(4)); in draw()
103 ovalRect.inset(SkIntToScalar(2)/3, SkIntToScalar(2)/3);
H A Dsimple_magnification.cpp72 * SkMagnifierImageFilter is then used to blow it up with different inset border widths.
76 * BottomLeft origin + 1-wide inset | TopLeft origin + 1-wide inset
78 * BottomLeft origin + 7-wide inset | TopLeft origin + 7-wide inset
97 void draw(SkCanvas* canvas, sk_sp<SkImage> image, const SkIPoint& offset, int inset) { in draw() argument
101 sk_sp<SkImageFilter> magFilter(SkImageFilters::Magnifier(srcRect, inset, imgSrc)); in draw()
/third_party/skia/fuzz/
H A DFuzzPolyUtils.cpp29 SkScalar inset; in DEF_FUZZ() local
30 fuzz->next(&inset); in DEF_FUZZ()
32 ignoreResult(SkInsetConvexPolygon(polygon, count, inset, &output)); in DEF_FUZZ()
/third_party/skia/src/utils/
H A DSkShadowTessellator.cpp55 bool computeConvexShadow(SkScalar inset, SkScalar outset, bool doClip);
65 bool computeConcaveShadow(SkScalar inset, SkScalar outset);
246 bool SkBaseShadowTessellator::computeConvexShadow(SkScalar inset, SkScalar outset, bool doClip) { in computeConvexShadow() argument
251 // adjust inset distance and umbra color if necessary in computeConvexShadow()
273 if (inset > SK_ScalarNearlyZero) { in computeConvexShadow()
275 if (minDistSq < (inset + kTolerance)*(inset + kTolerance)) { in computeConvexShadow()
278 auto ratio = 128 * (newInset / inset + 1); in computeConvexShadow()
282 inset = newInset; in computeConvexShadow()
286 if (!SkInsetConvexPolygon(&fPathPolygon[0], fPathPolygon.count(), inset, in computeConvexShadow()
553 computeConcaveShadow(SkScalar inset, SkScalar outset) computeConcaveShadow() argument
912 auto inset = outset * SkDrawShadowMetrics::AmbientRecipAlpha(baseZ) - outset; SkAmbientShadowTessellator() local
1014 SkScalar inset = outset; SkSpotShadowTessellator() local
[all...]
/third_party/skia/include/core/
H A DSkRRect.h321 void inset(SkScalar dx, SkScalar dy, SkRRect* dst) const;
337 void inset(SkScalar dx, SkScalar dy) { in inset() function in SkRRect
338 this->inset(dx, dy, this); in inset()
357 this->inset(-dx, -dy, dst); in outset()
375 this->inset(-dx, -dy, this); in outset()
/third_party/skia/src/gpu/ops/
H A DStrokeRectOp.cpp339 devInside->inset(rx, ry); in compute_aa_rects()
361 devOutside->inset(0, ry); in compute_aa_rects()
825 // How much do we inset toward the inside of the strokes? in generateAAStrokeRectGeometry()
826 float inset = std::min(0.5f, std::min(devHalfStrokeSize.fX, devHalfStrokeSize.fY)); in generateAAStrokeRectGeometry() local
828 if (inset < 0.5f) { in generateAAStrokeRectGeometry()
830 innerCoverage = 2 * inset / (inset + .5f); in generateAAStrokeRectGeometry()
835 float outset = 1 - inset; in generateAAStrokeRectGeometry()
850 std::min(inset + msaaExtraBloat, in generateAAStrokeRectGeometry()
851 std::min(devHalfStrokeSize.fX, devHalfStrokeSize.fY)) - inset; in generateAAStrokeRectGeometry()
[all...]
H A DShadowRRectOp.cpp425 // In the case where we have to inset more for the umbra, our two triangles in the in fillInRRectVerts()
493 SkScalar inset = umbraInset + args.fInnerRadius; in fillInRRectVerts() local
496 (*verts)->fPos = SkPoint::Make(bounds.fLeft + inset, bounds.fTop + inset); in fillInRRectVerts()
503 (*verts)->fPos = SkPoint::Make(bounds.fRight - inset, bounds.fTop + inset); in fillInRRectVerts()
510 (*verts)->fPos = SkPoint::Make(bounds.fLeft + inset, bounds.fBottom - inset); in fillInRRectVerts()
517 (*verts)->fPos = SkPoint::Make(bounds.fRight - inset, bounds.fBottom - inset); in fillInRRectVerts()
[all...]
/third_party/skia/tests/
H A DDefaultPathRendererTest.cpp55 static SkPath make_path(const SkRect& outer, int inset, SkPathFillType fill) { in make_path() argument
59 p.addRect(outer.makeInset(inset, inset), SkPathDirection::kCCW); in make_path()
H A DPaintTest.cpp73 SkScalar inset = paint.getStrokeJoin() == SkPaint::kMiter_Join ? in DEF_TEST() local
76 maxR.inset(-inset, -inset); in DEF_TEST()
H A DRecordDrawTest.cpp127 SkRect inset(a), outset(a); in sloppy_rect_eq()
128 inset.inset(1, 1); in sloppy_rect_eq()
130 return outset.contains(b) && !inset.contains(b); in sloppy_rect_eq()
H A DRRectInPathTest.cpp220 rr.inset(-20, -20, &rr2); in test_inset()
223 rr.inset(20, 20, &rr2); in test_inset()
226 rr.inset(r.width()/2, r.height()/2, &rr2); in test_inset()
230 rr.inset(19, 19, &rr2); in test_inset()
232 rr.inset(20, 20, &rr2); in test_inset()
/third_party/skia/bench/
H A DRegionBench.cpp39 r.inset(r.width()/4, r.height()/4); in containsrect_proc()
43 r.inset(r.width()/4, r.height()/4); in containsrect_proc()
53 r.inset(r.width()/4, r.height()/4); in sectsrect_proc()
/third_party/skia/samplecode/
H A DSampleDegenerateQuads.cpp122 // every outset line. When that happens, calculate coverage using the "inset" lines and flip in get_edge_dist_coverage()
280 // Calculate inset and outset lines for edge-distance visualization
319 pixelRect.inset(0.1f, 0.1f);
326 pixelRect.inset(0.38f, 0.38f);
332 // Draw the inset/outset "infinite" lines
341 // Both outset and inset are the same line, so only draw one in cyan
412 void getTessellatedPoints(SkPoint inset[4], SkScalar insetCoverage[4], SkPoint outset[4],
434 // The first quad in vertices is the inset, then the outset, but they
436 inset[0] = {vertices[0], vertices[1]}; // TL
438 inset[
[all...]

Completed in 13 milliseconds

12345