Forward port of my recent changes in the 2.8 branch:

* Force use of floating point math in wxGCDC::DoDrawEllipticArc.

 * Check for 0.5 offset in wxGCDC::DoDrawRoundedRectangle and
   DoDrawEllipse.  Set wxGDIPlusContext to use the offset.

 * Avoid crash in wxStdDialogButtonSizer::Realize if there is no
   negative button.

 * Provide implementations for wxCairoPathData::AddPath,
   wxCairoContext::Clip, wxCairoContext::DrawBitmap,
   wxCairoContext::DrawIcon, and wxCairoContext::GetTextExtent.

 * Fix wxCairoContext::DrawText to draw the text using the upper-left
   corner for the x,y position, not the baseline.

 * Fix wxMacCoreGraphicsRenderer::CreateContext to be able to use a
   wxMemoryDC as the target.

 * Map wxTELETYPE font family on wxMac to a monospace font.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-03-26 20:08:41 +00:00
parent 28e88942bc
commit d9485f89b8
6 changed files with 211 additions and 30 deletions

View File

@@ -17,6 +17,7 @@
#ifndef WX_PRECOMP
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
#include "wx/log.h"
#include "wx/region.h"
#endif
@@ -2013,7 +2014,16 @@ wxGraphicsRenderer* wxGraphicsRenderer::GetDefaultRenderer()
wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContext( const wxWindowDC& dc)
{
return new wxMacCoreGraphicsContext(this,(CGContextRef)dc.GetWindow()->MacGetCGContextRef() );
wxMemoryDC* mdc = wxDynamicCast(&dc, wxMemoryDC);
if ( mdc )
{
return new wxMacCoreGraphicsContext(this,
(CGContextRef)mdc->GetGraphicsContext()->GetNativeContext());
}
else
{
return new wxMacCoreGraphicsContext(this,(CGContextRef)dc.GetWindow()->MacGetCGContextRef() );
}
}
wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContextFromNativeContext( void * context )