/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkSVGAttribute_DEFINED #define SkSVGAttribute_DEFINED #include "experimental/svg/model/SkSVGTypes.h" #include "src/core/SkTLazy.h" class SkSVGRenderContext; enum class SkSVGAttribute { kClipPath, kClipRule, kCx, // , , : center x position kCy, // , , : center y position kD, kFill, kFillOpacity, kFillRule, kFx, // : focal point x position kFy, // : focal point y position kGradientTransform, kHeight, kHref, kOffset, kOpacity, kPatternTransform, kPoints, kR, // , : radius kRx, // ,: horizontal (corner) radius kRy, // ,: vertical (corner) radius kSpreadMethod, kStopColor, kStopOpacity, kStroke, kStrokeDashArray, kStrokeDashOffset, kStrokeOpacity, kStrokeLineCap, kStrokeLineJoin, kStrokeMiterLimit, kStrokeWidth, kTransform, kViewBox, kVisibility, kWidth, kX, kX1, // : first endpoint x kX2, // : second endpoint x kY, kY1, // : first endpoint y kY2, // : second endpoint y kUnknown, }; struct SkSVGPresentationAttributes { static SkSVGPresentationAttributes MakeInitial(); // TODO: SkTLazy adds an extra ptr per attribute; refactor to reduce overhead. SkTLazy fFill; SkTLazy fFillOpacity; SkTLazy fFillRule; SkTLazy fClipRule; SkTLazy fStroke; SkTLazy fStrokeDashArray; SkTLazy fStrokeDashOffset; SkTLazy fStrokeLineCap; SkTLazy fStrokeLineJoin; SkTLazy fStrokeMiterLimit; SkTLazy fStrokeOpacity; SkTLazy fStrokeWidth; SkTLazy fVisibility; // uninherited SkTLazy fOpacity; SkTLazy fClipPath; }; #endif // SkSVGAttribute_DEFINED