Commit ef043da6 authored by Linshizhi's avatar Linshizhi

Add alpha support to skia_svg_render example.

parent cfc36a68
......@@ -25,7 +25,7 @@ int main(int argc, char *argv[]) {
}
SkImageInfo imgInfo = SkImageInfo::Make(
width, height, kBGRA_8888_SkColorType, kOpaque_SkAlphaType);
width, height, kRGBA_8888_SkColorType, kPremul_SkAlphaType);
size_t size = width * height * 4;
uint8_t *buffer = new uint8_t[size];
......@@ -37,7 +37,7 @@ int main(int argc, char *argv[]) {
return 1;
}
canvas->clear(SkColors::kWhite);
//canvas->clear(SkColors::kWhite);
auto fDom = SkSVGDOM::MakeFromStream(svgStream);
fDom->setContainerSize(SkSize::Make(width, height));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment