Home
last modified time | relevance | path

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

12345678

/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/
DDisplayModifier.java40 abstract public void modifyDrawing(Paint paint, Canvas canvas); in modifyDrawing() argument
85 public void modifyDrawing(Paint paint, Canvas canvas) {
86 paint.setAntiAlias(true);
91 public void modifyDrawing(Paint paint, Canvas canvas) {
92 paint.setAntiAlias(false);
101 public void modifyDrawing(Paint paint, Canvas canvas) {
102 paint.setStyle(Paint.Style.FILL);
107 public void modifyDrawing(Paint paint, Canvas canvas) {
108 paint.setStyle(Paint.Style.STROKE);
115 public void modifyDrawing(Paint paint, Canvas canvas) {
[all …]
/frameworks/base/core/jni/android/graphics/
DMinikinSkia.cpp36 SkPaint paint; in GetGlyph() local
37 paint.setTypeface(mTypeface); in GetGlyph()
38 paint.setTextEncoding(SkPaint::kUTF32_TextEncoding); in GetGlyph()
40 paint.textToGlyphs(&codepoint, sizeof(codepoint), &glyph16); in GetGlyph()
45 …inikinFontSkia_SetSkiaPaint(const MinikinFont* font, SkPaint* skPaint, const MinikinPaint& paint) { in MinikinFontSkia_SetSkiaPaint() argument
47 skPaint->setTextSize(paint.size); in MinikinFontSkia_SetSkiaPaint()
48 skPaint->setTextScaleX(paint.scaleX); in MinikinFontSkia_SetSkiaPaint()
49 skPaint->setTextSkewX(paint.skewX); in MinikinFontSkia_SetSkiaPaint()
50 MinikinFontSkia::unpackPaintFlags(skPaint, paint.paintFlags); in MinikinFontSkia_SetSkiaPaint()
52 MinikinFontSkia::populateSkPaint(skPaint, font, paint.fakery); in MinikinFontSkia_SetSkiaPaint()
[all …]
DPaint.cpp72 static void defaultSettingsForAndroid(Paint* paint) { in defaultSettingsForAndroid() argument
74 paint->setTextEncoding(Paint::kGlyphID_TextEncoding); in defaultSettingsForAndroid()
90 static Paint* getNativePaint(JNIEnv* env, jobject paint) { in getNativePaint() argument
92 SkASSERT(paint); in getNativePaint()
93 SkASSERT(env->IsInstanceOf(paint, gPaint_class)); in getNativePaint()
94 jlong paintHandle = env->GetLongField(paint, gPaint_nativeInstanceID); in getNativePaint()
100 static TypefaceImpl* getNativeTypeface(JNIEnv* env, jobject paint) { in getNativeTypeface() argument
102 SkASSERT(paint); in getNativeTypeface()
103 SkASSERT(env->IsInstanceOf(paint, gPaint_class)); in getNativeTypeface()
104 jlong typefaceHandle = env->GetLongField(paint, gPaint_nativeTypefaceID); in getNativeTypeface()
[all …]
DMinikinUtils.cpp30 const Paint* paint, TypefaceImpl* typeface) { in prepareMinikinPaint() argument
36 const std::string& lang = paint->getTextLocale(); in prepareMinikinPaint()
38 FontVariant minikinVariant = (paint->getFontVariant() == VARIANT_ELEGANT) ? VARIANT_ELEGANT in prepareMinikinPaint()
46 minikinPaint->size = (int)paint->getTextSize(); in prepareMinikinPaint()
47 minikinPaint->scaleX = paint->getTextScaleX(); in prepareMinikinPaint()
48 minikinPaint->skewX = paint->getTextSkewX(); in prepareMinikinPaint()
49 minikinPaint->letterSpacing = paint->getLetterSpacing(); in prepareMinikinPaint()
50 minikinPaint->paintFlags = MinikinFontSkia::packPaintFlags(paint); in prepareMinikinPaint()
51 minikinPaint->fontFeatureSettings = paint->getFontFeatureSettings(); in prepareMinikinPaint()
52 minikinPaint->hyphenEdit = HyphenEdit(paint->getHyphenEdit()); in prepareMinikinPaint()
[all …]
DMinikinUtils.h37 const Paint* paint, TypefaceImpl* typeface);
39 static void doLayout(Layout* layout, const Paint* paint, int bidiFlags,
43 static float xOffsetForTextAlign(Paint* paint, const Layout& layout);
45 static float hOffsetForTextAlign(Paint* paint, const Layout& layout, const SkPath& path);
48 static void forFontRun(const Layout& layout, Paint* paint, F& f) { in forFontRun() argument
49 float saveSkewX = paint->getTextSkewX(); in forFontRun()
50 bool savefakeBold = paint->isFakeBoldText(); in forFontRun()
57 MinikinFontSkia::populateSkPaint(paint, curFont, layout.getFakery(start)); in forFontRun()
59 paint->setTextSkewX(saveSkewX); in forFontRun()
60 paint->setFakeBoldText(savefakeBold); in forFontRun()
[all …]
DNinePatchImpl.cpp67 const SkBitmap& bitmap, const SkPaint& paint, in drawStretchyPatch() argument
71 ((SkPaint*)&paint)->setColor(modAlpha(colorHint, paint.getAlpha())); in drawStretchyPatch()
72 canvas->drawRect(dst, paint); in drawStretchyPatch()
73 ((SkPaint*)&paint)->setColor(initColor); in drawStretchyPatch()
80 SkColor prev = paint.getColor(); in drawStretchyPatch()
81 ((SkPaint*)&paint)->setColor(c); in drawStretchyPatch()
82 canvas->drawRect(dst, paint); in drawStretchyPatch()
83 ((SkPaint*)&paint)->setColor(prev); in drawStretchyPatch()
87 canvas->drawBitmapRect(bitmap, &src, dst, &paint); in drawStretchyPatch()
102 const SkPaint* paint, SkRegion** outRegion) { in NinePatch_Draw() argument
[all …]
DPaintImpl.cpp29 Paint::Paint(const Paint& paint) : SkPaint(paint), in Paint() argument
30 mLetterSpacing(paint.mLetterSpacing), mFontFeatureSettings(paint.mFontFeatureSettings), in Paint()
31 mTextLocale(paint.mTextLocale), mFontVariant(paint.mFontVariant), in Paint()
32 mHyphenEdit(paint.mHyphenEdit) { in Paint()
/frameworks/base/libs/hwui/
DDisplayListCanvas.cpp136 const SkPaint* paint, SkCanvas::SaveFlags flags) { in saveLayer() argument
140 paint = refPaint(paint); in saveLayer()
141 addStateOp(new (alloc()) SaveLayerOp(left, top, right, bottom, paint, (int) flags)); in saveLayer()
239 void DisplayListCanvas::drawBitmap(const SkBitmap* bitmap, const SkPaint* paint) { in drawBitmap() argument
241 paint = refPaint(paint); in drawBitmap()
243 addDrawOp(new (alloc()) DrawBitmapOp(bitmap, paint)); in drawBitmap()
247 const SkPaint* paint) { in drawBitmap() argument
250 drawBitmap(&bitmap, paint); in drawBitmap()
255 const SkPaint* paint) { in drawBitmap() argument
257 drawBitmap(&bitmap, paint); in drawBitmap()
[all …]
DOpenGLRenderer.h176 const SkPaint* paint, int flags) { in saveLayer() argument
177 return saveLayer(left, top, right, bottom, paint, flags, nullptr); in saveLayer()
183 const SkPaint* paint, int flags, const SkPath* convexMask);
186 const SkPaint* paint, int flags);
190 void drawBitmap(const SkBitmap* bitmap, const SkPaint* paint);
192 TextureVertex* vertices, bool pureTranslate, const Rect& bounds, const SkPaint* paint);
194 const SkPaint* paint);
196 const float* vertices, const int* colors, const SkPaint* paint);
198 TextureVertex* vertices, uint32_t indexCount, const SkPaint* paint);
200 float left, float top, float right, float bottom, const SkPaint* paint);
[all …]
DSkiaCanvasProxy.cpp30 void SkiaCanvasProxy::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
31 mCanvas->drawPaint(paint); in onDrawPaint()
35 const SkPaint& paint) { in onDrawPoints() argument
47 mCanvas->drawPoints(floatArray, floatCount, paint); in onDrawPoints()
51 mCanvas->drawLines(floatArray, floatCount, paint); in onDrawPoints()
55 SkPaint strokedPaint(paint); in onDrawPoints()
72 void SkiaCanvasProxy::onDrawOval(const SkRect& rect, const SkPaint& paint) { in onDrawOval() argument
73 mCanvas->drawOval(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, paint); in onDrawOval()
76 void SkiaCanvasProxy::onDrawRect(const SkRect& rect, const SkPaint& paint) { in onDrawRect() argument
77 mCanvas->drawRect(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, paint); in onDrawRect()
[all …]
DDisplayListCanvas.h99 void drawBitmap(const SkBitmap* bitmap, const SkPaint* paint);
102 float left, float top, float right, float bottom, const SkPaint* paint);
105 void drawRects(const float* rects, int count, const SkPaint* paint);
109 CanvasPropertyPaint* paint);
111 CanvasPropertyPrimitive* radius, CanvasPropertyPaint* paint);
156 virtual int saveLayer(float left, float top, float right, float bottom, const SkPaint* paint,
160 SkPaint paint; in saveLayerAlpha() local
161 paint.setAlpha(alpha); in saveLayerAlpha()
162 return saveLayer(left, top, right, bottom, &paint, flags); in saveLayerAlpha()
193 virtual void drawPaint(const SkPaint& paint) override;
[all …]
DSkiaCanvas.cpp64 const SkPaint* paint, SkCanvas::SaveFlags flags) override;
89 virtual void drawPaint(const SkPaint& paint) override;
91 virtual void drawPoint(float x, float y, const SkPaint& paint) override;
92 virtual void drawPoints(const float* points, int count, const SkPaint& paint) override;
94 const SkPaint& paint) override;
95 virtual void drawLines(const float* points, int count, const SkPaint& paint) override;
97 const SkPaint& paint) override;
99 float rx, float ry, const SkPaint& paint) override;
100 virtual void drawCircle(float x, float y, float radius, const SkPaint& paint) override;
102 const SkPaint& paint) override;
[all …]
DCanvas.h75 const SkPaint* paint, SkCanvas::SaveFlags flags) = 0;
111 virtual void drawPaint(const SkPaint& paint) = 0;
114 virtual void drawPoint(float x, float y, const SkPaint& paint) = 0;
115 virtual void drawPoints(const float* points, int count, const SkPaint& paint) = 0;
117 const SkPaint& paint) = 0;
118 virtual void drawLines(const float* points, int count, const SkPaint& paint) = 0;
120 const SkPaint& paint) = 0;
122 float rx, float ry, const SkPaint& paint) = 0;
123 virtual void drawCircle(float x, float y, float radius, const SkPaint& paint) = 0;
125 const SkPaint& paint) = 0;
[all …]
DPathCache.cpp54 PathDescription::PathDescription(ShapeType type, const SkPaint* paint) in PathDescription() argument
56 , join(paint->getStrokeJoin()) in PathDescription()
57 , cap(paint->getStrokeCap()) in PathDescription()
58 , style(paint->getStyle()) in PathDescription()
59 , miter(paint->getStrokeMiter()) in PathDescription()
60 , strokeWidth(paint->getStrokeWidth()) in PathDescription()
61 , pathEffect(paint->getPathEffect()) { in PathDescription()
81 bool PathCache::canDrawAsConvexPath(SkPath* path, const SkPaint* paint) { in canDrawAsConvexPath() argument
83 return paint->getPathEffect() == nullptr && path->getConvexity() == SkPath::kConvex_Convexity; in canDrawAsConvexPath()
86 void PathCache::computePathBounds(const SkPath* path, const SkPaint* paint, in computePathBounds() argument
[all …]
DPathCache.h162 PathDescription(ShapeType shapeType, const SkPaint* paint);
197 PathTexture* getRoundRect(float width, float height, float rx, float ry, const SkPaint* paint);
198 PathTexture* getCircle(float radius, const SkPaint* paint);
199 PathTexture* getOval(float width, float height, const SkPaint* paint);
200 PathTexture* getRect(float width, float height, const SkPaint* paint);
202 bool useCenter, const SkPaint* paint);
203 PathTexture* get(const SkPath* path, const SkPaint* paint);
229 void precache(const SkPath* path, const SkPaint* paint);
231 static bool canDrawAsConvexPath(SkPath* path, const SkPaint* paint);
232 static void computePathBounds(const SkPath* path, const SkPaint* paint,
[all …]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DGradientStopsActivity.java50 Paint paint = new Paint(); in onDraw() local
51 paint.setShader(gradient); in onDraw()
53 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw()
60 paint.setShader(gradient); in onDraw()
63 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw()
70 paint.setShader(gradient); in onDraw()
73 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw()
79 paint.setShader(gradient); in onDraw()
82 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw()
87 paint.setShader(gradient); in onDraw()
[all …]
/frameworks/base/graphics/java/android/graphics/
DCanvas.java443 public int saveLayer(@Nullable RectF bounds, @Nullable Paint paint, @Saveflags int saveFlags) { in saveLayer() argument
447 return saveLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, paint, saveFlags); in saveLayer()
453 public int saveLayer(@Nullable RectF bounds, @Nullable Paint paint) { in saveLayer() argument
454 return saveLayer(bounds, paint, ALL_SAVE_FLAG); in saveLayer()
460 public int saveLayer(float left, float top, float right, float bottom, @Nullable Paint paint, in saveLayer() argument
463 paint != null ? paint.getNativeInstance() : 0, in saveLayer()
470 public int saveLayer(float left, float top, float right, float bottom, @Nullable Paint paint) { in saveLayer() argument
471 return saveLayer(left, top, right, bottom, paint, ALL_SAVE_FLAG); in saveLayer()
1020 public void drawPaint(@NonNull Paint paint) { in drawPaint() argument
1021 native_drawPaint(mNativeCanvasWrapper, paint.getNativeInstance()); in drawPaint()
[all …]
/frameworks/base/libs/hwui/utils/
DPaintUtils.h40 static inline GLenum getFilter(const SkPaint* paint) { in getFilter() argument
41 if (!paint || paint->getFilterQuality() != kNone_SkFilterQuality) { in getFilter()
48 static inline bool paintWillNotDraw(const SkPaint& paint) { in paintWillNotDraw() argument
49 return paint.getAlpha() == 0 in paintWillNotDraw()
50 && !paint.getColorFilter() in paintWillNotDraw()
51 && getXfermode(paint.getXfermode()) == SkXfermode::kSrcOver_Mode; in paintWillNotDraw()
55 static inline bool paintWillNotDrawText(const SkPaint& paint) { in paintWillNotDrawText() argument
56 return paint.getAlpha() == 0 in paintWillNotDrawText()
57 && paint.getLooper() == nullptr in paintWillNotDrawText()
58 && !paint.getColorFilter() in paintWillNotDrawText()
[all …]
/frameworks/base/core/java/android/text/
DBoringLayout.java39 TextPaint paint, int outerwidth, in make() argument
43 return new BoringLayout(source, paint, outerwidth, align, in make()
49 TextPaint paint, int outerwidth, in make() argument
54 return new BoringLayout(source, paint, outerwidth, align, in make()
64 public BoringLayout replaceOrMake(CharSequence source, TextPaint paint, in replaceOrMake() argument
69 replaceWith(source, paint, outerwidth, align, spacingmult, in replaceOrMake()
76 init(source, paint, outerwidth, align, spacingmult, spacingadd, in replaceOrMake()
86 public BoringLayout replaceOrMake(CharSequence source, TextPaint paint, in replaceOrMake() argument
96 replaceWith(source, paint, outerwidth, align, spacingmult, in replaceOrMake()
104 replaceWith(TextUtils.ellipsize(source, paint, ellipsizedWidth, in replaceOrMake()
[all …]
/frameworks/base/core/jni/
Dandroid_graphics_Canvas.cpp83 Paint* paint = reinterpret_cast<Paint*>(paintHandle); in saveLayer() local
85 return static_cast<jint>(get_canvas(canvasHandle)->saveLayer(l, t, r, b, paint, flags)); in saveLayer()
204 Paint* paint = reinterpret_cast<Paint*>(paintHandle); in drawPaint() local
205 get_canvas(canvasHandle)->drawPaint(*paint); in drawPaint()
210 const Paint* paint = reinterpret_cast<Paint*>(paintHandle); in drawPoint() local
211 get_canvas(canvasHandle)->drawPoint(x, y, *paint); in drawPoint()
226 const Paint* paint = reinterpret_cast<Paint*>(paintHandle); in drawPoints() local
227 get_canvas(canvasHandle)->drawPoints(floats + offset, count, *paint); in drawPoints()
232 Paint* paint = reinterpret_cast<Paint*>(paintHandle); in drawLine() local
233 get_canvas(canvasHandle)->drawLine(startX, startY, stopX, stopY, *paint); in drawLine()
[all …]
/frameworks/minikin/sample/
Dexample_skia.cpp80 void drawToSkia(SkCanvas *canvas, SkPaint *paint, Layout *layout, float x, float y) { in drawToSkia() argument
88 paint->setTextEncoding(SkPaint::kGlyphID_TextEncoding); in drawToSkia()
96 paint->setTypeface(lastFace); in drawToSkia()
97 canvas->drawPosText(glyphs + start, (i - start) << 1, pos + start, *paint); in drawToSkia()
102 paint->setTypeface(skFace); in drawToSkia()
103 canvas->drawPosText(glyphs + start, (nGlyphs - start) << 1, pos + start, *paint); in drawToSkia()
134 SkPaint paint; in runMinikinTest() local
135 paint.setARGB(255, 0, 0, 128); in runMinikinTest()
136 paint.setStyle(SkPaint::kStroke_Style); in runMinikinTest()
137 paint.setStrokeWidth(2); in runMinikinTest()
[all …]
DMinikinSkia.cpp18 SkPaint paint; in GetGlyph() local
19 paint.setTypeface(mTypeface); in GetGlyph()
20 paint.setTextEncoding(SkPaint::kUTF32_TextEncoding); in GetGlyph()
22 paint.textToGlyphs(&codepoint, sizeof(codepoint), &glyph16); in GetGlyph()
28 …d MinikinFontSkia_SetSkiaPaint(SkTypeface* typeface, SkPaint* skPaint, const MinikinPaint& paint) { in MinikinFontSkia_SetSkiaPaint() argument
32 skPaint->setTextSize(paint.size); in MinikinFontSkia_SetSkiaPaint()
36 const MinikinPaint &paint) const { in GetHorizontalAdvance()
40 MinikinFontSkia_SetSkiaPaint(mTypeface, &skPaint, paint); in GetHorizontalAdvance()
49 const MinikinPaint& paint) const {
53 MinikinFontSkia_SetSkiaPaint(mTypeface, &skPaint, paint);
/frameworks/base/core/java/android/view/
DDisplayListCanvas.java258 void drawHardwareLayer(HardwareLayer layer, float x, float y, Paint paint) { in drawHardwareLayer() argument
259 layer.setLayerPaint(paint); in drawHardwareLayer()
271 public void drawPatch(NinePatch patch, Rect dst, Paint paint) { in drawPatch() argument
274 final long nativePaint = paint == null ? 0 : paint.getNativeInstance(); in drawPatch()
281 public void drawPatch(NinePatch patch, RectF dst, Paint paint) { in drawPatch() argument
284 final long nativePaint = paint == null ? 0 : paint.getNativeInstance(); in drawPatch()
290 float left, float top, float right, float bottom, long paint); in nDrawPatch() argument
293 CanvasProperty<Float> radius, CanvasProperty<Paint> paint) { in drawCircle() argument
295 radius.getNativeContainer(), paint.getNativeContainer()); in drawCircle()
303 CanvasProperty<Float> ry, CanvasProperty<Paint> paint) { in drawRoundRect() argument
[all …]
/frameworks/base/core/java/android/gesture/
DGesture.java191 final Paint paint = new Paint(); in toBitmap() local
192 paint.setAntiAlias(BITMAP_RENDERING_ANTIALIAS); in toBitmap()
193 paint.setDither(BITMAP_RENDERING_DITHER); in toBitmap()
194 paint.setColor(color); in toBitmap()
195 paint.setStyle(Paint.Style.STROKE); in toBitmap()
196 paint.setStrokeJoin(Paint.Join.ROUND); in toBitmap()
197 paint.setStrokeCap(Paint.Cap.ROUND); in toBitmap()
198 paint.setStrokeWidth(BITMAP_RENDERING_WIDTH); in toBitmap()
205 canvas.drawPath(path, paint); in toBitmap()
225 final Paint paint = new Paint(); in toBitmap() local
[all …]
/frameworks/base/libs/hwui/font/
DFont.cpp47 Font::FontDescription::FontDescription(const SkPaint* paint, const SkMatrix& rasterMatrix) in FontDescription() argument
49 mFontId = SkTypeface::UniqueID(paint->getTypeface()); in FontDescription()
50 mFontSize = paint->getTextSize(); in FontDescription()
52 if (paint->isFakeBoldText()) { in FontDescription()
55 mItalicStyle = paint->getTextSkewX(); in FontDescription()
56 mScaleX = paint->getTextScaleX(); in FontDescription()
57 mStyle = paint->getStyle(); in FontDescription()
58 mStrokeWidth = paint->getStrokeWidth(); in FontDescription()
59 mAntiAliasing = paint->isAntiAlias(); in FontDescription()
60 mHinting = paint->getHinting(); in FontDescription()
[all …]

12345678