michael@0: /* michael@0: * Copyright 2013 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #ifndef SkFontLCDConfig_DEFINED michael@0: #define SkFontLCDConfig_DEFINED michael@0: michael@0: #include "SkTypes.h" michael@0: michael@0: class SkFontLCDConfig { michael@0: public: michael@0: /** LCDs either have their color elements arranged horizontally or michael@0: vertically. When rendering subpixel glyphs we need to know which way michael@0: round they are. michael@0: michael@0: Note, if you change this after startup, you'll need to flush the glyph michael@0: cache because it'll have the wrong type of masks cached. michael@0: michael@0: @deprecated use SkPixelGeometry instead. michael@0: */ michael@0: enum LCDOrientation { michael@0: kHorizontal_LCDOrientation = 0, //!< this is the default michael@0: kVertical_LCDOrientation = 1 michael@0: }; michael@0: michael@0: /** @deprecated set on Device creation. */ michael@0: static void SetSubpixelOrientation(LCDOrientation orientation); michael@0: /** @deprecated get from Device. */ michael@0: static LCDOrientation GetSubpixelOrientation(); michael@0: michael@0: /** LCD color elements can vary in order. For subpixel text we need to know michael@0: the order which the LCDs uses so that the color fringes are in the michael@0: correct place. michael@0: michael@0: Note, if you change this after startup, you'll need to flush the glyph michael@0: cache because it'll have the wrong type of masks cached. michael@0: michael@0: kNONE_LCDOrder means that the subpixel elements are not spatially michael@0: separated in any usable fashion. michael@0: michael@0: @deprecated use SkPixelGeometry instead. michael@0: */ michael@0: enum LCDOrder { michael@0: kRGB_LCDOrder = 0, //!< this is the default michael@0: kBGR_LCDOrder = 1, michael@0: kNONE_LCDOrder = 2 michael@0: }; michael@0: michael@0: /** @deprecated set on Device creation. */ michael@0: static void SetSubpixelOrder(LCDOrder order); michael@0: /** @deprecated get from Device. */ michael@0: static LCDOrder GetSubpixelOrder(); michael@0: }; michael@0: michael@0: #endif