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

void PoDoFo::PdfPainter::SetColor ( double  r,
double  g,
double  b 
) [inherited]

Set the color for all following non-stroking operations in rgb colorspace. This operation used the 'rg' PDF operator.

This color is also used when drawing text.

rred value in the range 0.0 - 1.0
ggreen value in the range 0.0 - 1.0
bblue value in the range 0.0 - 1.0

Definition at line 180 of file PdfPainter.cpp.

References PoDoFo::PdfPainter::m_pCanvas.

Referenced by PoDoFo::PdfTable::Draw(), PoDoFo::PdfPainter::SetColorCMYK(), and PoDoFo::PdfPainter::SetGray().

    PODOFO_RAISE_LOGIC_IF( !m_pCanvas, "Call SetPage() first before doing drawing operations." );
    CheckDoubleRange( r, 0.0, 1.0 );
    CheckDoubleRange( g, 0.0, 1.0 );
    CheckDoubleRange( b, 0.0, 1.0 );

    this->SetColor( PdfColor( r, g, b ) );

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index