22#if defined(SK_BUILD_FOR_MAC)
37 if (FLAGS_input.isEmpty() || FLAGS_output.isEmpty()) {
38 std::cerr <<
"Missing required 'input' and 'output' args.\n";
42 if (FLAGS_width <= 0 || FLAGS_height <= 0) {
43 std::cerr <<
"Invalid width/height.\n";
49 std::cerr <<
"Could not open " << FLAGS_input[0] <<
"\n";
54#if defined(SK_BUILD_FOR_MAC)
70 .setResourceProvider(std::move(rp))
75 std::cerr <<
"Could not parse " << FLAGS_input[0] <<
"\n";
81 svg_dom->setContainerSize(
SkSize::Make(FLAGS_width, FLAGS_height));
82 svg_dom->render(
surface->getCanvas());
89 std::cerr <<
"Could not open " << FLAGS_output[0] <<
" for writing.\n";
97 std::cerr <<
"PNG encoding failed.\n";
SK_API sk_sp< SkFontMgr > SkFontMgr_New_Custom_Empty()
SK_API sk_sp< SkFontMgr > SkFontMgr_New_CoreText(CTFontCollectionRef)
static void Parse(int argc, const char *const *argv)
static SkString Dirname(const char *fullPath)
static sk_sp< DataURIResourceProviderProxy > Make(sk_sp< ResourceProvider > rp, ImageDecodeStrategy=ImageDecodeStrategy::kLazyDecode, sk_sp< const SkFontMgr > fontMgr=nullptr)
static sk_sp< FileResourceProvider > Make(SkString base_dir, ImageDecodeStrategy=ImageDecodeStrategy::kLazyDecode)
sk_sp< SkFontMgr > fontMgr
void RegisterAllAvailable()
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
sk_sp< Factory > BestAvailable()
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
DlVertices::Builder Builder
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkSize Make(SkScalar w, SkScalar h)