Searched refs:paint (Results 1 - 25 of 216) sorted by relevance

123456789

/frameworks/base/libs/hwui/utils/
H A DPaintUtils.h48 static inline GLenum getFilter(const SkPaint* paint) { argument
49 if (!paint || paint->getFilterQuality() != kNone_SkFilterQuality) {
56 static inline bool paintWillNotDraw(const SkPaint& paint) { argument
57 return paint.getAlpha() == 0
58 && !paint.getColorFilter()
59 && getXfermode(paint.getXfermode()) == SkXfermode::kSrcOver_Mode;
63 static inline bool paintWillNotDrawText(const SkPaint& paint) { argument
64 return paint.getAlpha() == 0
65 && paint
70 isOpaquePaint(const SkPaint* paint) argument
106 getTextShadow(const SkPaint* paint, TextShadow* textShadow) argument
120 hasTextShadow(const SkPaint* paint) argument
124 getXfermodeDirect(const SkPaint* paint) argument
128 getAlphaDirect(const SkPaint* paint) argument
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DLayerRasterizer.java27 the specified paint, but will not retain a reference to the paint
30 public void addLayer(Paint paint, float dx, float dy) { argument
31 nativeAddLayer(native_instance, paint.getNativeInstance(), dx, dy);
34 public void addLayer(Paint paint) { argument
35 nativeAddLayer(native_instance, paint.getNativeInstance(), 0, 0);
/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/
H A DDisplayModifier.java40 abstract public void modifyDrawing(Paint paint, Canvas canvas); 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, Canva
489 apply(Paint paint, Canvas canvas) argument
[all...]
/frameworks/base/libs/hwui/tests/microbench/
H A DFontBench.cpp29 SkPaint paint;
30 paint.setTextSize(20);
31 paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
34 fontRenderer.setFont(&paint, SkMatrix::I());
40 TestUtils::layoutTextUnscaled(paint, "This is a test",
43 fontRenderer.precache(&paint, glyphs.data(), glyphs.size(), SkMatrix::I());
46 fontRenderer.precache(&paint, glyphs.data(), glyphs.size(), SkMatrix::I());
/frameworks/base/libs/hwui/hwui/
H A DMinikinUtils.h38 const Paint* paint, Typeface* typeface);
40 ANDROID_API static void doLayout(Layout* layout, const Paint* paint, int bidiFlags,
44 ANDROID_API static float measureText(const Paint* paint, int bidiFlags, Typeface* typeface,
49 ANDROID_API static float xOffsetForTextAlign(Paint* paint, const Layout& layout);
51 ANDROID_API static float hOffsetForTextAlign(Paint* paint, const Layout& layout, const SkPath& path);
54 ANDROID_API static void forFontRun(const Layout& layout, Paint* paint, F& f) { argument
55 float saveSkewX = paint->getTextSkewX();
56 bool savefakeBold = paint->isFakeBoldText();
63 MinikinFontSkia::populateSkPaint(paint, curFont, layout.getFakery(start));
65 paint
[all...]
H A DMinikinUtils.cpp28 const Paint* paint, Typeface* typeface) {
34 FontVariant minikinVariant = (paint->getFontVariant() == VARIANT_ELEGANT) ? VARIANT_ELEGANT
36 const uint32_t langListId = paint->getMinikinLangListId();
43 minikinPaint->size = (int)paint->getTextSize();
44 minikinPaint->scaleX = paint->getTextScaleX();
45 minikinPaint->skewX = paint->getTextSkewX();
46 minikinPaint->letterSpacing = paint->getLetterSpacing();
47 minikinPaint->paintFlags = MinikinFontSkia::packPaintFlags(paint);
48 minikinPaint->fontFeatureSettings = paint->getFontFeatureSettings();
49 minikinPaint->hyphenEdit = HyphenEdit(paint
27 prepareMinikinPaint(MinikinPaint* minikinPaint, FontCollection** pFont, const Paint* paint, Typeface* typeface) argument
53 doLayout(Layout* layout, const Paint* paint, int bidiFlags, Typeface* typeface, const uint16_t* buf, size_t start, size_t count, size_t bufSize) argument
63 measureText(const Paint* paint, int bidiFlags, Typeface* typeface, const uint16_t* buf, size_t start, size_t count, size_t bufSize, float *advances) argument
77 xOffsetForTextAlign(Paint* paint, const Layout& layout) argument
91 hOffsetForTextAlign(Paint* paint, const Layout& layout, const SkPath& path) argument
[all...]
H A DPaintImpl.cpp26 Paint::Paint(const Paint& paint) : SkPaint(paint), argument
27 mLetterSpacing(paint.mLetterSpacing), mFontFeatureSettings(paint.mFontFeatureSettings),
28 mMinikinLangListId(paint.mMinikinLangListId), mFontVariant(paint.mFontVariant),
29 mHyphenEdit(paint.mHyphenEdit) {
32 Paint::Paint(const SkPaint& paint) : SkPaint(paint), argument
H A DMinikinSkia.cpp35 static void MinikinFontSkia_SetSkiaPaint(const MinikinFont* font, SkPaint* skPaint, const MinikinPaint& paint) { argument
37 skPaint->setTextSize(paint.size);
38 skPaint->setTextScaleX(paint.scaleX);
39 skPaint->setTextSkewX(paint.skewX);
40 MinikinFontSkia::unpackPaintFlags(skPaint, paint.paintFlags);
42 MinikinFontSkia::populateSkPaint(skPaint, font, paint.fakery);
46 const MinikinPaint &paint) const {
50 MinikinFontSkia_SetSkiaPaint(this, &skPaint, paint);
59 const MinikinPaint& paint) const {
63 MinikinFontSkia_SetSkiaPaint(this, &skPaint, paint);
103 packPaintFlags(const SkPaint* paint) argument
115 unpackPaintFlags(SkPaint* paint, uint32_t paintFlags) argument
120 populateSkPaint(SkPaint* paint, const MinikinFont* font, FontFakery fakery) argument
[all...]
H A DMinikinSkia.h37 const MinikinPaint &paint) const;
40 const MinikinPaint &paint) const;
51 static uint32_t packPaintFlags(const SkPaint* paint);
52 static void unpackPaintFlags(SkPaint* paint, uint32_t paintFlags);
55 static void populateSkPaint(SkPaint* paint, const MinikinFont* font, FontFakery fakery);
H A DCanvas.cpp37 void Canvas::drawTextDecorations(float x, float y, float length, const SkPaint& paint) { argument
41 SkPaint paintCopy(paint);
45 flags = paint.getFlags();
55 float textSize = paint.getTextSize();
60 drawRect(left, top, right, bottom, paint);
65 drawRect(left, top, right, bottom, paint);
70 static void simplifyPaint(int color, SkPaint* paint) { argument
71 paint->setColor(color);
72 paint->setShader(nullptr);
73 paint
82 DrawTextFunctor(const Layout& layout, Canvas* canvas, uint16_t* glyphs, float* pos, const SkPaint& paint, float x, float y, MinikinRect& bounds, float totalAdvance) argument
142 const SkPaint& paint; member in class:android::DrawTextFunctor
181 DrawTextOnPathFunctor(const Layout& layout, Canvas* canvas, float hOffset, float vOffset, const Paint& paint, const SkPath& path) argument
205 const Paint& paint; member in class:android::DrawTextOnPathFunctor
209 drawTextOnPath(const uint16_t* text, int count, int bidiFlags, const SkPath& path, float hOffset, float vOffset, const Paint& paint, Typeface* typeface) argument
[all...]
H A DCanvas.h121 uirenderer::CanvasPropertyPrimitive* ry, uirenderer::CanvasPropertyPaint* paint) = 0;
124 uirenderer::CanvasPropertyPaint* paint) = 0;
142 const SkPaint* paint, SaveFlags::Flags flags) = 0;
174 virtual void drawPaint(const SkPaint& paint) = 0;
177 virtual void drawPoint(float x, float y, const SkPaint& paint) = 0;
178 virtual void drawPoints(const float* points, int floatCount, const SkPaint& paint) = 0;
180 const SkPaint& paint) = 0;
181 virtual void drawLines(const float* points, int floatCount, const SkPaint& paint) = 0;
183 const SkPaint& paint) = 0;
184 virtual void drawRegion(const SkRegion& region, const SkPaint& paint)
[all...]
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/graphics/
H A DNopCanvas.java55 public int saveLayer(RectF bounds, Paint paint, int saveFlags) { argument
60 public int saveLayer(RectF bounds, Paint paint) { argument
65 public int saveLayer(float left, float top, float right, float bottom, Paint paint, argument
71 public int saveLayer(float left, float top, float right, float bottom, Paint paint) { argument
126 public void drawPaint(Paint paint) { argument
130 public void drawPoints(float[] pts, int offset, int count, Paint paint) { argument
134 public void drawPoints(float[] pts, Paint paint) { argument
138 public void drawPoint(float x, float y, Paint paint) { argument
142 public void drawLine(float startX, float startY, float stopX, float stopY, Paint paint) { argument
146 public void drawLines(float[] pts, int offset, int count, Paint paint) { argument
150 drawLines(float[] pts, Paint paint) argument
154 drawRect(RectF rect, Paint paint) argument
158 drawRect(Rect r, Paint paint) argument
162 drawRect(float left, float top, float right, float bottom, Paint paint) argument
166 drawOval(RectF oval, Paint paint) argument
170 drawOval(float left, float top, float right, float bottom, Paint paint) argument
174 drawCircle(float cx, float cy, float radius, Paint paint) argument
178 drawArc(RectF oval, float startAngle, float sweepAngle, boolean useCenter, Paint paint) argument
183 drawArc(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean useCenter, Paint paint) argument
188 drawRoundRect(RectF rect, float rx, float ry, Paint paint) argument
192 drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint) argument
197 drawPath(Path path, Paint paint) argument
205 drawPatch(NinePatch patch, Rect dst, Paint paint) argument
209 drawPatch(NinePatch patch, RectF dst, Paint paint) argument
213 drawBitmap(Bitmap bitmap, float left, float top, Paint paint) argument
217 drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint) argument
221 drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint) argument
225 drawBitmap(int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, Paint paint) argument
230 drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, Paint paint) argument
235 drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint) argument
239 drawBitmapMesh(Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) argument
244 drawVertices(VertexMode mode, int vertexCount, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, Paint paint) argument
250 drawText(char[] text, int index, int count, float x, float y, Paint paint) argument
254 drawText(String text, float x, float y, Paint paint) argument
258 drawText(String text, int start, int end, float x, float y, Paint paint) argument
262 drawText(CharSequence text, int start, int end, float x, float y, Paint paint) argument
266 drawTextRun(char[] text, int index, int count, int contextIndex, int contextCount, float x, float y, boolean isRtl, Paint paint) argument
271 drawTextRun(CharSequence text, int start, int end, int contextStart, int contextEnd, float x, float y, boolean isRtl, Paint paint) argument
276 drawPosText(char[] text, int index, int count, float[] pos, Paint paint) argument
280 drawPosText(String text, float[] pos, Paint paint) argument
284 drawTextOnPath(char[] text, int index, int count, Path path, float hOffset, float vOffset, Paint paint) argument
289 drawTextOnPath(String text, Path path, float hOffset, float vOffset, Paint paint) argument
[all...]
/frameworks/base/libs/hwui/tests/common/scenes/
H A DTextAnimation.cpp35 SkPaint paint;
36 paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
37 paint.setAntiAlias(true);
38 paint.setTextSize(50);
40 paint.setColor(Color::Black);
42 TestUtils::drawUtf8ToCanvas(&canvas, "Test string", paint, 400, i * 100);
48 paint.setColor(Color::Blue_500);
49 TestUtils::drawUtf8ToCanvas(&canvas, "This is a neat circle of text!", paint, path);
H A DShapeAnimation.cpp37 [](TestCanvas& canvas, float size, const SkPaint& paint) {
38 canvas.drawArc(0, 0, size, size, 50, 189, true, paint);
40 [](TestCanvas& canvas, float size, const SkPaint& paint) {
41 canvas.drawOval(0, 0, size, size, paint);
43 [](TestCanvas& canvas, float size, const SkPaint& paint) {
50 canvas.drawPath(diamondPath, paint);
52 [](TestCanvas& canvas, float size, const SkPaint& paint) {
54 canvas.drawLines(data, sizeof(data) / sizeof(float), paint);
56 [](TestCanvas& canvas, float size, const SkPaint& paint) {
58 canvas.drawPoints(data, sizeof(data) / sizeof(float), paint);
[all...]
H A DOvalAnimation.cpp35 SkPaint paint;
36 paint.setAntiAlias(true);
37 paint.setColor(Color::Black);
38 canvas.drawOval(0, 0, 200, 200, paint);
H A DGlyphStressAnimation.cpp52 Paint paint; variable
53 paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
54 paint.setAntiAlias(true);
55 paint.setColor(Color::Black);
57 paint.setTextSize(10 + (frameNr % 20) + i * 20);
59 0, 100 * (i + 2), kBidi_Force_LTR, paint, nullptr);
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
H A DDashPathEffect_Delegate.java52 public Stroke getStroke(Paint_Delegate paint) { argument
54 paint.getStrokeWidth(),
55 paint.getJavaCap(),
56 paint.getJavaJoin(),
57 paint.getJavaStrokeMiter(),
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DGradientStopsActivity.java50 Paint paint = new Paint();
51 paint.setShader(gradient);
53 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint);
60 paint.setShader(gradient);
63 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint);
70 paint.setShader(gradient);
73 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint);
79 paint.setShader(gradient);
82 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint);
87 paint
[all...]
/frameworks/base/core/java/android/text/style/
H A DStyleSpan.java87 public void updateMeasureState(TextPaint paint) { argument
88 apply(paint, mStyle);
91 private static void apply(Paint paint, int style) { argument
94 Typeface old = paint.getTypeface();
113 paint.setFakeBoldText(true);
117 paint.setTextSkewX(-0.25f);
120 paint.setTypeface(tf);
H A DTypefaceSpan.java79 public void updateMeasureState(TextPaint paint) { argument
80 apply(paint, mFamily);
83 private static void apply(Paint paint, String family) { argument
86 Typeface old = paint.getTypeface();
97 paint.setFakeBoldText(true);
101 paint.setTextSkewX(-0.25f);
104 paint.setTypeface(tf);
/frameworks/base/core/tests/coretests/src/android/text/
H A DStaticLayoutTest.java50 FontMetricsInt fmi = b.paint.getFontMetricsInt();
52 // check default paint
53 Log.i("TG1:paint", fmi.toString());
77 FontMetricsInt fmi = b.paint.getFontMetricsInt();
93 FontMetricsInt fmi = b.paint.getFontMetricsInt();
111 FontMetricsInt fmi = b.paint.getFontMetricsInt();
131 b.paint.setTextSize(36);
132 FontMetricsInt fmi = b.paint.getFontMetricsInt();
160 FontMetricsInt fmi = b.paint.getFontMetricsInt();
181 FontMetricsInt fmi = b.paint
243 TextPaint paint = new TextPaint(); // default field in class:StaticLayoutTest.LayoutBuilder
255 setPaint(TextPaint paint) argument
331 moveCursorToRightCursorableOffset(EditorState state, TextPaint paint) argument
338 moveCursorToLeftCursorableOffset(EditorState state, TextPaint paint) argument
[all...]
/frameworks/base/graphics/java/android/graphics/drawable/shapes/
H A DArcShape.java47 public void draw(Canvas canvas, Paint paint) { argument
48 canvas.drawArc(rect(), mStart, mSweep, true, paint);
/frameworks/minikin/sample/
H A DMinikinSkia.h10 const MinikinPaint &paint) const;
13 const MinikinPaint& paint) const;
/frameworks/support/v7/cardview/jellybean-mr1/android/support/v7/widget/
H A DCardViewJellybeanMr1.java30 Paint paint) {
31 canvas.drawRoundRect(bounds, cornerRadius, cornerRadius, paint);
/frameworks/base/libs/hwui/tests/unit/
H A DFontRendererTests.cpp32 SkPaint paint; local
33 paint.setTextSize(10);
34 paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
37 fontRenderer.setFont(&paint, SkMatrix::I());
43 TestUtils::layoutTextUnscaled(paint, "This is a test",
47 auto result = fontRenderer.renderDropShadow(&paint, glyphs.data(), glyphs.size(),

Completed in 467 milliseconds

123456789