Document third wxBitmapBundle::FromSVG() variant
Add a note that data has to be null terminated with the variants without len parameter and to use the third variant for data that is not null terminated. See #22838. (cherry picked from commit 17934d3d624a93b39b9c4935e2086d6ab0d54c1a)
This commit is contained in:
parent
12248d37be
commit
caf206039a
@ -256,12 +256,14 @@ public:
|
|||||||
|
|
||||||
@param data This data may, or not, have the XML document preamble, i.e.
|
@param data This data may, or not, have the XML document preamble, i.e.
|
||||||
it can start either with @c "<?xml" processing instruction or
|
it can start either with @c "<?xml" processing instruction or
|
||||||
directly with @c svg tag. Notice that two overloads of this
|
directly with @c svg tag. For NUL-terminated string, two overloads
|
||||||
function, taking const and non-const data, are provided: as the
|
of this function, taking const and non-const data, are provided: as
|
||||||
current implementation modifies the data while parsing, using the
|
the current implementation modifies the data while parsing, using
|
||||||
non-const variant is more efficient, as it avoids making copy of
|
the non-const variant is more efficient, as it avoids making copy
|
||||||
the data, but the data is consumed by it and can't be reused any
|
of the data, but the data is consumed by it and can't be reused any
|
||||||
more.
|
more. For non-NUL-terminated data, the third overload, taking an
|
||||||
|
extra parameter explicitly specifying the length of the input data,
|
||||||
|
@e must be used.
|
||||||
@param sizeDef The default size to return from GetDefaultSize() for
|
@param sizeDef The default size to return from GetDefaultSize() for
|
||||||
this bundle. As SVG images usually don't have any natural
|
this bundle. As SVG images usually don't have any natural
|
||||||
default size, it should be provided when creating the bundle.
|
default size, it should be provided when creating the bundle.
|
||||||
@ -271,6 +273,10 @@ public:
|
|||||||
/// @overload
|
/// @overload
|
||||||
static wxBitmapBundle FromSVG(const char* data, const wxSize& sizeDef);
|
static wxBitmapBundle FromSVG(const char* data, const wxSize& sizeDef);
|
||||||
|
|
||||||
|
/// @overload
|
||||||
|
static wxBitmapBundle FromSVG(const wxByte* data, size_t len, const wxSize& sizeDef);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Create a bundle from the SVG image loaded from the given file.
|
Create a bundle from the SVG image loaded from the given file.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user