~ubuntu-branches/ubuntu/maverick/wxwidgets2.8/maverick-proposed

« back to all changes in this revision

Viewing changes to src/common/graphcmn.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Devid Filoni
  • Date: 2007-11-06 18:25:13 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20071106182513-809agqds6igh7mqo
Tags: 2.8.6.1-0ubuntu1
* New upstream version, based on the upstream tarball
  wxPython-src-2.8.6.1.tar.bz2, renamed debian to debian-upstream.
* Provide a get-orig-source target to do the repackaging.
* Fix "substvar-source-version-is-deprecated" lintian warnings.
* Remove duplicate Description field in debian/control.
* Add "\" at the end of line 8 in debian/python-wxtools.menu to fix
  "bad-test-in-menu-item" lintian error.
* Provide .xpm icons to fix "menu-icon-not-in-xpm-format" lintian errors,
  changed Icon field in debian/python-wxtools.menu.
* Fix "wrong-name-for-upstream-changelog" lintian warnings.
* Remove "Application;" from Categories field in debian/pycrust.desktop,
  debian/pyshell.desktop, debian/xrced.desktop.
* Switch "Apps" to "Applications" in debian/python-wxtools.menu to fix
  "menu-item-uses-apps-section" lintian warnings.
* Drop the icon extension from debian/pycrust.desktop,
  debian/pyshell.desktop, debian/xrced.desktop.
* Add dpatch support.
* Add "WX_CONFIG" patch.
* debian/rules:
  - added .xpm icons to install-gtk-py-tools target
  - added "docs/changes.txt" to dh_installchangelogs in binary-common target
  - added "\" at the end of "install-examples install-msw-dev
    install-msw-dbg install-headers-msw" line in .PHONY

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// Author:      Stefan Csomor
5
5
// Modified by:
6
6
// Created:     
7
 
// RCS-ID:      $Id: graphcmn.cpp,v 1.30 2006/12/05 23:42:48 RD Exp $
 
7
// RCS-ID:      $Id: graphcmn.cpp 49287 2007-10-21 11:52:54Z SC $
8
8
// Copyright:   (c) Stefan Csomor
9
9
// Licence:     wxWindows licence
10
10
/////////////////////////////////////////////////////////////////////////////
579
579
void wxGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDouble y, const wxGraphicsBrush& backgroundBrush ) 
580
580
{
581
581
    wxGraphicsBrush formerBrush = m_brush;
 
582
        wxGraphicsPen formerPen = m_pen;
582
583
    wxDouble width;
583
584
    wxDouble height;
584
585
    wxDouble descent;
585
586
    wxDouble externalLeading;
586
587
    GetTextExtent( str , &width, &height, &descent, &externalLeading );
587
588
    SetBrush( backgroundBrush );
 
589
        // to make sure our 'OffsetToPixelBoundaries' doesn't move the fill shape
 
590
        SetPen( wxNullGraphicsPen );
588
591
 
589
592
    wxGraphicsPath path = CreatePath();
590
593
    path.AddRectangle( x , y, width, height );
592
595
 
593
596
    DrawText( str, x ,y);
594
597
    SetBrush( formerBrush );
 
598
        SetPen( formerPen );
595
599
}
596
600
 
597
601
void wxGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle, const wxGraphicsBrush& backgroundBrush )
598
602
{
599
603
    wxGraphicsBrush formerBrush = m_brush;
 
604
        wxGraphicsPen formerPen = m_pen;
600
605
 
601
606
    wxDouble width;
602
607
    wxDouble height;
604
609
    wxDouble externalLeading;
605
610
    GetTextExtent( str , &width, &height, &descent, &externalLeading );
606
611
    SetBrush( backgroundBrush );
 
612
        // to make sure our 'OffsetToPixelBoundaries' doesn't move the fill shape
 
613
        SetPen( wxNullGraphicsPen );
607
614
 
608
615
    wxGraphicsPath path = CreatePath();
609
616
    path.MoveToPoint( x , y );
615
622
    FillPath( path );
616
623
    DrawText( str, x ,y, angle);
617
624
    SetBrush( formerBrush );
 
625
        SetPen( formerPen );
618
626
}
619
627
 
620
628
void wxGraphicsContext::StrokeLine( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2)