OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2013 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef SkFontLCDConfig_DEFINED |
| 9 #define SkFontLCDConfig_DEFINED |
| 10 |
| 11 #include "SkTypes.h" |
| 12 |
| 13 class SkFontLCDConfig { |
| 14 public: |
| 15 /** LCDs either have their color elements arranged horizontally or |
| 16 vertically. When rendering subpixel glyphs we need to know which way |
| 17 round they are. |
| 18 |
| 19 Note, if you change this after startup, you'll need to flush the glyph |
| 20 cache because it'll have the wrong type of masks cached. |
| 21 |
| 22 @deprecated use SkPixelGeometry instead. |
| 23 */ |
| 24 enum LCDOrientation { |
| 25 kHorizontal_LCDOrientation = 0, //!< this is the default |
| 26 kVertical_LCDOrientation = 1 |
| 27 }; |
| 28 |
| 29 /** @deprecated set on Device creation. */ |
| 30 static void SetSubpixelOrientation(LCDOrientation orientation); |
| 31 /** @deprecated get from Device. */ |
| 32 static LCDOrientation GetSubpixelOrientation(); |
| 33 |
| 34 /** LCD color elements can vary in order. For subpixel text we need to know |
| 35 the order which the LCDs uses so that the color fringes are in the |
| 36 correct place. |
| 37 |
| 38 Note, if you change this after startup, you'll need to flush the glyph |
| 39 cache because it'll have the wrong type of masks cached. |
| 40 |
| 41 kNONE_LCDOrder means that the subpixel elements are not spatially |
| 42 separated in any usable fashion. |
| 43 |
| 44 @deprecated use SkPixelGeometry instead. |
| 45 */ |
| 46 enum LCDOrder { |
| 47 kRGB_LCDOrder = 0, //!< this is the default |
| 48 kBGR_LCDOrder = 1, |
| 49 kNONE_LCDOrder = 2 |
| 50 }; |
| 51 |
| 52 /** @deprecated set on Device creation. */ |
| 53 static void SetSubpixelOrder(LCDOrder order); |
| 54 /** @deprecated get from Device. */ |
| 55 static LCDOrder GetSubpixelOrder(); |
| 56 }; |
| 57 |
| 58 #endif |
| 59 |
OLD | NEW |