Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: include/core/SkDraw.h

Issue 605533002: Fix SkTextBlob offset semantics. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: default run positioning fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkDevice.h ('k') | include/device/xps/SkXPSDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkDraw_DEFINED 10 #ifndef SkDraw_DEFINED
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void drawPath(const SkPath& path, const SkPaint& paint, 53 void drawPath(const SkPath& path, const SkPaint& paint,
54 SkBlitter* customBlitter = NULL) const { 54 SkBlitter* customBlitter = NULL) const {
55 this->drawPath(path, paint, NULL, false, false, customBlitter); 55 this->drawPath(path, paint, NULL, false, false, customBlitter);
56 } 56 }
57 57
58 void drawBitmap(const SkBitmap&, const SkMatrix&, const SkPaint&) const; 58 void drawBitmap(const SkBitmap&, const SkMatrix&, const SkPaint&) const;
59 void drawSprite(const SkBitmap&, int x, int y, const SkPaint&) const; 59 void drawSprite(const SkBitmap&, int x, int y, const SkPaint&) const;
60 void drawText(const char text[], size_t byteLength, SkScalar x, 60 void drawText(const char text[], size_t byteLength, SkScalar x,
61 SkScalar y, const SkPaint& paint) const; 61 SkScalar y, const SkPaint& paint) const;
62 void drawPosText(const char text[], size_t byteLength, 62 void drawPosText(const char text[], size_t byteLength,
63 const SkScalar pos[], SkScalar constY, 63 const SkScalar pos[], int scalarsPerPosition,
64 int scalarsPerPosition, const SkPaint& paint) const; 64 const SkPoint& offset, const SkPaint& paint) const;
65 void drawTextOnPath(const char text[], size_t byteLength, 65 void drawTextOnPath(const char text[], size_t byteLength,
66 const SkPath&, const SkMatrix*, const SkPaint&) const; 66 const SkPath&, const SkMatrix*, const SkPaint&) const;
67 void drawVertices(SkCanvas::VertexMode mode, int count, 67 void drawVertices(SkCanvas::VertexMode mode, int count,
68 const SkPoint vertices[], const SkPoint textures[], 68 const SkPoint vertices[], const SkPoint textures[],
69 const SkColor colors[], SkXfermode* xmode, 69 const SkColor colors[], SkXfermode* xmode,
70 const uint16_t indices[], int ptCount, 70 const uint16_t indices[], int ptCount,
71 const SkPaint& paint) const; 71 const SkPaint& paint) const;
72 72
73 /** 73 /**
74 * Overwrite the target with the path's coverage (i.e. its mask). 74 * Overwrite the target with the path's coverage (i.e. its mask).
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 * Iff RectType == kStroke_RectType, then strokeSize is set to the device 106 * Iff RectType == kStroke_RectType, then strokeSize is set to the device
107 * width and height of the stroke. 107 * width and height of the stroke.
108 */ 108 */
109 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, 109 static RectType ComputeRectType(const SkPaint&, const SkMatrix&,
110 SkPoint* strokeSize); 110 SkPoint* strokeSize);
111 111
112 static bool ShouldDrawTextAsPaths(const SkPaint&, const SkMatrix&); 112 static bool ShouldDrawTextAsPaths(const SkPaint&, const SkMatrix&);
113 void drawText_asPaths(const char text[], size_t byteLength, 113 void drawText_asPaths(const char text[], size_t byteLength,
114 SkScalar x, SkScalar y, const SkPaint&) const; 114 SkScalar x, SkScalar y, const SkPaint&) const;
115 void drawPosText_asPaths(const char text[], size_t byteLength, 115 void drawPosText_asPaths(const char text[], size_t byteLength,
116 const SkScalar pos[], SkScalar constY, 116 const SkScalar pos[], int scalarsPerPosition ,
117 int scalarsPerPosition, const SkPaint&) cons t; 117 const SkPoint& offset, const SkPaint&) const ;
118 118
119 private: 119 private:
120 void drawDevMask(const SkMask& mask, const SkPaint&) const; 120 void drawDevMask(const SkMask& mask, const SkPaint&) const;
121 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; 121 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const;
122 122
123 void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix, 123 void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix,
124 bool pathIsMutable, bool drawCoverage, 124 bool pathIsMutable, bool drawCoverage,
125 SkBlitter* customBlitter = NULL) const; 125 SkBlitter* customBlitter = NULL) const;
126 126
127 /** 127 /**
(...skipping 18 matching lines...) Expand all
146 SkDrawProcs* fProcs; // optional 146 SkDrawProcs* fProcs; // optional
147 147
148 #ifdef SK_DEBUG 148 #ifdef SK_DEBUG
149 void validate() const; 149 void validate() const;
150 #else 150 #else
151 void validate() const {} 151 void validate() const {}
152 #endif 152 #endif
153 }; 153 };
154 154
155 #endif 155 #endif
OLDNEW
« no previous file with comments | « include/core/SkDevice.h ('k') | include/device/xps/SkXPSDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698