Don't draw the segment lines in wxGtkPrinterDC::DrawArc() unless it's filled.
The segments should only be drawn if we're filling the arc, i.e. drawing a pie, but not if we're just drawing its outline. Add a test of this to the printing sample. Closes #15609. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -182,6 +182,12 @@ void MyApp::Draw(wxDC&dc)
|
||||
dc.DrawPolygon( 5, points, 20, 250, wxODDEVEN_RULE );
|
||||
dc.DrawPolygon( 5, points, 50, 250, wxWINDING_RULE );
|
||||
|
||||
dc.DrawArc( 20, 330, 40, 300, 20, 300 );
|
||||
{
|
||||
wxDCBrushChanger changeBrush(dc, *wxTRANSPARENT_BRUSH);
|
||||
dc.DrawArc( 60, 330, 80, 300, 60, 300 );
|
||||
}
|
||||
|
||||
dc.DrawEllipticArc( 80, 250, 60, 30, 0.0, 270.0 );
|
||||
|
||||
points[0].x = 150;
|
||||
@@ -194,8 +200,6 @@ void MyApp::Draw(wxDC&dc)
|
||||
points[3].y = 220;
|
||||
dc.DrawSpline( 4, points );
|
||||
|
||||
dc.DrawArc( 20,10, 10,10, 25,40 );
|
||||
|
||||
wxString str;
|
||||
int i = 0;
|
||||
str.Printf( wxT("---- Text at angle %d ----"), i );
|
||||
|
@@ -1386,11 +1386,14 @@ void wxGtkPrinterDCImpl::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,w
|
||||
cairo_arc_negative(m_cairo, XLOG2DEV(xc), YLOG2DEV(yc),
|
||||
XLOG2DEVREL(wxRound(radius)), alpha1, alpha2);
|
||||
|
||||
cairo_line_to(m_cairo, XLOG2DEV(xc), YLOG2DEV(yc));
|
||||
cairo_close_path (m_cairo);
|
||||
if ( m_brush.IsNonTransparent() )
|
||||
{
|
||||
cairo_line_to(m_cairo, XLOG2DEV(xc), YLOG2DEV(yc));
|
||||
cairo_close_path (m_cairo);
|
||||
|
||||
SetBrush( m_brush );
|
||||
cairo_fill_preserve( m_cairo );
|
||||
SetBrush( m_brush );
|
||||
cairo_fill_preserve( m_cairo );
|
||||
}
|
||||
|
||||
SetPen (m_pen);
|
||||
cairo_stroke( m_cairo );
|
||||
|
Reference in New Issue
Block a user