Discussion:
wxRichTTextBuffer->Draw api changes
Steve Cookson
2014-06-04 22:39:44 UTC
Permalink
Hi Guys,

In 2.8.11 I have a custom bitmap header which redraws nicely using this
command:

if (m_firstpageHeaderBool && page==1)
{
m_firstpageHeaderBuffer->UpdateRanges();
m_firstpageHeaderBuffer->Draw(*dc,
m_firstpageHeaderBuffer->GetRange(), wxRichTextRange(-1,-1),
wxRichTextSelection(), headerRect, 0 /* descent */,
wxRICHTEXT_DRAW_IGNORE_CACHE /* flags */);
}

In 3.0.0 the ->Draw parameters have changed somewhat. What should the
new ->Draw look like?

Regards

Steve
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Julian Smart
2014-06-05 07:15:01 UTC
Permalink
Hi Steve,

Change GetRange() to GetOwnRange(), and add a context argument after
*dc, where context is declared as:

wxRichTextDrawingContext context(m_firstpageHeaderBuffer);

Regards,

Julian
Post by Steve Cookson
Hi Guys,
In 2.8.11 I have a custom bitmap header which redraws nicely using
if (m_firstpageHeaderBool && page==1)
{
m_firstpageHeaderBuffer->UpdateRanges();
m_firstpageHeaderBuffer->Draw(*dc,
m_firstpageHeaderBuffer->GetRange(), wxRichTextRange(-1,-1),
wxRichTextSelection(), headerRect, 0 /* descent */,
wxRICHTEXT_DRAW_IGNORE_CACHE /* flags */);
}
In 3.0.0 the ->Draw parameters have changed somewhat. What should the
new ->Draw look like?
Regards
Steve
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...