cleanup and cgcolor changeds

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-11-22 18:15:16 +00:00
parent 115563867d
commit 276ee5334d
12 changed files with 160 additions and 107 deletions

View File

@@ -58,6 +58,19 @@ static const double RAD2DEG = 180.0 / M_PI;
#pragma mark -
#pragma mark wxMacCoreGraphicsPattern, ImagePattern, HatchPattern classes
OSStatus wxMacDrawCGImage(
CGContextRef inContext,
const HIRect * inBounds,
CGImageRef inImage)
{
#ifdef __LP64__
// todo flip
CGContextDrawImage(inContext, *inBounds, inImage );
#else
HIViewDrawCGImage( inContext, inBounds, inImage );
#endif
}
// CGPattern wrapper class: always allocate on heap, never call destructor
class wxMacCoreGraphicsPattern
@@ -119,7 +132,7 @@ public :
virtual void Render( CGContextRef ctxRef )
{
if (m_image != NULL)
HIViewDrawCGImage( ctxRef, &m_imageBounds, m_image );
wxMacDrawCGImage( ctxRef, &m_imageBounds, m_image );
}
protected :
@@ -695,7 +708,8 @@ wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* rendere
// we need the scale here ...
Fixed atsuSize = IntToFixed( int( 1 * font.MacGetFontSize()) );
RGBColor atsuColor = MAC_WXCOLORREF( col.GetPixel() );
RGBColor atsuColor ;
col.GetRGBColor( &atsuColor );
ATSUAttributeTag atsuTags[] =
{
kATSUSizeTag ,
@@ -1648,13 +1662,13 @@ void wxMacCoreGraphicsContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDo
else
{
((wxMacCoreGraphicsBrushData*)m_brush.GetRefData())->Apply(this);
HIViewDrawCGImage( m_cgContext , &r , image );
wxMacDrawCGImage( m_cgContext , &r , image );
}
}
}
else
{
HIViewDrawCGImage( m_cgContext , &r , image );
wxMacDrawCGImage( m_cgContext , &r , image );
}
CGImageRelease( image );
}