#ifndef GraphicsTypes_h
#define GraphicsTypes_h
#include "platform/PlatformExport.h"
#include "public/platform/WebBlendMode.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "wtf/Forward.h"
namespace WebCore {
enum StrokeStyle {
NoStroke,
SolidStroke,
DottedStroke,
DashedStroke,
DoubleStroke,
WavyStroke,
};
enum InterpolationQuality {
InterpolationNone,
InterpolationLow,
InterpolationMedium,
InterpolationHigh,
#if USE(LOW_QUALITY_IMAGE_INTERPOLATION)
InterpolationDefault = InterpolationLow,
#else
InterpolationDefault = InterpolationHigh,
#endif
};
enum CompositeOperator {
CompositeClear,
CompositeCopy,
CompositeSourceOver,
CompositeSourceIn,
CompositeSourceOut,
CompositeSourceAtop,
CompositeDestinationOver,
CompositeDestinationIn,
CompositeDestinationOut,
CompositeDestinationAtop,
CompositeXOR,
CompositePlusDarker,
CompositePlusLighter,
CompositeDifference
};
enum GradientSpreadMethod {
SpreadMethodPad,
SpreadMethodReflect,
SpreadMethodRepeat
};
enum LineCap {
ButtCap = SkPaint::kButt_Cap,
RoundCap = SkPaint::kRound_Cap,
SquareCap = SkPaint::kSquare_Cap
};
enum LineJoin {
MiterJoin = SkPaint::kMiter_Join,
RoundJoin = SkPaint::kRound_Join,
BevelJoin = SkPaint::kBevel_Join
};
enum HorizontalAlignment { AlignLeft, AlignRight, AlignHCenter };
enum TextBaseline { AlphabeticTextBaseline, TopTextBaseline, MiddleTextBaseline, BottomTextBaseline, IdeographicTextBaseline, HangingTextBaseline };
enum TextAlign { StartTextAlign, EndTextAlign, LeftTextAlign, CenterTextAlign, RightTextAlign };
enum TextDrawingMode {
TextModeFill = 1 << 0,
TextModeStroke = 1 << 1,
};
typedef unsigned TextDrawingModeFlags;
enum ColorFilter {
ColorFilterNone,
ColorFilterLuminanceToAlpha,
ColorFilterSRGBToLinearRGB,
ColorFilterLinearRGBToSRGB
};
PLATFORM_EXPORT String compositeOperatorName(CompositeOperator, blink::WebBlendMode);
PLATFORM_EXPORT bool parseCompositeAndBlendOperator(const String&, CompositeOperator&, blink::WebBlendMode&);
PLATFORM_EXPORT String lineCapName(LineCap);
PLATFORM_EXPORT bool parseLineCap(const String&, LineCap&);
PLATFORM_EXPORT String lineJoinName(LineJoin);
PLATFORM_EXPORT bool parseLineJoin(const String&, LineJoin&);
PLATFORM_EXPORT String textAlignName(TextAlign);
PLATFORM_EXPORT bool parseTextAlign(const String&, TextAlign&);
PLATFORM_EXPORT String textBaselineName(TextBaseline);
PLATFORM_EXPORT bool parseTextBaseline(const String&, TextBaseline&);
}
#endif