Skia
2D Graphics Library
SkOpenTypeSVGDecoder.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkOpenTypeSVGDecoder_DEFINED
9 #define SkOpenTypeSVGDecoder_DEFINED
10 
11 #include "include/core/SkColor.h"
12 #include "include/core/SkSpan.h"
13 #include "include/core/SkTypes.h"
14 
15 #include <memory>
16 
17 class SkCanvas;
18 
20 public:
24  virtual size_t approximateSize() = 0;
25  virtual bool render(SkCanvas&, int upem, SkGlyphID glyphId,
26  SkColor foregroundColor, SkSpan<SkColor> palette) = 0;
27  virtual ~SkOpenTypeSVGDecoder() = default;
28 };
29 
30 #endif // SkOpenTypeSVGDecoder_DEFINED
Types, consts, functions, and macros for colors.
uint32_t SkColor
32-bit ARGB color value, unpremultiplied.
Definition: SkColor.h:37
uint16_t SkGlyphID
16 bit unsigned integer to hold a glyph index
Definition: SkTypes.h:171
SkCanvas provides an interface for drawing, and how the drawing is clipped and transformed.
Definition: SkCanvas.h:99
Definition: SkOpenTypeSVGDecoder.h:19
virtual ~SkOpenTypeSVGDecoder()=default
virtual bool render(SkCanvas &, int upem, SkGlyphID glyphId, SkColor foregroundColor, SkSpan< SkColor > palette)=0
virtual size_t approximateSize()=0
Each instance probably owns an SVG DOM.