gfx/skia/trunk/include/svg/SkSVGPaintState.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1
michael@0 2 /*
michael@0 3 * Copyright 2006 The Android Open Source Project
michael@0 4 *
michael@0 5 * Use of this source code is governed by a BSD-style license that can be
michael@0 6 * found in the LICENSE file.
michael@0 7 */
michael@0 8
michael@0 9
michael@0 10 #ifndef SkSVGPaintState_DEFINED
michael@0 11 #define SkSVGPaintState_DEFINED
michael@0 12
michael@0 13 #include "SkSVGBase.h"
michael@0 14 #include "SkString.h"
michael@0 15
michael@0 16 class SkSVGPaint : public SkSVGBase {
michael@0 17 public:
michael@0 18 enum Field {
michael@0 19 kInitial = -1,
michael@0 20 kClipPath,
michael@0 21 kClipRule,
michael@0 22 kEnableBackground,
michael@0 23 kFill,
michael@0 24 kFillRule,
michael@0 25 kFilter,
michael@0 26 kFontFamily,
michael@0 27 kFontSize,
michael@0 28 kLetterSpacing,
michael@0 29 kMask,
michael@0 30 kOpacity,
michael@0 31 kStopColor,
michael@0 32 kStopOpacity,
michael@0 33 kStroke,
michael@0 34 kStroke_Dasharray,
michael@0 35 kStroke_Linecap,
michael@0 36 kStroke_Linejoin,
michael@0 37 kStroke_Miterlimit,
michael@0 38 kStroke_Width,
michael@0 39 kStyle,
michael@0 40 kTransform,
michael@0 41 kTerminal
michael@0 42 };
michael@0 43
michael@0 44 SkSVGPaint();
michael@0 45 virtual void addAttribute(SkSVGParser& parser, int attrIndex,
michael@0 46 const char* attrValue, size_t attrLength);
michael@0 47 bool flush(SkSVGParser& , bool isFlushable, bool isDef);
michael@0 48 virtual int getAttributes(const SkSVGAttribute** attrPtr);
michael@0 49 static void Push(SkSVGPaint** head, SkSVGPaint* add);
michael@0 50 static void Pop(SkSVGPaint** head);
michael@0 51 SkString* operator[](int index);
michael@0 52 SkString fInitial;
michael@0 53 SkString f_clipPath;
michael@0 54 SkString f_clipRule;
michael@0 55 SkString f_enableBackground;
michael@0 56 SkString f_fill;
michael@0 57 SkString f_fillRule;
michael@0 58 SkString f_filter;
michael@0 59 SkString f_fontFamily;
michael@0 60 SkString f_fontSize;
michael@0 61 SkString f_letterSpacing;
michael@0 62 SkString f_mask;
michael@0 63 SkString f_opacity;
michael@0 64 SkString f_stopColor;
michael@0 65 SkString f_stopOpacity;
michael@0 66 SkString f_stroke;
michael@0 67 SkString f_strokeDasharray;
michael@0 68 SkString f_strokeLinecap;
michael@0 69 SkString f_strokeLinejoin;
michael@0 70 SkString f_strokeMiterlimit;
michael@0 71 SkString f_strokeWidth;
michael@0 72 SkString f_style; // unused, but allows array access to the rest
michael@0 73 SkString f_transform;
michael@0 74 #ifdef SK_DEBUG
michael@0 75 SkString fTerminal;
michael@0 76 #endif
michael@0 77 SkString fTransformID;
michael@0 78 static SkSVGAttribute gAttributes[];
michael@0 79 static const int kAttributesSize;
michael@0 80 private:
michael@0 81 void setSave(SkSVGParser& );
michael@0 82 bool writeChangedAttributes(SkSVGParser& , SkSVGPaint& , bool* changed);
michael@0 83 bool writeChangedElements(SkSVGParser& , SkSVGPaint& , bool* changed);
michael@0 84 SkSVGPaint* fNext;
michael@0 85 friend class SkSVGParser;
michael@0 86 typedef SkSVGPaint BASE_CLASS;
michael@0 87 };
michael@0 88
michael@0 89 #endif // SkSVGPaintState_DEFINED

mercurial