Home
last modified time | relevance | path

Searched refs:paint (Results 1 – 25 of 1519) sorted by relevance

12345678910>>...61

/external/skia/src/utils/
DSkPaintFilterCanvas.cpp17 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint* paint) in AutoPaintFilter() argument
18 : fPaint(paint) { in AutoPaintFilter()
22 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint& paint) in AutoPaintFilter() argument
23 : AutoPaintFilter(canvas, type, &paint) { } in AutoPaintFilter()
25 const SkPaint* paint() const { return fPaint; } in paint() function in SkPaintFilterCanvas::AutoPaintFilter
45 void SkPaintFilterCanvas::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
46 AutoPaintFilter apf(this, kPaint_Type, paint); in onDrawPaint()
48 this->SkNWayCanvas::onDrawPaint(*apf.paint()); in onDrawPaint()
52 void SkPaintFilterCanvas::onDrawBehind(const SkPaint& paint) { in onDrawBehind() argument
53 AutoPaintFilter apf(this, kPaint_Type, paint); in onDrawBehind()
[all …]
/external/skqp/src/utils/
DSkPaintFilterCanvas.cpp17 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint* paint) in AutoPaintFilter() argument
18 : fPaint(paint) { in AutoPaintFilter()
22 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint& paint) in AutoPaintFilter() argument
23 : AutoPaintFilter(canvas, type, &paint) { } in AutoPaintFilter()
25 const SkPaint* paint() const { return fPaint; } in paint() function in SkPaintFilterCanvas::AutoPaintFilter
45 void SkPaintFilterCanvas::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
46 AutoPaintFilter apf(this, kPaint_Type, paint); in onDrawPaint()
48 this->SkNWayCanvas::onDrawPaint(*apf.paint()); in onDrawPaint()
53 const SkPaint& paint) { in onDrawPoints() argument
54 AutoPaintFilter apf(this, kPoint_Type, paint); in onDrawPoints()
[all …]
/external/skia/gm/
Ddisplacement.cpp49 void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) const { in drawClippedBitmap()
53 canvas->drawBitmap(fBitmap, 0, 0, &paint); in drawClippedBitmap()
59 SkPaint paint; in onDraw() local
61 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
64 this->drawClippedBitmap(canvas, 0, 0, paint); in onDraw()
65 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
68 this->drawClippedBitmap(canvas, 100, 0, paint); in onDraw()
69 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
72 this->drawClippedBitmap(canvas, 200, 0, paint); in onDraw()
73 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
[all …]
Dconcavepaths.cpp14 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument
21 canvas->drawPath(path, paint); in test_concave()
25 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument
33 canvas->drawPath(path, paint); in test_reverse_concave()
38 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
46 canvas->drawPath(path, paint); in test_bowtie()
51 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
61 canvas->drawPath(path, paint); in test_fake_bowtie()
67 void test_intruding_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_intruding_vertex() argument
78 canvas->drawPath(path, paint); in test_intruding_vertex()
[all …]
Ddaa.cpp18 SkPaint paint; variable
19 paint.setAntiAlias(true);
22 paint.setColor(SK_ColorBLACK);
24 K*1.5f, K*0.5f, SkFont(), paint);
26 paint.setColor(SK_ColorRED);
27 canvas->drawRect({0,0,K,K}, paint);
35 paint.setColor(SK_ColorGREEN);
36 canvas->drawPath(path, paint);
41 paint.setColor(SK_ColorBLACK);
43 K*1.5f, K*0.5f, SkFont(), paint);
[all …]
Dcolormatrix.cpp16 static void set_color_matrix(SkPaint* paint, const SkColorMatrix& matrix) { in set_color_matrix() argument
17 paint->setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix.fMat)); in set_color_matrix()
20 static void set_array(SkPaint* paint, const SkScalar array[]) { in set_array() argument
21 paint->setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(array)); in set_array()
51 SkPaint paint; in CreateSolidBitmap() local
52 paint.setColor(SkColorSetARGB(255, x * 255 / width, y * 255 / height, 0)); in CreateSolidBitmap()
54 SkIntToScalar(y), SK_Scalar1, SK_Scalar1), paint); in CreateSolidBitmap()
69 SkPaint paint; in CreateTransparentBitmap() local
70 paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2, in CreateTransparentBitmap()
72 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), paint); in CreateTransparentBitmap()
[all …]
Dconicpaths.cpp88 SkPaint paint; in drawGiantCircle() local
89 canvas->drawPath(fGiantCircle, paint); in drawGiantCircle()
98 SkPaint paint; in onDraw() local
102 paint.setARGB(kAlphaValue[a], 0, 0, 0); in onDraw()
104 paint.setAntiAlias(SkToBool(aa)); in onDraw()
106 paint.setStyle(fh ? SkPaint::kStroke_Style : SkPaint::kFill_Style); in onDraw()
111 canvas->drawPath(fPaths[p], paint); in onDraw()
140 SkPaint paint; variable
141 paint.setAntiAlias(true);
142 paint.setStyle(SkPaint::kStroke_Style);
[all …]
Dpatheffects.cpp18 static void compose_pe(SkPaint* paint) { in compose_pe() argument
19 SkPathEffect* pe = paint->getPathEffect(); in compose_pe()
27 paint->setPathEffect(compose); in compose_pe()
30 static void hair_pe(SkPaint* paint) { in hair_pe() argument
31 paint->setStrokeWidth(0); in hair_pe()
34 static void hair2_pe(SkPaint* paint) { in hair2_pe() argument
35 paint->setStrokeWidth(0); in hair2_pe()
36 compose_pe(paint); in hair2_pe()
39 static void stroke_pe(SkPaint* paint) { in stroke_pe() argument
40 paint->setStrokeWidth(12); in stroke_pe()
[all …]
Dpatch.cpp27 SkPaint paint; in draw_control_points() local
37 paint.setColor(SK_ColorBLACK); in draw_control_points()
38 paint.setStrokeWidth(0.5f); in draw_control_points()
40 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, bottom, paint); in draw_control_points()
41 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, bottom + 1, paint); in draw_control_points()
42 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, top, paint); in draw_control_points()
43 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, left, paint); in draw_control_points()
44 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, right, paint); in draw_control_points()
46 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, top + 1, paint); in draw_control_points()
47 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, left + 1, paint); in draw_control_points()
[all …]
/external/skqp/gm/
Ddisplacement.cpp49 void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) const { in drawClippedBitmap()
53 canvas->drawBitmap(fBitmap, 0, 0, &paint); in drawClippedBitmap()
59 SkPaint paint; in onDraw() local
61 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
64 this->drawClippedBitmap(canvas, 0, 0, paint); in onDraw()
65 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
68 this->drawClippedBitmap(canvas, 100, 0, paint); in onDraw()
69 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
72 this->drawClippedBitmap(canvas, 200, 0, paint); in onDraw()
73 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
[all …]
Dconcavepaths.cpp14 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument
21 canvas->drawPath(path, paint); in test_concave()
25 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument
33 canvas->drawPath(path, paint); in test_reverse_concave()
38 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
46 canvas->drawPath(path, paint); in test_bowtie()
51 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
61 canvas->drawPath(path, paint); in test_fake_bowtie()
67 void test_intruding_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_intruding_vertex() argument
78 canvas->drawPath(path, paint); in test_intruding_vertex()
[all …]
Dcolormatrix.cpp16 static void set_color_matrix(SkPaint* paint, const SkColorMatrix& matrix) { in set_color_matrix() argument
17 paint->setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix.fMat)); in set_color_matrix()
20 static void set_array(SkPaint* paint, const SkScalar array[]) { in set_array() argument
21 paint->setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(array)); in set_array()
51 SkPaint paint; in CreateSolidBitmap() local
52 paint.setColor(SkColorSetARGB(255, x * 255 / width, y * 255 / height, 0)); in CreateSolidBitmap()
54 SkIntToScalar(y), SK_Scalar1, SK_Scalar1), paint); in CreateSolidBitmap()
69 SkPaint paint; in CreateTransparentBitmap() local
70 paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2, in CreateTransparentBitmap()
72 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), paint); in CreateTransparentBitmap()
[all …]
Dpatheffects.cpp18 static void compose_pe(SkPaint* paint) { in compose_pe() argument
19 SkPathEffect* pe = paint->getPathEffect(); in compose_pe()
27 paint->setPathEffect(compose); in compose_pe()
30 static void hair_pe(SkPaint* paint) { in hair_pe() argument
31 paint->setStrokeWidth(0); in hair_pe()
34 static void hair2_pe(SkPaint* paint) { in hair2_pe() argument
35 paint->setStrokeWidth(0); in hair2_pe()
36 compose_pe(paint); in hair2_pe()
39 static void stroke_pe(SkPaint* paint) { in stroke_pe() argument
40 paint->setStrokeWidth(12); in stroke_pe()
[all …]
Dpatch.cpp27 SkPaint paint; in draw_control_points() local
37 paint.setColor(SK_ColorBLACK); in draw_control_points()
38 paint.setStrokeWidth(0.5f); in draw_control_points()
40 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, bottom, paint); in draw_control_points()
41 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, bottom + 1, paint); in draw_control_points()
42 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, top, paint); in draw_control_points()
43 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, left, paint); in draw_control_points()
44 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, right, paint); in draw_control_points()
46 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, top + 1, paint); in draw_control_points()
47 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, left + 1, paint); in draw_control_points()
[all …]
/external/skia/src/core/
DSkPaint.cpp234 static FlatFlags unpack_paint_flags(SkPaint* paint, uint32_t packed, SkFont* font) { in unpack_paint_flags() argument
236 paint->setAntiAlias((f & kAA_PaintFlagForPaint) != 0); in unpack_paint_flags()
237 paint->setDither((f & kDither_PaintFlagForPaint) != 0); in unpack_paint_flags()
258 paint->setFilterQuality((SkFilterQuality)((packed >> 10) & BPF_Mask(kFilter_BPF))); in unpack_paint_flags()
279 static uint32_t pack_v68(const SkPaint& paint, unsigned flatFlags) { in pack_v68() argument
281 packed |= shift_bits(((unsigned)paint.isDither() << 1) | in pack_v68()
282 (unsigned)paint.isAntiAlias(), 0, 8); in pack_v68()
283 packed |= shift_bits(paint.getBlendMode(), 8, 8); in pack_v68()
284 packed |= shift_bits(paint.getStrokeCap(), 16, 2); in pack_v68()
285 packed |= shift_bits(paint.getStrokeJoin(), 18, 2); in pack_v68()
[all …]
DSkCanvas.cpp67 bool SkCanvas::wouldOverwriteEntireSurface(const SkRect* rect, const SkPaint* paint, in wouldOverwriteEntireSurface() argument
106 if (paint) { in wouldOverwriteEntireSurface()
107 SkPaint::Style paintStyle = paint->getStyle(); in wouldOverwriteEntireSurface()
112 if (paint->getMaskFilter() || paint->getLooper() in wouldOverwriteEntireSurface()
113 || paint->getPathEffect() || paint->getImageFilter()) { in wouldOverwriteEntireSurface()
117 return SkPaintPriv::Overwrites(paint, (SkPaintPriv::ShaderOverrideOpacity)overrideOpacity); in wouldOverwriteEntireSurface()
156 void SkCanvas::predrawNotify(const SkRect* rect, const SkPaint* paint, in predrawNotify() argument
165 if (this->wouldOverwriteEntireSurface(rect, paint, overrideOpacity)) { in predrawNotify()
191 DeviceCM(sk_sp<SkBaseDevice> device, const SkPaint* paint, const SkMatrix& stashed, in DeviceCM()
195 , fPaint(paint ? skstd::make_unique<SkPaint>(*paint) : nullptr) in DeviceCM()
[all …]
DSkLiteDL.cpp87 SaveLayer(const SkRect* bounds, const SkPaint* paint, in SaveLayer()
91 if (paint) { this->paint = *paint; } in SaveLayer()
98 SkPaint paint; member
104 c->saveLayer({ maybe_unset(bounds), &paint, backdrop.get(), clipMask.get(), in draw()
175 DrawPaint(const SkPaint& paint) : paint(paint) {} in DrawPaint()
176 SkPaint paint; member
177 void draw(SkCanvas* c, const SkMatrix&) const { c->drawPaint(paint); } in draw()
181 DrawBehind(const SkPaint& paint) : paint(paint) {} in DrawBehind()
182 SkPaint paint; member
183 void draw(SkCanvas* c, const SkMatrix&) const { SkCanvasPriv::DrawBehind(c, paint); } in draw()
[all …]
DSkLiteRecorder.cpp60 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
61 fDL->drawPaint(paint); in onDrawPaint()
63 void SkLiteRecorder::onDrawBehind(const SkPaint& paint) { in onDrawBehind() argument
64 fDL->drawBehind(paint); in onDrawBehind()
66 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { in onDrawPath() argument
67 fDL->drawPath(path, paint); in onDrawPath()
69 void SkLiteRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { in onDrawRect() argument
70 fDL->drawRect(rect, paint); in onDrawRect()
76 void SkLiteRecorder::onDrawRegion(const SkRegion& region, const SkPaint& paint) { in onDrawRegion() argument
77 fDL->drawRegion(region, paint); in onDrawRegion()
[all …]
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowCanvas.java77 protected void drawText(String text, float x, float y, Paint paint) { in drawText() argument
78 drawnTextEventHistory.add(new TextHistoryEvent(x, y, paint, text)); in drawText()
82 protected void drawText(CharSequence text, int start, int end, float x, float y, Paint paint) { in drawText() argument
84 new TextHistoryEvent(x, y, paint, text.subSequence(start, end).toString())); in drawText()
88 protected void drawText(char[] text, int index, int count, float x, float y, Paint paint) { in drawText() argument
89 drawnTextEventHistory.add(new TextHistoryEvent(x, y, paint, new String(text, index, count))); in drawText()
93 protected void drawText(String text, int start, int end, float x, float y, Paint paint) { in drawText() argument
94 drawnTextEventHistory.add(new TextHistoryEvent(x, y, paint, text.substring(start, end))); in drawText()
116 protected void drawPaint(Paint paint) { in drawPaint() argument
117 drawnPaint = paint; in drawPaint()
[all …]
/external/skqp/src/core/
DSkCanvas.cpp68 bool SkCanvas::wouldOverwriteEntireSurface(const SkRect* rect, const SkPaint* paint, in wouldOverwriteEntireSurface() argument
107 if (paint) { in wouldOverwriteEntireSurface()
108 SkPaint::Style paintStyle = paint->getStyle(); in wouldOverwriteEntireSurface()
113 if (paint->getMaskFilter() || paint->getLooper() in wouldOverwriteEntireSurface()
114 || paint->getPathEffect() || paint->getImageFilter()) { in wouldOverwriteEntireSurface()
118 return SkPaintPriv::Overwrites(paint, (SkPaintPriv::ShaderOverrideOpacity)overrideOpacity); in wouldOverwriteEntireSurface()
157 void SkCanvas::predrawNotify(const SkRect* rect, const SkPaint* paint, in predrawNotify() argument
166 if (this->wouldOverwriteEntireSurface(rect, paint, overrideOpacity)) { in predrawNotify()
192 DeviceCM(sk_sp<SkBaseDevice> device, const SkPaint* paint, const SkMatrix& stashed, in DeviceCM()
196 , fPaint(paint ? skstd::make_unique<SkPaint>(*paint) : nullptr) in DeviceCM()
[all …]
DSkPaint.cpp300 static FlatFlags unpack_paint_flags(SkPaint* paint, uint32_t packed, SkFont* font) { in unpack_paint_flags() argument
302 paint->setAntiAlias((f & kAA_PaintFlagForPaint) != 0); in unpack_paint_flags()
303 paint->setDither((f & kDither_PaintFlagForPaint) != 0); in unpack_paint_flags()
324 paint->setFilterQuality((SkFilterQuality)((packed >> 10) & BPF_Mask(kFilter_BPF))); in unpack_paint_flags()
345 static uint32_t pack_v68(const SkPaint& paint, unsigned flatFlags) { in pack_v68() argument
347 packed |= shift_bits(((unsigned)paint.isDither() << 1) | in pack_v68()
348 (unsigned)paint.isAntiAlias(), 0, 8); in pack_v68()
349 packed |= shift_bits(paint.getBlendMode(), 8, 8); in pack_v68()
350 packed |= shift_bits(paint.getStrokeCap(), 16, 2); in pack_v68()
351 packed |= shift_bits(paint.getStrokeJoin(), 18, 2); in pack_v68()
[all …]
DSkLiteDL.cpp87 SaveLayer(const SkRect* bounds, const SkPaint* paint, in SaveLayer()
91 if (paint) { this->paint = *paint; } in SaveLayer()
98 SkPaint paint; member
104 c->saveLayer({ maybe_unset(bounds), &paint, backdrop.get(), clipMask.get(), in draw()
175 DrawPaint(const SkPaint& paint) : paint(paint) {} in DrawPaint()
176 SkPaint paint; member
177 void draw(SkCanvas* c, const SkMatrix&) const { c->drawPaint(paint); } in draw()
181 DrawPath(const SkPath& path, const SkPaint& paint) : path(path), paint(paint) {} in DrawPath()
183 SkPaint paint; member
184 void draw(SkCanvas* c, const SkMatrix&) const { c->drawPath(path, paint); } in draw()
[all …]
DSkLiteRecorder.cpp60 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
61 fDL->drawPaint(paint); in onDrawPaint()
63 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { in onDrawPath() argument
64 fDL->drawPath(path, paint); in onDrawPath()
66 void SkLiteRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { in onDrawRect() argument
67 fDL->drawRect(rect, paint); in onDrawRect()
73 void SkLiteRecorder::onDrawRegion(const SkRegion& region, const SkPaint& paint) { in onDrawRegion() argument
74 fDL->drawRegion(region, paint); in onDrawRegion()
76 void SkLiteRecorder::onDrawOval(const SkRect& oval, const SkPaint& paint) { in onDrawOval() argument
77 fDL->drawOval(oval, paint); in onDrawOval()
[all …]
/external/skia/tests/
DPaintTest.cpp132 SkPaint paint; in DEF_TEST() local
134 paint.setStyle(SkPaint::kStrokeAndFill_Style); in DEF_TEST()
135 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
138 paint.setLooper(looperBuilder.detach()); in DEF_TEST()
139 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, in DEF_TEST()
143 SkPaint copiedPaint = paint; in DEF_TEST()
144 REPORTER_ASSERT(reporter, paint.getHash() == copiedPaint.getHash()); in DEF_TEST()
145 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
148 copiedPaint = paint; in DEF_TEST()
149 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
[all …]
/external/skqp/tests/
DPaintTest.cpp132 SkPaint paint; in DEF_TEST() local
134 paint.setStyle(SkPaint::kStrokeAndFill_Style); in DEF_TEST()
135 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
138 paint.setLooper(looperBuilder.detach()); in DEF_TEST()
139 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, in DEF_TEST()
143 SkPaint copiedPaint = paint; in DEF_TEST()
144 REPORTER_ASSERT(reporter, paint.getHash() == copiedPaint.getHash()); in DEF_TEST()
145 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
148 copiedPaint = paint; in DEF_TEST()
149 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
[all …]

12345678910>>...61