Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

void wxPdfDocument::Polygon ( const wxPdfArrayDouble &  x,
const wxPdfArrayDouble &  y,
int  style = wxPDF_STYLE_DRAW 
) [virtual]

Draws a polygon.

Parameters:
xArray with abscissa values
yArray with ordinate values
style,:Style of polygon (draw and/or fill)

Definition at line 1239 of file pdfgraphics.cpp.

References OutAscii(), OutLine(), and OutPoint().

Referenced by RegularPolygon(), and StarPolygon().

{
  int np = (x.GetCount() < y.GetCount()) ? x.GetCount() : y.GetCount();

  wxString op;
  if ((style & wxPDF_STYLE_FILLDRAW) == wxPDF_STYLE_FILL)
  {
    op = _T("f");
  }
  else
  {
    if ((style & wxPDF_STYLE_FILLDRAW) == wxPDF_STYLE_FILLDRAW)
    {
      op = _T("B");
    }
    else
    {
      op = _T("S");
    }
  }

  OutPoint(x[0], y[0]);
  int i;
  for (i = 1; i < np; i++)
  {
    OutLine(x[i], y[i]);
  }
  OutLine(x[0], y[0]);
  OutAscii(op);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index