Allow passing already parsed HTML to wxHtmlDCRenderer
This is more efficient when the same HTML is reused multiple times, e.g. for measuring it first and then rendering it. The new function also makes it simpler to parse HTML and manipulate it in some way before measuring and rendering it.
This commit is contained in:
@@ -168,6 +168,19 @@ public:
|
||||
const wxString& basepath = wxEmptyString,
|
||||
bool isdir = true);
|
||||
|
||||
/**
|
||||
Associate the given HTML contents to the renderer.
|
||||
|
||||
This is similar to SetHtmlText(), but is more efficient as the text can
|
||||
be parsed only once, using wxHtmlParser::Parse(), and then passed to
|
||||
wxHtmlDCRenderer multiple times or already reused for other purposes.
|
||||
|
||||
Note that @a cell will be modified (e.g. laid out) by this function.
|
||||
|
||||
@since 3.1.2
|
||||
*/
|
||||
void SetHtmlCell(wxHtmlContainerCell& cell);
|
||||
|
||||
/**
|
||||
Set size of output rectangle, in pixels. Note that you @b can't change
|
||||
width of the rectangle between calls to Render() !
|
||||
|
Reference in New Issue
Block a user