| 26 | |
| 27 | namespace pag { |
| 28 | static std::unique_ptr<tgfx::Paint> CreateFillPaint(const Glyph* glyph) { |
| 29 | if (glyph->getStyle() != TextStyle::Fill && glyph->getStyle() != TextStyle::StrokeAndFill) { |
| 30 | return nullptr; |
| 31 | } |
| 32 | auto fillPaint = new tgfx::Paint(); |
| 33 | fillPaint->setStyle(tgfx::PaintStyle::Fill); |
| 34 | fillPaint->setColor(ToTGFX(glyph->getFillColor())); |
| 35 | fillPaint->setAlpha(glyph->getAlpha()); |
| 36 | return std::unique_ptr<tgfx::Paint>(fillPaint); |
| 37 | } |
| 38 | |
| 39 | static std::unique_ptr<tgfx::Paint> CreateStrokePaint(const Glyph* glyph) { |
| 40 | if (glyph->getStyle() != TextStyle::Stroke && glyph->getStyle() != TextStyle::StrokeAndFill) { |
no test coverage detected