Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
I
IMGRender
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
IMGRender
Commits
ef043da6
Commit
ef043da6
authored
Aug 01, 2022
by
Linshizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add alpha support to skia_svg_render example.
parent
cfc36a68
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
skia_svg_render.cc
examples/skia_svg_render.cc
+2
-2
No files found.
examples/skia_svg_render.cc
View file @
ef043da6
...
...
@@ -25,7 +25,7 @@ int main(int argc, char *argv[]) {
}
SkImageInfo
imgInfo
=
SkImageInfo
::
Make
(
width
,
height
,
k
BGRA_8888_SkColorType
,
kOpaque
_SkAlphaType
);
width
,
height
,
k
RGBA_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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment