Leave only wxGraphicsRenderer::CreatePen(wxGraphicsPenInfo) overload

It doesn't make much sense to require all the graphics backends to
create wxGraphicsPen from either wxPen or wxGraphicsPenInfo when the
former can be handled just once in the common code.

So do just this, leaving CreatePen() overload taking wxGraphicsPenInfo
where the real pen construction takes place and implementing
wxGraphicsPen creation from wxPen in the common wxGraphicsContext code.

This is not 100% backwards-compatible as any code inheriting from
wxGraphicsRenderer and overriding its CreatePen() will now be broken,
however this should be extremely rare (there is no good reason to
inherit from this class in the user code) and result in compile errors
if it does happen.
This commit is contained in:
Vadim Zeitlin
2017-09-10 01:48:30 +02:00
parent af3581758b
commit 76fd05b147
8 changed files with 29 additions and 134 deletions

View File

@@ -58,6 +58,10 @@ Changes in behaviour which may result in build errors
- Never documented and not always available private wxGetClipboardData()
function now doesn't exist at all any more in wxMSW, use wxClipboard instead.
- wxGraphicsRenderer::CreatePen() now takes wxGraphicsPenInfo and not a wxPen.
This only affects code defining its own custom renderers, code just using
wxGraphicsContext::CreatePen() continues to compile and work as before.
3.1.1: (not released yet)
----------------------------