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

void wxPdfDocument::Text ( double  x,
double  y,
const wxString &  txt 
) [virtual]

Prints a character string.

The origin is on the left of the first charcter, on the baseline. This method allows to place a string precisely on the page, but it is usually easier to use Cell(), MultiCell() or Write() which are the standard methods to print text.

Parameters:
xAbscissa of the origin
yOrdinate of the origin
txtString to print
See also:
SetFont(), SetTextColor(), Cell(), MultiCell(), Write()

Definition at line 863 of file pdfdoc.cpp.

References DoDecoration(), Double2String(), wxPdfColour::GetColor(), m_colorFlag, m_currentFont, m_decoration, m_h, m_k, m_textColor, Out(), OutAscii(), TextEscape(), and wxPdfFont::UpdateUsedChars().

Referenced by wxPdfBarCodeCreator::Barcode(), wxPdfBarCodeCreator::Code39(), wxPdfBarCodeCreator::I25(), and RotatedText().

{
  // Output a string
  if (m_colorFlag)
  {
    Out("q ", false);
    OutAscii(m_textColor.GetColor(false), false);
    Out(" ", false);
  }
  OutAscii(wxString(_T("BT ")) +
           Double2String(x*m_k,2) + wxString(_T(" ")) +
           Double2String((m_h-y)*m_k,2) + wxString(_T(" Td (")), false);
  TextEscape(txt,false);
  Out(") Tj ET", false);
  if (m_currentFont != 0)
  {
    m_currentFont->UpdateUsedChars(txt);
  }

  if ((m_decoration & wxPDF_FONT_DECORATION) && txt.Length() > 0)
  {
    Out(" ", false);
    OutAscii(DoDecoration(x, y, txt), false);
  }

  if (m_colorFlag)
  {
    Out(" Q", false);
  }
  Out("\n", false);
}

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