X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd9bafe1299852bfdb10c4af009e075570438e82..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/msw/graphics.cpp diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 8532760634..8f1844b093 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -89,23 +89,15 @@ inline StringFormat* GetDrawTextStringFormat() { if ( !gs_drawTextStringFormat ) { - // We create this string format with exactly the same flags as - // StringFormat::GenericTypographic() is documented to use in MSDN - // except for the last one which doesn't make any difference for - // DrawText() but that we do want to use when measuring text. - // - // The reason for not just using GenericTypographic itself is that it - // does something else (what exactly is unfortunately not documented), - // which results in string being displayed quite differently from the - // default rendering, see #14537. - gs_drawTextStringFormat - = new StringFormat - ( - StringFormatFlagsLineLimit | - StringFormatFlagsNoClip | - StringFormatFlagsNoFitBlackBox | - StringFormatFlagsMeasureTrailingSpaces - ); + gs_drawTextStringFormat = new StringFormat(StringFormat::GenericTypographic()); + + // This doesn't make any difference for DrawText() actually but we want + // this behaviour when measuring text. + gs_drawTextStringFormat->SetFormatFlags + ( + gs_drawTextStringFormat->GetFormatFlags() + | StringFormatFlagsMeasureTrailingSpaces + ); } return gs_drawTextStringFormat; @@ -381,6 +373,13 @@ public: // stroke lines connecting each of the points virtual void StrokeLines( size_t n, const wxPoint2DDouble *points); + // We don't have any specific implementation for this one in wxMSW but + // override it just to avoid warnings about hiding the base class virtual. + virtual void StrokeLines( size_t n, const wxPoint2DDouble *beginPoints, const wxPoint2DDouble *endPoints) + { + wxGraphicsContext::StrokeLines(n, beginPoints, endPoints); + } + // draws a polygon virtual void DrawLines( size_t n, const wxPoint2DDouble *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); @@ -2284,6 +2283,12 @@ wxGraphicsBitmap wxGDIPlusRenderer::CreateSubBitmap( const wxGraphicsBitmap &bit class wxGDIPlusRendererModule : public wxModule { public: + wxGDIPlusRendererModule() + { + // We must be uninitialized before GDI+ DLL itself is unloaded. + AddDependency("wxGdiPlusModule"); + } + virtual bool OnInit() { return true; } virtual void OnExit() {