OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkDraw.h" | 8 #include "SkDraw.h" |
9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 case SkPath::kClose_Verb: | 1936 case SkPath::kClose_Verb: |
1937 dst->close(); | 1937 dst->close(); |
1938 break; | 1938 break; |
1939 default: | 1939 default: |
1940 SkDEBUGFAIL("unknown verb"); | 1940 SkDEBUGFAIL("unknown verb"); |
1941 break; | 1941 break; |
1942 } | 1942 } |
1943 } | 1943 } |
1944 } | 1944 } |
1945 | 1945 |
1946 void SkDraw::drawTextOnPath(const char text[], size_t byteLength, | 1946 void SkDraw::drawTextOnPath(const char text[], size_t byteLength, const SkPath&
follow, |
1947 const SkPath& follow, const SkMatrix* matrix, | 1947 const SkMatrix* matrix, SkCanvas::TextOnPathMethod m
ethod, |
1948 const SkPaint& paint) const { | 1948 const SkPaint& paint) const { |
1949 SkASSERT(byteLength == 0 || text != NULL); | 1949 SkASSERT(byteLength == 0 || text != NULL); |
1950 | 1950 |
1951 // nothing to draw | 1951 // nothing to draw |
1952 if (text == NULL || byteLength == 0 || fRC->isEmpty()) { | 1952 if (text == NULL || byteLength == 0 || fRC->isEmpty()) { |
1953 return; | 1953 return; |
1954 } | 1954 } |
1955 | 1955 |
1956 SkTextToPathIter iter(text, byteLength, paint, true); | 1956 SkTextToPathIter iter(text, byteLength, paint, true); |
1957 SkPathMeasure meas(follow, false); | 1957 SkPathMeasure meas(follow, false); |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2394 mask->fImage = SkMask::AllocImage(size); | 2394 mask->fImage = SkMask::AllocImage(size); |
2395 memset(mask->fImage, 0, mask->computeImageSize()); | 2395 memset(mask->fImage, 0, mask->computeImageSize()); |
2396 } | 2396 } |
2397 | 2397 |
2398 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2398 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
2399 draw_into_mask(*mask, devPath, style); | 2399 draw_into_mask(*mask, devPath, style); |
2400 } | 2400 } |
2401 | 2401 |
2402 return true; | 2402 return true; |
2403 } | 2403 } |
OLD | NEW |