| 191 | } |
| 192 | |
| 193 | Valdi::Result<Ref<Image>> Image::makeFromSVG(const Valdi::BytesView& data, int preferredWidth, int preferredHeight) { |
| 194 | auto bitmap = rasterizeSVG( |
| 195 | data, BitmapFactory::getInstance(Valdi::ColorType::ColorTypeRGBA8888), preferredWidth, preferredHeight); |
| 196 | if (!bitmap) { |
| 197 | return bitmap.moveError(); |
| 198 | } |
| 199 | |
| 200 | return makeFromBitmap(bitmap.moveValue(), false); |
| 201 | } |
| 202 | |
| 203 | Valdi::Result<Ref<Image>> Image::makeFromPixelsData(const Valdi::BitmapInfo& bitmapInfo, |
| 204 | const Valdi::BytesView& pixelsData, |
nothing calls this directly
no test coverage detected