Flutter Engine
The Flutter Engine
SkSVGOpenTypeSVGDecoder.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 SkSVGOpenTypeSVGDecoder_DEFINED
9#define SkSVGOpenTypeSVGDecoder_DEFINED
10
13#include "include/core/SkSpan.h"
15
16class SkCanvas;
17class SkSVGDOM;
18
20public:
21 static std::unique_ptr<SkOpenTypeSVGDecoder> Make(const uint8_t* svg, size_t svgLength);
22 size_t approximateSize() override;
23 bool render(SkCanvas&, int upem, SkGlyphID glyphId,
24 SkColor foregroundColor, SkSpan<SkColor> palette) override;
26private:
28 sk_sp<SkSVGDOM> fSkSvg;
29 size_t fApproximateSize;
30};
31
32#endif // SkSVGOpenTypeSVGDecoder_DEFINED
uint32_t SkColor
Definition: SkColor.h:37
uint16_t SkGlyphID
Definition: SkTypes.h:179
~SkSVGOpenTypeSVGDecoder() override
static std::unique_ptr< SkOpenTypeSVGDecoder > Make(const uint8_t *svg, size_t svgLength)
bool render(SkCanvas &, int upem, SkGlyphID glyphId, SkColor foregroundColor, SkSpan< SkColor > palette) override
const char * svg