OLD | NEW |
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 #include "SkPaint.h" | 9 #include "SkPaint.h" |
10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2427 str->append("</dd>"); | 2427 str->append("</dd>"); |
2428 | 2428 |
2429 str->append("<dt>Stroke Miter:</dt><dd>"); | 2429 str->append("<dt>Stroke Miter:</dt><dd>"); |
2430 str->appendScalar(this->getStrokeMiter()); | 2430 str->appendScalar(this->getStrokeMiter()); |
2431 str->append("</dd>"); | 2431 str->append("</dd>"); |
2432 | 2432 |
2433 str->append("<dt>Flags:</dt><dd>("); | 2433 str->append("<dt>Flags:</dt><dd>("); |
2434 if (this->getFlags()) { | 2434 if (this->getFlags()) { |
2435 bool needSeparator = false; | 2435 bool needSeparator = false; |
2436 SkAddFlagToString(str, this->isAntiAlias(), "AntiAlias", &needSeparator)
; | 2436 SkAddFlagToString(str, this->isAntiAlias(), "AntiAlias", &needSeparator)
; |
2437 SkAddFlagToString(str, this->isFilterBitmap(), "FilterBitmap", &needSepa
rator); | |
2438 SkAddFlagToString(str, this->isDither(), "Dither", &needSeparator); | 2437 SkAddFlagToString(str, this->isDither(), "Dither", &needSeparator); |
2439 SkAddFlagToString(str, this->isUnderlineText(), "UnderlineText", &needSe
parator); | 2438 SkAddFlagToString(str, this->isUnderlineText(), "UnderlineText", &needSe
parator); |
2440 SkAddFlagToString(str, this->isStrikeThruText(), "StrikeThruText", &need
Separator); | 2439 SkAddFlagToString(str, this->isStrikeThruText(), "StrikeThruText", &need
Separator); |
2441 SkAddFlagToString(str, this->isFakeBoldText(), "FakeBoldText", &needSepa
rator); | 2440 SkAddFlagToString(str, this->isFakeBoldText(), "FakeBoldText", &needSepa
rator); |
2442 SkAddFlagToString(str, this->isLinearText(), "LinearText", &needSeparato
r); | 2441 SkAddFlagToString(str, this->isLinearText(), "LinearText", &needSeparato
r); |
2443 SkAddFlagToString(str, this->isSubpixelText(), "SubpixelText", &needSepa
rator); | 2442 SkAddFlagToString(str, this->isSubpixelText(), "SubpixelText", &needSepa
rator); |
2444 SkAddFlagToString(str, this->isDevKernText(), "DevKernText", &needSepara
tor); | 2443 SkAddFlagToString(str, this->isDevKernText(), "DevKernText", &needSepara
tor); |
2445 SkAddFlagToString(str, this->isLCDRenderText(), "LCDRenderText", &needSe
parator); | 2444 SkAddFlagToString(str, this->isLCDRenderText(), "LCDRenderText", &needSe
parator); |
2446 SkAddFlagToString(str, this->isEmbeddedBitmapText(), | 2445 SkAddFlagToString(str, this->isEmbeddedBitmapText(), |
2447 "EmbeddedBitmapText", &needSeparator); | 2446 "EmbeddedBitmapText", &needSeparator); |
2448 SkAddFlagToString(str, this->isAutohinted(), "Autohinted", &needSeparato
r); | 2447 SkAddFlagToString(str, this->isAutohinted(), "Autohinted", &needSeparato
r); |
2449 SkAddFlagToString(str, this->isVerticalText(), "VerticalText", &needSepa
rator); | 2448 SkAddFlagToString(str, this->isVerticalText(), "VerticalText", &needSepa
rator); |
2450 SkAddFlagToString(str, SkToBool(this->getFlags() & SkPaint::kGenA8FromLC
D_Flag), | 2449 SkAddFlagToString(str, SkToBool(this->getFlags() & SkPaint::kGenA8FromLC
D_Flag), |
2451 "GenA8FromLCD", &needSeparator); | 2450 "GenA8FromLCD", &needSeparator); |
2452 } else { | 2451 } else { |
2453 str->append("None"); | 2452 str->append("None"); |
2454 } | 2453 } |
2455 str->append(")</dd>"); | 2454 str->append(")</dd>"); |
2456 | 2455 |
| 2456 str->append("<dt>FilterLevel:</dt><dd>"); |
| 2457 static const char* gFilterLevelStrings[] = { "None", "Low", "Medium", "High"
}; |
| 2458 str->append(gFilterLevelStrings[this->getFilterLevel()]); |
| 2459 str->append("</dd>"); |
| 2460 |
2457 str->append("<dt>TextAlign:</dt><dd>"); | 2461 str->append("<dt>TextAlign:</dt><dd>"); |
2458 static const char* gTextAlignStrings[SkPaint::kAlignCount] = { "Left", "Cent
er", "Right" }; | 2462 static const char* gTextAlignStrings[SkPaint::kAlignCount] = { "Left", "Cent
er", "Right" }; |
2459 str->append(gTextAlignStrings[this->getTextAlign()]); | 2463 str->append(gTextAlignStrings[this->getTextAlign()]); |
2460 str->append("</dd>"); | 2464 str->append("</dd>"); |
2461 | 2465 |
2462 str->append("<dt>CapType:</dt><dd>"); | 2466 str->append("<dt>CapType:</dt><dd>"); |
2463 static const char* gStrokeCapStrings[SkPaint::kCapCount] = { "Butt", "Round"
, "Square" }; | 2467 static const char* gStrokeCapStrings[SkPaint::kCapCount] = { "Butt", "Round"
, "Square" }; |
2464 str->append(gStrokeCapStrings[this->getStrokeCap()]); | 2468 str->append(gStrokeCapStrings[this->getStrokeCap()]); |
2465 str->append("</dd>"); | 2469 str->append("</dd>"); |
2466 | 2470 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2604 case SkXfermode::kPlus_Mode: | 2608 case SkXfermode::kPlus_Mode: |
2605 return 0 == this->getAlpha(); | 2609 return 0 == this->getAlpha(); |
2606 case SkXfermode::kDst_Mode: | 2610 case SkXfermode::kDst_Mode: |
2607 return true; | 2611 return true; |
2608 default: | 2612 default: |
2609 break; | 2613 break; |
2610 } | 2614 } |
2611 } | 2615 } |
2612 return false; | 2616 return false; |
2613 } | 2617 } |
OLD | NEW |