Home | History | Annotate | Download | only in core

Lines Matching full:paint

74                         const SkPaint& paint) {
75 fBlitter = SkBlitter::Choose(device, matrix, paint,
98 SkAutoBitmapShaderInstall(const SkBitmap& src, const SkPaint* paint)
99 : fPaint((SkPaint*)paint) {
100 fPrevShader = paint->getShader();
126 SkAutoPaintStyleRestore(const SkPaint& paint, SkPaint::Style style)
127 : fPaint((SkPaint&)paint) {
128 fStyle = paint.getStyle(); // record the old
172 const SkPaint& paint,
176 if (paint.getShader() || paint.getColorFilter()) {
181 if (!SkXfermode::IsMode(paint.getXfermode(), &mode)) {
185 SkColor color = paint.getColor();
277 void SkDraw::drawPaint(const SkPaint& paint) const {
297 BitmapXferProc proc = ChooseBitmapXferProc(*fBitmap, paint, &procData);
310 SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, paint);
447 bool PtProcRec::init(SkCanvas::PointMode mode, const SkPaint& paint,
449 if (paint.getPathEffect()) {
452 SkScalar width = paint.getStrokeWidth();
455 fPaint = &paint;
460 if (paint.getStrokeCap() != SkPaint::kRound_Cap &&
470 fPaint = &paint;
524 const SkPaint& paint, const SkMatrix& matrix) {
527 SkScalar inset = paint.getStrokeWidth();
542 const SkPoint pts[], const SkPaint& paint) const {
555 if (!bounder_points(fBounder, mode, count, pts, paint, *fMatrix)) {
569 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
574 if (rec.init(mode, paint, fMatrix, fClip)) {
575 SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, paint);
601 // temporarily mark the paint as filling.
602 SkAutoPaintStyleRestore restore(paint, SkPaint::kFill_Style);
604 SkScalar width = paint.getStrokeWidth();
607 if (paint.getStrokeCap() == SkPaint::kRound_Cap) {
616 this->drawPath(path, paint, &preMatrix, (count-1) == i);
626 this->drawRect(r, paint);
635 SkPaint p(paint);
658 void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {
663 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
668 if (paint.getPathEffect() || paint.getMaskFilter() ||
669 paint.getRasterizer() || !fMatrix->rectStaysRect() ||
670 (paint.getStyle() != SkPaint::kFill_Style &&
671 SkScalarHalf(paint.getStrokeWidth()) > 0)) {
675 this->drawPath(tmp, paint, NULL, true);
689 if (fBounder && !fBounder->doRect(devRect, paint)) {
697 if (paint.getStyle() != SkPaint::kFill_Style) {
705 SkAutoBlitterChoose blitterStorage(*fBitmap, matrix, paint);
712 if (paint.getStyle() != SkPaint::kStroke_Style) {
713 if (paint.isAntiAlias()) {
719 if (paint.isAntiAlias()) {
727 void SkDraw::drawDevMask(const SkMask& srcM, const SkPaint& paint) const {
738 if (paint.getMaskFilter() &&
739 paint.getMaskFilter()->filterMask(&dstM, srcM, *fMatrix, NULL)) {
747 SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, paint);
754 SkAutoPaintRestoreColorStrokeWidth(const SkPaint& paint) {
755 fPaint = (SkPaint*)&paint;
756 fColor = paint.getColor();
757 fWidth = paint.getStrokeWidth();
799 void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& paint,
805 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
816 if (paint.getPathEffect() || paint.getStyle() != SkPaint::kFill_Style ||
817 paint.getRasterizer()) {
843 SkAutoPaintRestoreColorStrokeWidth aprc(paint);
848 if (paint.getStyle() == SkPaint::kStroke_Style && paint.getXfermode() == NULL) {
849 SkScalar width = paint.getStrokeWidth();
852 int alpha = paint.getAlpha() * scale >> 8;
855 ((SkPaint*)&paint)->setAlpha(alpha);
856 ((SkPaint*)&paint)->setStrokeWidth(0);
860 if (paint.getPathEffect() || paint.getStyle() != SkPaint::kFill_Style) {
861 doFill = paint.getFillPath(*pathPtr, &tmpPath);
865 if (paint.getRasterizer()) {
867 if (paint.getRasterizer()->rasterize(*pathPtr, *matrix,
868 &fClip->getBounds(), paint.getMaskFilter(), &mask,
870 this->drawDevMask(mask, paint);
882 SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, paint);
885 if (paint.getMaskFilter() &&
886 paint.getMaskFilter()->filterPath(*devPathPtr, *fMatrix, *fClip,
891 if (fBounder && !fBounder->doPath(*devPathPtr, paint, doFill)) {
896 if (paint.isAntiAlias()) {
902 if (paint.isAntiAlias()) {
933 const SkPaint& paint) const {
946 this->drawDevMask(mask, paint);
996 tmpPaint.setFlags(paint.getFlags());
1003 this->drawDevMask(mask, paint);
1025 const SkPaint& paint) const {
1032 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
1041 SkAutoPaintStyleRestore restore(paint, SkPaint::kFill_Style);
1074 SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
1094 paint.getXfermode(), paint.getAlpha(), paint.getColorFilter());
1104 draw.drawBitmapAsMask(bitmap, paint);
1106 SkAutoBitmapShaderInstall install(bitmap, &paint);
1111 // is this ok if paint has a rasterizer?
1112 draw.drawRect(r, paint);
1117 const SkPaint& paint) const {
1124 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
1135 SkAutoPaintStyleRestore restore(paint, SkPaint::kFill_Style);
1137 if (NULL == paint.getColorFilter()) {
1139 SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
1160 SkAutoBitmapShaderInstall install(bitmap, &paint);
1170 paint.getShader()->setLocalMatrix(matrix);
1176 // is this OK if paint has a rasterizer?
1177 draw.drawRect(r, paint);
1208 const SkPaint& paint) const {
1211 SkTextToPathIter iter(text, byteLength, paint, true, true);
1231 static void draw_paint_rect(const SkDraw* draw, const SkPaint& paint,
1233 if (paint.getStyle() == SkPaint::kFill_Style) {
1234 draw->drawRect(r, paint);
1236 SkPaint p(paint);
1237 p.setStrokeWidth(SkScalarMul(textSize, paint.getStrokeWidth()));
1242 static void handle_aftertext(const SkDraw* draw, const SkPaint& paint,
1244 uint32_t flags = paint.getFlags();
1248 SkScalar textSize = paint.getTextSize();
1260 draw_paint_rect(draw, paint, r, textSize);
1267 draw_paint_rect(draw, paint, r, textSize);
1438 SkScalar x, SkScalar y, const SkPaint& paint) const {
1446 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
1454 if (paint.getFlags() & (SkPaint::kUnderlineText_Flag |
1456 underlineWidth = paint.measureText(text, byteLength);
1459 if (paint.getTextAlign() == SkPaint::kCenter_Align) {
1461 } else if (paint.getTextAlign() == SkPaint::kRight_Align) {
1467 if (/*paint.isLinearText() ||*/
1469 this->drawText_asPaths(text, byteLength, x, y, paint);
1470 handle_aftertext(this, paint, underlineWidth, underlineStart);
1474 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
1476 SkAutoGlyphCache autoCache(paint, fMatrix);
1478 SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, paint);
1489 if (paint.getTextAlign() != SkPaint::kLeft_Align) {
1497 if (paint.getTextAlign() == SkPaint::kCenter_Align) {
1509 if (paint.isSubpixelText()) {
1540 handle_aftertext(this, paint, underlineWidth, underlineStart);
1638 int scalarsPerPosition, const SkPaint& paint) const {
1647 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
1651 if (/*paint.isLinearText() ||*/
1654 // this->drawText_asPaths(text, byteLength, x, y, paint);
1658 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
1659 SkAutoGlyphCache autoCache(paint, fMatrix);
1661 SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, paint);
1664 AlignProc alignProc = pick_align_proc(paint.getTextAlign());
1670 if (paint.isSubpixelText()) {
1674 if (SkPaint::kLeft_Align == paint.getTextAlign()) {
1830 const SkPaint& paint) const {
1836 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
1840 SkTextToPathIter iter(text, byteLength, paint, true, true);
1845 if (paint.getTextAlign() != SkPaint::kLeft_Align) {
1847 if (paint.getTextAlign() == SkPaint::kCenter_Align) {
2109 const SkPaint& paint) const {
2114 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
2126 if (!fBounder->doRect(bounds, paint)) {
2143 SkPaint p(paint);
2224 HairProc hairProc = ChooseHairProc(paint.isAntiAlias());
2276 const SkPaint& paint) {
2296 if (paint.isAntiAlias()) {
2302 bool SkBounder::doRect(const SkRect& rect, const SkPaint& paint) {
2305 if (paint.getStyle() == SkPaint::kFill_Style) {
2310 if (paint.isAntiAlias()) {
2318 bool SkBounder::doPath(const SkPath& path, const SkPaint& paint, bool doFill) {
2328 if (paint.isAntiAlias()) {
2405 SkPaint paint;
2418 paint.setAntiAlias(true);
2419 draw.drawPath(devPath, paint);