gfx/skia/trunk/include/core/SkFontLCDConfig.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/include/core/SkFontLCDConfig.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,58 @@
     1.4 +/*
     1.5 + * Copyright 2013 Google Inc.
     1.6 + *
     1.7 + * Use of this source code is governed by a BSD-style license that can be
     1.8 + * found in the LICENSE file.
     1.9 + */
    1.10 +
    1.11 +#ifndef SkFontLCDConfig_DEFINED
    1.12 +#define SkFontLCDConfig_DEFINED
    1.13 +
    1.14 +#include "SkTypes.h"
    1.15 +
    1.16 +class SkFontLCDConfig {
    1.17 +public:
    1.18 +    /** LCDs either have their color elements arranged horizontally or
    1.19 +        vertically. When rendering subpixel glyphs we need to know which way
    1.20 +        round they are.
    1.21 +
    1.22 +        Note, if you change this after startup, you'll need to flush the glyph
    1.23 +        cache because it'll have the wrong type of masks cached.
    1.24 +
    1.25 +        @deprecated use SkPixelGeometry instead.
    1.26 +    */
    1.27 +    enum LCDOrientation {
    1.28 +        kHorizontal_LCDOrientation = 0,    //!< this is the default
    1.29 +        kVertical_LCDOrientation   = 1
    1.30 +    };
    1.31 +
    1.32 +    /** @deprecated set on Device creation. */
    1.33 +    static void SetSubpixelOrientation(LCDOrientation orientation);
    1.34 +    /** @deprecated get from Device. */
    1.35 +    static LCDOrientation GetSubpixelOrientation();
    1.36 +
    1.37 +    /** LCD color elements can vary in order. For subpixel text we need to know
    1.38 +        the order which the LCDs uses so that the color fringes are in the
    1.39 +        correct place.
    1.40 +
    1.41 +        Note, if you change this after startup, you'll need to flush the glyph
    1.42 +        cache because it'll have the wrong type of masks cached.
    1.43 +
    1.44 +        kNONE_LCDOrder means that the subpixel elements are not spatially
    1.45 +        separated in any usable fashion.
    1.46 +
    1.47 +        @deprecated use SkPixelGeometry instead.
    1.48 +     */
    1.49 +    enum LCDOrder {
    1.50 +        kRGB_LCDOrder = 0,    //!< this is the default
    1.51 +        kBGR_LCDOrder = 1,
    1.52 +        kNONE_LCDOrder = 2
    1.53 +    };
    1.54 +
    1.55 +    /** @deprecated set on Device creation. */
    1.56 +    static void SetSubpixelOrder(LCDOrder order);
    1.57 +    /** @deprecated get from Device. */
    1.58 +    static LCDOrder GetSubpixelOrder();
    1.59 +};
    1.60 +
    1.61 +#endif

mercurial