Home
last modified time | relevance | path

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

12345678910>>...28

/external/mesa3d/src/gallium/state_trackers/vega/
Dpaint.c197 struct vg_paint *paint = CALLOC_STRUCT(vg_paint); in paint_create() local
201 vg_init_object(&paint->base, ctx, VG_OBJECT_PAINT); in paint_create()
202 vg_context_add_object(ctx, &paint->base); in paint_create()
204 paint->type = VG_PAINT_TYPE_COLOR; in paint_create()
205 memcpy(paint->solid.color, default_color, in paint_create()
207 paint->gradient.spread = VG_COLOR_RAMP_SPREAD_PAD; in paint_create()
208 memcpy(paint->gradient.linear.coords, def_ling, in paint_create()
210 memcpy(paint->gradient.radial.vals, def_radg, in paint_create()
213 paint->gradient.sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; in paint_create()
214 paint->gradient.sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; in paint_create()
[all …]
Dpaint.h41 void paint_destroy(struct vg_paint *paint);
43 void paint_set_color(struct vg_paint *paint,
45 void paint_get_color(struct vg_paint *paint,
48 void paint_set_coloriv(struct vg_paint *paint,
50 void paint_get_coloriv(struct vg_paint *paint,
53 void paint_set_colori(struct vg_paint *paint,
56 VGuint paint_colori(struct vg_paint *paint);
58 void paint_set_type(struct vg_paint *paint, VGPaintType type);
59 VGPaintType paint_type(struct vg_paint *paint);
60 void paint_resolve_type(struct vg_paint *paint);
[all …]
Dapi_paint.c52 void vegaSetPaint(VGPaint paint, VGbitfield paintModes) in vegaSetPaint() argument
56 if (paint == VG_INVALID_HANDLE) { in vegaSetPaint()
58 paint = paint_to_handle(ctx->default_paint); in vegaSetPaint()
59 } else if (!vg_object_is_valid(paint, VG_OBJECT_PAINT)) { in vegaSetPaint()
70 ctx->state.vg.fill_paint = handle_to_paint(paint); in vegaSetPaint()
73 ctx->state.vg.stroke_paint = handle_to_paint(paint); in vegaSetPaint()
82 VGPaint paint = VG_INVALID_HANDLE; in vegaGetPaint() local
90 paint = paint_to_handle(ctx->state.vg.fill_paint); in vegaGetPaint()
92 paint = paint_to_handle(ctx->state.vg.stroke_paint); in vegaGetPaint()
94 if (paint == paint_to_handle(ctx->default_paint)) in vegaGetPaint()
[all …]
/external/skia/src/utils/
DSkPaintFilterCanvas.cpp15 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint* paint) { in AutoPaintFilter() argument
16 if (paint) { in AutoPaintFilter()
17 canvas->onFilterPaint(fLazyPaint.set(*paint), type); in AutoPaintFilter()
21 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint& paint) { in AutoPaintFilter() argument
22 canvas->onFilterPaint(fLazyPaint.set(paint), type); in AutoPaintFilter()
25 const SkPaint* paint() const { return fLazyPaint.getMaybeNull(); } in paint() function in SkPaintFilterCanvas::AutoPaintFilter
33 void SkPaintFilterCanvas::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
34 AutoPaintFilter apf(this, kPaint_Type, paint); in onDrawPaint()
35 this->INHERITED::onDrawPaint(*apf.paint()); in onDrawPaint()
39 const SkPaint& paint) { in onDrawPoints() argument
[all …]
DSkLuaCanvas.cpp89 SkCanvas::SaveLayerStrategy SkLuaCanvas::willSaveLayer(const SkRect* bounds, const SkPaint* paint, in willSaveLayer() argument
95 if (paint) { in willSaveLayer()
96 lua.pushPaint(*paint, "paint"); in willSaveLayer()
99 this->INHERITED::willSaveLayer(bounds, paint, flags); in willSaveLayer()
165 void SkLuaCanvas::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
167 lua.pushPaint(paint, "paint"); in onDrawPaint()
171 const SkPoint pts[], const SkPaint& paint) { in onDrawPoints() argument
174 lua.pushPaint(paint, "paint"); in onDrawPoints()
177 void SkLuaCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { in onDrawOval() argument
180 lua.pushPaint(paint, "paint"); in onDrawOval()
[all …]
DSkDeferredCanvas.cpp50 const SkPaint* paint, size_t bitmapSizeThreshold) { in should_draw_immediately() argument
60 if (paint) { in should_draw_immediately()
61 SkShader* shader = paint->getShader(); in should_draw_immediately()
195 void drawPaint(const SkDraw&, const SkPaint& paint) override in drawPaint() argument
199 const SkPaint& paint) override in drawPoints() argument
202 const SkPaint& paint) override in drawRect() argument
207 const SkPaint& paint) override in drawRRect() argument
210 const SkPaint& paint, in drawPath() argument
215 const SkMatrix& matrix, const SkPaint& paint) override in drawBitmap() argument
222 int x, int y, const SkPaint& paint) override in drawSprite() argument
[all …]
/external/skia/gm/
Ddisplacement.cpp39 SkPaint paint; in make_bitmap() local
40 paint.setAntiAlias(true); in make_bitmap()
41 sk_tool_utils::set_portable_typeface(&paint); in make_bitmap()
42 paint.setColor(0xFF884422); in make_bitmap()
43 paint.setTextSize(SkIntToScalar(96)); in make_bitmap()
45 canvas.drawText(str, strlen(str), SkIntToScalar(15), SkIntToScalar(55), paint); in make_bitmap()
58 void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) { in drawClippedBitmap() argument
62 canvas->drawBitmap(fBitmap, 0, 0, &paint); in drawClippedBitmap()
72 SkPaint paint; in onDraw() local
74 paint.setImageFilter(SkDisplacementMapEffect::Create( in onDraw()
[all …]
Dtechtalk1.cpp46 static void setFade(SkPaint* paint, bool showGL) { in setFade() argument
47 paint->setAlpha(showGL ? 0x66 : 0xFF); in setFade()
50 static void setGLFrame(SkPaint* paint) { in setGLFrame() argument
51 paint->setColor(0xFFFF0000); in setGLFrame()
52 paint->setStyle(SkPaint::kStroke_Style); in setGLFrame()
53 paint->setAntiAlias(true); in setGLFrame()
54 paint->setStrokeWidth(WIRE_FRAME_WIDTH); in setGLFrame()
58 SkPaint paint; in show_mesh() local
59 setGLFrame(&paint); in show_mesh()
61 canvas->drawRect(r, paint); in show_mesh()
[all …]
Dgradtext.cpp49 SkPaint paint; in onDraw() local
50 sk_tool_utils::set_portable_typeface(&paint); in onDraw()
55 paint.setColor(SK_ColorRED); in onDraw()
56 canvas->drawRect(r, paint); in onDraw()
59 paint.setShader(make_chrome_solid())->unref(); in onDraw()
60 paint.setTextSize(SkIntToScalar(500)); in onDraw()
62 canvas->drawText("I", 1, 0, 100, paint); in onDraw()
78 SkPaint paint; in onDraw() local
79 sk_tool_utils::set_portable_typeface(&paint); in onDraw()
81 paint.setStyle(SkPaint::kFill_Style); in onDraw()
[all …]
Dconcavepaths.cpp16 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument
23 canvas->drawPath(path, paint); in test_concave()
27 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument
35 canvas->drawPath(path, paint); in test_reverse_concave()
40 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
48 canvas->drawPath(path, paint); in test_bowtie()
53 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
63 canvas->drawPath(path, paint); in test_fake_bowtie()
68 void test_fish(SkCanvas* canvas, const SkPaint& paint) { in test_fish() argument
78 canvas->drawPath(path, paint); in test_fish()
[all …]
Dcolormatrix.cpp31 static void setColorMatrix(SkPaint* paint, const SkColorMatrix& matrix) { in setColorMatrix() argument
32 paint->setColorFilter(SkColorMatrixFilter::Create(matrix))->unref(); in setColorMatrix()
35 static void setArray(SkPaint* paint, const SkScalar array[]) { in setArray() argument
36 paint->setColorFilter(SkColorMatrixFilter::Create(array))->unref(); in setArray()
71 SkPaint paint; in createSolidBitmap() local
72 paint.setColor(SkColorSetARGB(255, x * 255 / width, y * 255 / height, 0)); in createSolidBitmap()
74 SkIntToScalar(y), SK_Scalar1, SK_Scalar1), paint); in createSolidBitmap()
89 SkPaint paint; in createTransparentBitmap() local
90 paint.setShader(SkGradientShader::CreateLinear(pts, colors, NULL, 2, in createTransparentBitmap()
92 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), paint); in createTransparentBitmap()
[all …]
Ddftext.cpp72 SkPaint paint; in onDraw() local
73 paint.setAntiAlias(true); in onDraw()
74 paint.setSubpixelText(true); in onDraw()
76 paint.setDistanceFieldTextTEMP(true); in onDraw()
78 sk_tool_utils::set_portable_typeface(&paint, "Times New Roman", SkTypeface::kNormal); in onDraw()
90 paint.setTextSize(textSizes[i]); in onDraw()
91 canvas->drawText(text, textLen, 0, 0, paint); in onDraw()
92 y += paint.getFontMetrics(NULL)*scales[i]; in onDraw()
104 paint.setTextSize(SkIntToScalar(ps)); in onDraw()
105 canvas->drawText(text, textLen, rotX, rotY, paint); in onDraw()
[all …]
Dpatheffects.cpp18 static void compose_pe(SkPaint* paint) { in compose_pe() argument
19 SkPathEffect* pe = paint->getPathEffect(); in compose_pe()
28 paint->setPathEffect(compose)->unref(); in compose_pe()
31 static void hair_pe(SkPaint* paint) { in hair_pe() argument
32 paint->setStrokeWidth(0); in hair_pe()
35 static void hair2_pe(SkPaint* paint) { in hair2_pe() argument
36 paint->setStrokeWidth(0); in hair2_pe()
37 compose_pe(paint); in hair2_pe()
40 static void stroke_pe(SkPaint* paint) { in stroke_pe() argument
41 paint->setStrokeWidth(12); in stroke_pe()
[all …]
Dimagefiltersbase.cpp109 SkPaint paint; in draw_paint() local
110 paint.setImageFilter(imf); in draw_paint()
111 paint.setColor(SK_ColorGREEN); in draw_paint()
114 canvas->drawPaint(paint); in draw_paint()
119 SkPaint paint; in draw_line() local
120 paint.setColor(SK_ColorBLUE); in draw_line()
121 paint.setImageFilter(imf); in draw_line()
122 paint.setStrokeWidth(r.width()/10); in draw_line()
123 canvas->drawLine(r.fLeft, r.fTop, r.fRight, r.fBottom, paint); in draw_line()
127 SkPaint paint; in draw_rect() local
[all …]
Dtextblobtransforms.cpp28 SkPaint paint; in onOnceBeforeDraw() local
29 paint.setTextSize(162); in onOnceBeforeDraw()
31 sk_tool_utils::set_portable_typeface(&paint); in onOnceBeforeDraw()
34 paint.measureText(text, strlen(text), &bounds); in onOnceBeforeDraw()
35 sk_tool_utils::add_to_text_blob(&builder, text, paint, 0, 0); in onOnceBeforeDraw()
39 paint.setTextSize(72); in onOnceBeforeDraw()
41 sk_tool_utils::add_to_text_blob(&builder, text, paint, xOffset, 0); in onOnceBeforeDraw()
43 paint.measureText(text, strlen(text), &bounds); in onOnceBeforeDraw()
47 paint.setTextSize(32); in onOnceBeforeDraw()
49 sk_tool_utils::add_to_text_blob(&builder, text, paint, xOffset, -yOffset - 10); in onOnceBeforeDraw()
[all …]
Dpatch.cpp26 SkPaint paint; in draw_control_points() local
36 paint.setColor(SK_ColorBLACK); in draw_control_points()
37 paint.setStrokeWidth(0.5f); in draw_control_points()
39 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, bottom, paint); in draw_control_points()
40 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, bottom + 1, paint); in draw_control_points()
41 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, top, paint); in draw_control_points()
42 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, left, paint); in draw_control_points()
43 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, right, paint); in draw_control_points()
45 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, top + 1, paint); in draw_control_points()
46 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, left + 1, paint); in draw_control_points()
[all …]
Dfontmgr.cpp22 SkScalar y, const SkPaint& paint) { in drawString() argument
23 canvas->drawText(text.c_str(), text.size(), x, y, paint); in drawString()
24 return x + paint.measureText(text.c_str(), text.size()); in drawString()
28 SkScalar y, SkPaint& paint, SkFontMgr* fm, in drawCharacter() argument
36 SkSafeUnref(paint.setTypeface(typeface)); in drawCharacter()
37 x = drawString(canvas, ch, x, y, paint) + 20; in drawCharacter()
49 SkSafeUnref(paint.setTypeface(typefaceCopy)); in drawCharacter()
50 return drawString(canvas, ch, x, y, paint) + 20; in drawCharacter()
81 SkPaint paint; in onDraw() local
82 paint.setAntiAlias(true); in onDraw()
[all …]
Dgammatext.cpp22 static bool setFont(SkPaint* paint, const char name[]) { in setFont() argument
25 paint->setTypeface(tf)->unref(); in setFont()
55 SkPaint paint; in drawGrad() local
56 paint.setShader(s)->unref(); in drawGrad()
58 canvas->drawRect(r, paint); in drawGrad()
74 SkPaint paint; in onDraw() local
75 setFont(&paint, "Times"); in onDraw()
76 paint.setTextSize(SkIntToScalar(16)); in onDraw()
77 paint.setAntiAlias(true); in onDraw()
78 paint.setLCDRenderText(true); in onDraw()
[all …]
/external/skia/tests/
DPaintTest.cpp47 static SkTypeface::Encoding paint2encoding(const SkPaint& paint) { in paint2encoding() argument
48 SkPaint::TextEncoding enc = paint.getTextEncoding(); in paint2encoding()
82 SkPaint paint; in DEF_TEST() local
83 paint.setTypeface(SkTypeface::RefDefault())->unref(); in DEF_TEST()
84 SkTypeface* face = paint.getTypeface(); in DEF_TEST()
95 paint.setTextEncoding(gRec[k].fEncoding); in DEF_TEST()
101 bool contains = paint.containsText(dst, len); in DEF_TEST()
102 int nglyphs = paint.textToGlyphs(dst, len, glyphs0); in DEF_TEST()
103 int first = face->charsToGlyphs(dst, paint2encoding(paint), glyphs1, NGLYPHS); in DEF_TEST()
142 SkPaint paint; in DEF_TEST() local
[all …]
DFontObjTest.cpp13 static bool is_use_nonlinear_metrics(const SkPaint& paint) { in is_use_nonlinear_metrics() argument
14 return !paint.isSubpixelText() && !paint.isLinearText(); in is_use_nonlinear_metrics()
17 static bool is_enable_auto_hints(const SkPaint& paint) { in is_enable_auto_hints() argument
18 return paint.isAutohinted(); in is_enable_auto_hints()
21 static bool is_enable_bytecode_hints(const SkPaint& paint) { in is_enable_bytecode_hints() argument
22 return paint.getHinting() >= SkPaint::kFull_Hinting; in is_enable_bytecode_hints()
25 static void test_cachedfont(skiatest::Reporter* reporter, const SkPaint& paint) { in test_cachedfont() argument
26 SkAutoTUnref<SkFont> font(SkFont::Testing_CreateFromPaint(paint)); in test_cachedfont()
29 if (paint.getTypeface()) { in test_cachedfont()
30 REPORTER_ASSERT(reporter, font->getTypeface() == paint.getTypeface()); in test_cachedfont()
[all …]
DDrawPathTest.cpp34 SkPaint paint; in test_big_aa_rect() local
35 paint.setAntiAlias(true); in test_big_aa_rect()
36 paint.setColor(SK_ColorWHITE); in test_big_aa_rect()
38 canvas->drawRect(r, paint); in test_big_aa_rect()
99 SkPaint paint; in test_crbug131181() local
100 paint.setAntiAlias(true); in test_crbug131181()
101 surface->getCanvas()->drawPath(path, paint); in test_crbug131181()
115 SkPaint paint; in test_crbug_140803() local
116 paint.setAntiAlias(true); in test_crbug_140803()
117 canvas.drawPath(path, paint); in test_crbug_140803()
[all …]
/external/skia/src/utils/android/
DSkAndroidSDKCanvas.cpp18 void CheckShader(SkPaint* paint) { in CheckShader() argument
19 SkShader* shader = paint->getShader(); in CheckShader()
36 paint->setShader(NULL); in CheckShader()
39 void Filter(SkPaint* paint) { in Filter() argument
41 uint32_t flags = paint->getFlags(); in Filter()
43 paint->setFlags(flags); in Filter()
47 SkXfermode::AsMode(paint->getXfermode(), &mode); in Filter()
49 paint->setXfermode(NULL); in Filter()
53 if (paint->getFilterQuality() != kNone_SkFilterQuality) { in Filter()
54 paint->setFilterQuality(kLow_SkFilterQuality); in Filter()
[all …]
/external/skia/samplecode/
DSampleTextOnPath.cpp18 SkPaint paint; in textStrokePath() local
30 paint.setAntiAlias(true); in textStrokePath()
31 paint.setStyle(SkPaint::kStroke_Style); in textStrokePath()
32 paint.setColor(0xFFFF0000); in textStrokePath()
33 paint.setTextSize(0.085f); in textStrokePath()
34 paint.setStrokeWidth(.005f); in textStrokePath()
36 canvas->drawPath(path, paint); in textStrokePath()
38 paint.setLooper(SkBlurDrawLooper::Create(SK_ColorBLACK, in textStrokePath()
47 -0.025f, paint); in textStrokePath()
52 SkPaint paint; in textPathMatrix() local
[all …]
DSampleArc.cpp56 SkPaint paint; in onDraw() local
57 paint.setAntiAlias(true); in onDraw()
58 paint.setStrokeWidth(SkIntToScalar(2)); in onDraw()
60 paint.setStyle(SkPaint::kFill_Style); in onDraw()
61 paint.setColor(0x800000FF); in onDraw()
62 canvas->drawArc(fR, 0, fSweep, true, paint); in onDraw()
64 paint.setColor(0x800FF000); in onDraw()
65 canvas->drawArc(fR, 0, fSweep, false, paint); in onDraw()
67 paint.setStyle(SkPaint::kStroke_Style); in onDraw()
68 paint.setColor(SK_ColorRED); in onDraw()
[all …]
/external/skia/src/core/
DSkCanvas.cpp120 DeviceCM(SkBaseDevice* device, const SkPaint* paint, SkCanvas* canvas, in DeviceCM()
131 fPaint = paint ? SkNEW_ARGS(SkPaint, (*paint)) : NULL; in DeviceCM()
311 static SkColorFilter* image_to_color_filter(const SkPaint& paint) { in image_to_color_filter() argument
312 SkImageFilter* imgf = paint.getImageFilter(); in image_to_color_filter()
322 SkColorFilter* paintCF = paint.getColorFilter(); in image_to_color_filter()
336 AutoDrawLooper(SkCanvas* canvas, const SkSurfaceProps& props, const SkPaint& paint, in AutoDrawLooper() argument
338 const SkRect* bounds = NULL) : fOrigPaint(paint) { in AutoDrawLooper()
348 SkPaint* paint = set_if_needed(&fLazyPaintInit, fOrigPaint); in AutoDrawLooper() local
349 paint->setColorFilter(simplifiedCF)->unref(); in AutoDrawLooper()
350 paint->setImageFilter(NULL); in AutoDrawLooper()
[all …]

12345678910>>...28