Skip to content

Commit 6117363

Browse files
committed
Update descripton of MakeRasterN32Premul on interaction with other software
Reference to drawing with wx. See kyamagu#323 Update wording
1 parent ac01599 commit 6117363

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/skia/Surface.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,15 @@ surface
10101010
Internally, sets :py:class:`ImageInfo` to width, height, native color
10111011
type, and :py:attr:`AlphaType.kPremul`.
10121012
1013+
Note that the :py:class:`ImageInfo` native color type might not be what
1014+
you desire, if you intent to interact with other software expecting
1015+
specific color type order. e.g. package `wx`'s `wx.Bitmap.FromBufferRGBA`.
1016+
For that purpose, you need one of the other :py:class:`Surface`
1017+
constructors which takes an explicit appropriate matching
1018+
:py:class:`ImageInfo` input, or one that an explicit :py:class:`ColorType`
1019+
input. You should check the output of `surface.imageInfo().colorType()`
1020+
afterwards, in that usage.
1021+
10131022
:py:class:`Surface` is returned if width and height are greater than
10141023
zero.
10151024

0 commit comments

Comments
 (0)