Home
last modified time | relevance | path

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

12345678910>>...32

/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 : fPaint(paint) { in AutoPaintFilter()
20 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint& paint) in AutoPaintFilter() argument
21 : AutoPaintFilter(canvas, type, &paint) { } in AutoPaintFilter()
23 const SkPaint* paint() const { return fPaint; } in paint() function in SkPaintFilterCanvas::AutoPaintFilter
46 void SkPaintFilterCanvas::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
47 AutoPaintFilter apf(this, kPaint_Type, paint); in onDrawPaint()
49 this->INHERITED::onDrawPaint(*apf.paint()); in onDrawPaint()
54 const SkPaint& paint) { in onDrawPoints() argument
55 AutoPaintFilter apf(this, kPoint_Type, paint); in onDrawPoints()
[all …]
DSkLuaCanvas.cpp164 void SkLuaCanvas::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
166 lua.pushPaint(paint, "paint"); in onDrawPaint()
170 const SkPoint pts[], const SkPaint& paint) { in onDrawPoints() argument
173 lua.pushPaint(paint, "paint"); in onDrawPoints()
176 void SkLuaCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { in onDrawOval() argument
179 lua.pushPaint(paint, "paint"); in onDrawOval()
182 void SkLuaCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { in onDrawRect() argument
185 lua.pushPaint(paint, "paint"); in onDrawRect()
188 void SkLuaCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { in onDrawRRect() argument
191 lua.pushPaint(paint, "paint"); in onDrawRRect()
[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 …]
DRectTest.cpp31 SkPaint paint; in test_stroke_width_clipping() local
32 paint.setStyle(SkPaint::kStroke_Style); in test_stroke_width_clipping()
33 paint.setStrokeWidth(10); in test_stroke_width_clipping()
34 paint.setColor(0xff00ff00); in test_stroke_width_clipping()
40 canvas.drawRect(SkRect::MakeWH(44, 100), paint); in test_stroke_width_clipping()
45 canvas.drawRect(SkRect::MakeWH(22, 50), paint); in test_stroke_width_clipping()
57 SkPaint paint; in test_skbug4406() local
58 paint.setStyle(SkPaint::kFill_Style); in test_skbug4406()
59 paint.setColor(0xff00ff00); in test_skbug4406()
60 paint.setStrokeWidth(1); in test_skbug4406()
[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 …]
/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::Create( in onDraw()
64 drawClippedBitmap(canvas, 0, 0, paint); in onDraw()
65 paint.setImageFilter(SkDisplacementMapEffect::Create( in onDraw()
68 drawClippedBitmap(canvas, 100, 0, paint); in onDraw()
69 paint.setImageFilter(SkDisplacementMapEffect::Create( in onDraw()
72 drawClippedBitmap(canvas, 200, 0, paint); in onDraw()
73 paint.setImageFilter(SkDisplacementMapEffect::Create( in onDraw()
[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.cpp17 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument
24 canvas->drawPath(path, paint); in test_concave()
28 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument
36 canvas->drawPath(path, paint); in test_reverse_concave()
41 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
49 canvas->drawPath(path, paint); in test_bowtie()
54 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
64 canvas->drawPath(path, paint); in test_fake_bowtie()
69 void test_fish(SkCanvas* canvas, const SkPaint& paint) { in test_fish() argument
79 canvas->drawPath(path, paint); in test_fish()
[all …]
Dcolormatrix.cpp16 static void set_color_matrix(SkPaint* paint, const SkColorMatrix& matrix) { in set_color_matrix() argument
17 paint->setColorFilter(SkColorMatrixFilter::Create(matrix))->unref(); in set_color_matrix()
20 static void set_array(SkPaint* paint, const SkScalar array[]) { in set_array() argument
21 paint->setColorFilter(SkColorMatrixFilter::Create(array))->unref(); 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::CreateLinear(pts, colors, nullptr, 2, in CreateTransparentBitmap()
72 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), paint); in CreateTransparentBitmap()
[all …]
Dimagefiltersbase.cpp107 SkPaint paint; in draw_paint() local
108 paint.setImageFilter(imf); in draw_paint()
109 paint.setColor(SK_ColorGREEN); in draw_paint()
112 canvas->drawPaint(paint); in draw_paint()
117 SkPaint paint; in draw_line() local
118 paint.setColor(SK_ColorBLUE); in draw_line()
119 paint.setImageFilter(imf); in draw_line()
120 paint.setStrokeWidth(r.width()/10); in draw_line()
121 canvas->drawLine(r.fLeft, r.fTop, r.fRight, r.fBottom, paint); in draw_line()
125 SkPaint paint; in draw_rect() local
[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 …]
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 …]
Dtexteffects.cpp154 static void apply_shader(SkPaint* paint, int index) { in apply_shader() argument
163 paint->setRasterizer(rastBuilder.detachRasterizer())->unref(); in apply_shader()
168paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, SK_Scalar1/4, SkIntToScalar(4), SkIntToSc… in apply_shader()
170 paint->setColor(SK_ColorBLUE); in apply_shader()
176 SkPaint paint; variable
177 paint.setAntiAlias(true);
178 sk_tool_utils::set_portable_typeface(&paint);
179 paint.setTextSize(SkIntToScalar(56));
182 SkScalar y = paint.getTextSize();
187 apply_shader(&paint, i);
[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 …]
Ddftext.cpp66 SkPaint paint; in onDraw() local
67 paint.setAntiAlias(true); in onDraw()
68 paint.setSubpixelText(true); in onDraw()
70 sk_tool_utils::set_portable_typeface(&paint, "serif", SkTypeface::kNormal); in onDraw()
82 paint.setTextSize(textSizes[i]); in onDraw()
83 canvas->drawText(text, textLen, 0, 0, paint); in onDraw()
84 y += paint.getFontMetrics(nullptr)*scales[i]; in onDraw()
96 paint.setTextSize(SkIntToScalar(ps)); in onDraw()
97 canvas->drawText(text, textLen, rotX, rotY, paint); in onDraw()
98 rotY += paint.getFontMetrics(nullptr); in onDraw()
[all …]
Dgammatext.cpp22 static bool setFont(SkPaint* paint, const char name[]) { in setFont() argument
25 paint->setTypeface(tf)->unref(); in setFont()
57 SkPaint paint; in drawGrad() local
58 paint.setShader(s)->unref(); in drawGrad()
60 canvas->drawRect(r, paint); in drawGrad()
76 SkPaint paint; in onDraw() local
77 setFont(&paint, sk_tool_utils::platform_font_name("serif")); in onDraw()
78 paint.setTextSize(SkIntToScalar(16)); in onDraw()
79 paint.setAntiAlias(true); in onDraw()
80 paint.setLCDRenderText(true); in onDraw()
[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()
83 SkPaint paint; in onDraw() local
84 paint.setAntiAlias(true); in onDraw()
[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 …]
/external/skia/tools/android/
DSkAndroidSDKCanvas.cpp20 void CheckShader(SkPaint* paint) { in CheckShader() argument
21 SkShader* shader = paint->getShader(); in CheckShader()
38 paint->setShader(nullptr); in CheckShader()
41 void Filter(SkPaint* paint) { in Filter() argument
43 uint32_t flags = paint->getFlags(); in Filter()
45 paint->setFlags(flags); in Filter()
49 SkXfermode::AsMode(paint->getXfermode(), &mode); in Filter()
51 paint->setXfermode(nullptr); in Filter()
55 if (paint->getFilterQuality() != kNone_SkFilterQuality) { in Filter()
56 paint->setFilterQuality(kLow_SkFilterQuality); in Filter()
[all …]
/external/skia/src/core/
DSkCanvas.cpp55 bool SkCanvas::wouldOverwriteEntireSurface(const SkRect* rect, const SkPaint* paint, in wouldOverwriteEntireSurface() argument
85 if (paint) { in wouldOverwriteEntireSurface()
86 SkPaint::Style paintStyle = paint->getStyle(); in wouldOverwriteEntireSurface()
91 if (paint->getMaskFilter() || paint->getLooper() in wouldOverwriteEntireSurface()
92 || paint->getPathEffect() || paint->getImageFilter()) { in wouldOverwriteEntireSurface()
96 return SkPaintPriv::Overwrites(paint, (SkPaintPriv::ShaderOverrideOpacity)overrideOpacity); in wouldOverwriteEntireSurface()
152 void SkCanvas::predrawNotify(const SkRect* rect, const SkPaint* paint, in predrawNotify() argument
161 if (this->wouldOverwriteEntireSurface(rect, paint, overrideOpacity)) { in predrawNotify()
200 DeviceCM(SkBaseDevice* device, const SkPaint* paint, SkCanvas* canvas, in DeviceCM()
211 fPaint = paint ? new SkPaint(*paint) : nullptr; in DeviceCM()
[all …]
DSkRemote.cpp27 Misc Misc::CreateFrom(const SkPaint& paint) { in CreateFrom() argument
29 paint.getColor(), in CreateFrom()
30 paint.getFilterQuality(), in CreateFrom()
31 paint.isAntiAlias(), in CreateFrom()
32 paint.isDither(), in CreateFrom()
37 void Misc::applyTo(SkPaint* paint) const { in applyTo()
38 paint->setColor (fColor); in applyTo()
39 paint->setFilterQuality(fFilterQuality); in applyTo()
40 paint->setAntiAlias (fAntiAlias); in applyTo()
41 paint->setDither (fDither); in applyTo()
[all …]
/external/skia/experimental/docs/
DcanvasBackend.js29 var paint = paintToCanvas(action.paint);
71 if ('fill' == paint.style) {
74 assert('stroke' == paint.style);
79 if ('fill' == paint.style) {
82 assert('stroke' == paint.style);
95 function paintToCanvas(paint) { argument
97 var inPicture = 'string' == typeof(paint);
99 paint = (new Function("return " + paint))();
100 assert('object' == typeof(paint) && !isArray(paint));
102 if ('gradient' in paint) {
[all …]

12345678910>>...32