NCBI C++ ToolKit
Classes | Functions | Variables
GUI_PRINT

Classes

class  CGlRenderPdf
 CGlRenderPdf. More...
 
class  CSVGRenderer
 

Functions

 CGlRenderPdf::CGlRenderPdf ()
 
virtual CGlRenderPdf::~CGlRenderPdf ()
 
void CGlRenderPdf::SetPdf (CRef< CPdf > &pdf)
 m_Pdf does the actually writing to the file More...
 
CRef< CPdfCGlRenderPdf::GetPdf ()
 
virtual bool CGlRenderPdf::IsSimplified () const
 
virtual bool CGlRenderPdf::IsPrinterFriendly () const
 
virtual void CGlRenderPdf::SetIsGreyscale (bool b)
 
virtual ERenderTarget CGlRenderPdf::GetApi ()
 Overridden in subclasses to return the supported rendering target. More...
 
virtual void CGlRenderPdf::Hint (GLenum, GLenum)
 
virtual void CGlRenderPdf::Render (CGlPane &pane, CGlModel2D *model)
 Specialized for models - which are just collections of buffers. More...
 
virtual void CGlRenderPdf::Vertex3f (GLfloat x, GLfloat y, GLfloat z)
 Add a vertex and decompose quads into tris if needed. More...
 
virtual void CGlRenderPdf::BeginText (const CGlTextureFont *font, const CRgbaColor &color)
 Set OpenGL state needed for writing text (call before DrawText) More...
 
virtual void CGlRenderPdf::BeginText (const CGlTextureFont *font)
 Same as above, but get color from m_RenderNode.m_State. More...
 
virtual void CGlRenderPdf::EndText ()
 Pops matrices and attributes after writing text. More...
 
virtual void CGlRenderPdf::WriteText (TModelUnit x, TModelUnit y, const char *text, TModelUnit rotate_degrees=0.0)
 Write text at specified model coords. More...
 
virtual void CGlRenderPdf::WriteText (TModelUnit x, TModelUnit y, TModelUnit width, TModelUnit height, const char *text, CGlTextureFont::TAlign align=CGlTextureFont::eAlign_Center, CGlTextureFont::ETruncate trunc=CGlTextureFont::eTruncate_Ellipsis, TModelUnit rotate_degrees=0.0f)
 Write text at specified model coords inside box defined by (x,y,width,height) with specified alignment, truncation and rotation. More...
 
virtual void CGlRenderPdf::Viewport (GLint x, GLint y, GLsizei width, GLsizei height)
 
void CGlRenderPdf::GetScreenSize (int &width, int &height) const
 PDF only - get size of pdf 'window' (pagesize) More...
 
virtual void CGlRenderPdf::x_RenderBuffer (CGlVboNode *node)
 Send the current buffer to the pdf library for rendering. More...
 
virtual bool CSVGRenderer::IsSimplified () const
 
void CSVGRenderer::SetSimplified (bool simplified=true)
 
virtual bool CSVGRenderer::IsPrinterFriendly () const
 
virtual void CSVGRenderer::SetIsGreyscale (bool b)
 
virtual ERenderTarget CSVGRenderer::GetApi ()
 Overridden in subclasses to return the supported rendering target. More...
 
virtual void CSVGRenderer::Hint (GLenum, GLenum)
 
virtual void CSVGRenderer::Initialize (const TVPRect &viewport)
 
virtual void CSVGRenderer::Finalize ()
 
virtual void CSVGRenderer::Viewport (GLint x, GLint y, GLsizei width, GLsizei height)
 
virtual void CSVGRenderer::Ortho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal)
 
virtual void CSVGRenderer::BeginText (const CGlTextureFont *font, const CRgbaColor &color)
 Set OpenGL state needed for writing text (call before DrawText) More...
 
virtual void CSVGRenderer::BeginText (const CGlTextureFont *font)
 Same as above, but get color from m_RenderNode.m_State. More...
 
virtual void CSVGRenderer::EndText ()
 Pops matrices and attributes after writing text. More...
 
virtual void CSVGRenderer::WriteText (TModelUnit x, TModelUnit y, const char *text, TModelUnit rotate_degrees=0.0)
 Write text at specified model coords. More...
 
virtual void CSVGRenderer::WriteText (TModelUnit x, TModelUnit y, TModelUnit width, TModelUnit height, const char *text, CGlTextureFont::TAlign align=CGlTextureFont::eAlign_Center, CGlTextureFont::ETruncate trunc=CGlTextureFont::eTruncate_Ellipsis, TModelUnit rotate_degrees=0.0f)
 Write text at specified model coords inside box defined by (x,y,width,height) with specified alignment, truncation and rotation. More...
 
void CSVGRenderer::Write (CNcbiOstream &ostrm)
 
virtual void CSVGRenderer::BeginClippingRect (GLint x, GLint y, GLsizei width, GLsizei height)
 
virtual void CSVGRenderer::EndClippingRect ()
 
virtual void CSVGRenderer::x_RenderBuffer (CGlVboNode *node)
 
void CSVGRenderer::x_PrintLineBuffer (CGlVboNode &node)
 
void CSVGRenderer::x_PrintPointBuffer (CGlVboNode &node)
 
void CSVGRenderer::x_PrintTriBuffer (CGlVboNode &node)
 
void CSVGRenderer::x_PrintQuadBuffer (CGlVboNode &node)
 
void CSVGRenderer::x_ProjectVertex (CVect2< float > &vertex)
 
void CSVGRenderer::x_ProjectVertices (vector< CVect2< float >> &vertices)
 
string CSVGRenderer::x_PolygonStippleToPattern (const GLubyte *stipple, const CRgbaColor &fill_rgba_color)
 
string CSVGRenderer::x_LinearGradient (std::vector< CRgbaColor > const &colors)
 
string CSVGRenderer::x_ClippingRect (GLint x, GLint y, GLsizei width, GLsizei height)
 
void CSVGRenderer::x_GetGradientColors (vector< CVect2< float >> const &vertices, vector< CRgbaColor > const &colors, vector< CRgbaColor > &gradient)
 
void CSVGRenderer::x_GetLineStyle (CGlVboNode &node, GLushort &pattern, GLint &factor, double &width, svg::Stroke::ELineCapStyle &lcap, svg::Stroke::ELineJoinStyle &ljoin)
 

Variables

CRef< CPdfCGlRenderPdf::m_Pdf
 
bool CSVGRenderer::m_Simplified = false
 
bool CSVGRenderer::m_IsGreyscale = false
 
int CSVGRenderer::m_Height
 
map< string, stringCSVGRenderer::m_PolygonStipplePatterns
 
map< string, stringCSVGRenderer::m_LinearGradients
 
map< string, stringCSVGRenderer::m_ClippingRects
 
unique_ptr< svg::SVG > CSVGRenderer::m_SVG
 
std::string CSVGRenderer::m_ClippingId
 
std::stack< std::stringCSVGRenderer::m_ClippingStack
 

Detailed Description

Function Documentation

◆ BeginClippingRect()

void CSVGRenderer::BeginClippingRect ( GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height 
)
virtual

◆ BeginText() [1/4]

void CGlRenderPdf::BeginText ( const CGlTextureFont font)
virtual

◆ BeginText() [2/4]

void CSVGRenderer::BeginText ( const CGlTextureFont font)
virtual

Same as above, but get color from m_RenderNode.m_State.

Reimplemented from CRenderCommon.

Definition at line 105 of file svg_renderer.cpp.

References CGlTextureFont::BeginText(), CGlState::GetColor(), CGlRenderNode::GetState(), LOG_POST, CRenderCommon::m_CurrentFont, CRenderCommon::m_RenderNode, CRenderCommon::m_TextColor, and NULL.

◆ BeginText() [3/4]

void CGlRenderPdf::BeginText ( const CGlTextureFont font,
const CRgbaColor color 
)
virtual

◆ BeginText() [4/4]

void CSVGRenderer::BeginText ( const CGlTextureFont font,
const CRgbaColor color 
)
virtual

Set OpenGL state needed for writing text (call before DrawText)

Reimplemented from CRenderCommon.

Definition at line 92 of file svg_renderer.cpp.

References CGlTextureFont::BeginText(), color, LOG_POST, CRenderCommon::m_CurrentFont, CRenderCommon::m_TextColor, and NULL.

◆ CGlRenderPdf()

CGlRenderPdf::CGlRenderPdf ( )
inline

Definition at line 76 of file glrenderpdf.hpp.

◆ EndClippingRect()

void CSVGRenderer::EndClippingRect ( )
virtual

Reimplemented from CRenderCommon.

Definition at line 190 of file svg_renderer.cpp.

References CSVGRenderer::m_ClippingId, and CSVGRenderer::m_ClippingStack.

◆ EndText() [1/2]

void CGlRenderPdf::EndText ( )
virtual

Pops matrices and attributes after writing text.

Reimplemented from CRenderCommon.

Definition at line 155 of file glrenderpdf.cpp.

References CPdf::EndContent(), CPdf::GetCurrentContent(), LOG_POST, CRenderCommon::m_CurrentFont, CGlRenderPdf::m_Pdf, NULL, and CPdfObject::PopGraphicsState().

◆ EndText() [2/2]

void CSVGRenderer::EndText ( )
virtual

Pops matrices and attributes after writing text.

Reimplemented from CRenderCommon.

Definition at line 117 of file svg_renderer.cpp.

References _ASSERT, CGlTextureFont::EndText(), LOG_POST, CRenderCommon::m_CurrentFont, and NULL.

◆ Finalize()

void CSVGRenderer::Finalize ( void  )
virtual

◆ GetApi() [1/2]

virtual ERenderTarget CGlRenderPdf::GetApi ( )
inlinevirtual

Overridden in subclasses to return the supported rendering target.

Reimplemented from CRenderCommon.

Definition at line 89 of file glrenderpdf.hpp.

References eRenderPDF.

◆ GetApi() [2/2]

virtual ERenderTarget CSVGRenderer::GetApi ( )
inlinevirtual

Overridden in subclasses to return the supported rendering target.

Reimplemented from CRenderCommon.

Definition at line 61 of file svg_renderer.hpp.

References eRenderSVG.

◆ GetPdf()

CRef<CPdf> CGlRenderPdf::GetPdf ( )
inline

Definition at line 81 of file glrenderpdf.hpp.

References CGlRenderPdf::m_Pdf.

◆ GetScreenSize()

void CGlRenderPdf::GetScreenSize ( int width,
int height 
) const

PDF only - get size of pdf 'window' (pagesize)

Definition at line 245 of file glrenderpdf.cpp.

References CMedia::GetHeight(), CPrintOptions::GetMedia(), CVectorPrinter::GetOptions(), CMedia::GetWidth(), int, and CGlRenderPdf::m_Pdf.

◆ Hint() [1/2]

virtual void CGlRenderPdf::Hint ( GLenum  ,
GLenum   
)
inlinevirtual

Implements IRender.

Definition at line 91 of file glrenderpdf.hpp.

◆ Hint() [2/2]

virtual void CSVGRenderer::Hint ( GLenum  ,
GLenum   
)
inlinevirtual

Implements IRender.

Definition at line 63 of file svg_renderer.hpp.

◆ Initialize()

void CSVGRenderer::Initialize ( const TVPRect viewport)
virtual

◆ IsPrinterFriendly() [1/2]

virtual bool CGlRenderPdf::IsPrinterFriendly ( ) const
inlinevirtual

Reimplemented from CRenderCommon.

Definition at line 85 of file glrenderpdf.hpp.

◆ IsPrinterFriendly() [2/2]

virtual bool CSVGRenderer::IsPrinterFriendly ( ) const
inlinevirtual

Reimplemented from CRenderCommon.

Definition at line 57 of file svg_renderer.hpp.

◆ IsSimplified() [1/2]

bool CGlRenderPdf::IsSimplified ( ) const
virtual

◆ IsSimplified() [2/2]

virtual bool CSVGRenderer::IsSimplified ( ) const
inlinevirtual

Reimplemented from CRenderCommon.

Definition at line 54 of file svg_renderer.hpp.

References CSVGRenderer::m_Simplified.

◆ Ortho()

void CSVGRenderer::Ortho ( GLdouble  left,
GLdouble  right,
GLdouble  bottom,
GLdouble  top,
GLdouble  nearVal,
GLdouble  farVal 
)
virtual

Reimplemented from CRenderVector.

Definition at line 84 of file svg_renderer.cpp.

References CRenderVector::Ortho().

◆ Render()

void CGlRenderPdf::Render ( CGlPane pane,
CGlModel2D model 
)
virtual

Specialized for models - which are just collections of buffers.

Reimplemented from CRenderCommon.

Definition at line 63 of file glrenderpdf.cpp.

References CGlRenderPdf::m_Pdf, NULL, and CGlModel2D::RenderPDF().

Referenced by IPhyloTreeRender::RenderPdf().

◆ SetIsGreyscale() [1/2]

void CGlRenderPdf::SetIsGreyscale ( bool  b)
virtual

Reimplemented from CRenderCommon.

Definition at line 55 of file glrenderpdf.cpp.

References b, CGlRenderPdf::m_Pdf, and CPdf::SetIsGreyscale().

◆ SetIsGreyscale() [2/2]

virtual void CSVGRenderer::SetIsGreyscale ( bool  b)
inlinevirtual

Reimplemented from CRenderCommon.

Definition at line 59 of file svg_renderer.hpp.

References b, and CSVGRenderer::m_IsGreyscale.

◆ SetPdf()

void CGlRenderPdf::SetPdf ( CRef< CPdf > &  pdf)
inline

m_Pdf does the actually writing to the file

Definition at line 80 of file glrenderpdf.hpp.

References CGlRenderPdf::m_Pdf.

Referenced by IPhyloTreeRender::RenderPdf(), and CPdfGrabber::x_InitRenderer().

◆ SetSimplified()

void CSVGRenderer::SetSimplified ( bool  simplified = true)
inline

Definition at line 55 of file svg_renderer.hpp.

References CSVGRenderer::m_Simplified.

Referenced by CSVGGrabber::GrabImages().

◆ Vertex3f()

void CGlRenderPdf::Vertex3f ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)
virtual

◆ Viewport() [1/2]

void CGlRenderPdf::Viewport ( GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height 
)
virtual

Reimplemented from CRenderCommon.

Definition at line 240 of file glrenderpdf.cpp.

References CRenderCommon::Viewport().

◆ Viewport() [2/2]

void CSVGRenderer::Viewport ( GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height 
)
virtual

Reimplemented from CRenderCommon.

Definition at line 78 of file svg_renderer.cpp.

References CRenderCommon::Viewport().

◆ Write()

void CSVGRenderer::Write ( CNcbiOstream ostrm)

Definition at line 177 of file svg_renderer.cpp.

References CSVGRenderer::m_SVG.

Referenced by CSVGGrabber::GrabImages().

◆ WriteText() [1/4]

void CGlRenderPdf::WriteText ( TModelUnit  x,
TModelUnit  y,
const char *  text,
TModelUnit  rotate_degrees = 0.0 
)
virtual

◆ WriteText() [2/4]

void CSVGRenderer::WriteText ( TModelUnit  x,
TModelUnit  y,
const char *  text,
TModelUnit  rotate_degrees = 0.0 
)
virtual

◆ WriteText() [3/4]

void CGlRenderPdf::WriteText ( TModelUnit  x,
TModelUnit  y,
TModelUnit  width,
TModelUnit  height,
const char *  text,
CGlTextureFont::TAlign  align = CGlTextureFont::eAlign_Center,
CGlTextureFont::ETruncate  trunc = CGlTextureFont::eTruncate_Ellipsis,
TModelUnit  rotate_degrees = 0.0f 
)
virtual

◆ WriteText() [4/4]

void CSVGRenderer::WriteText ( TModelUnit  x,
TModelUnit  y,
TModelUnit  width,
TModelUnit  height,
const char *  text,
CGlTextureFont::TAlign  align = CGlTextureFont::eAlign_Center,
CGlTextureFont::ETruncate  trunc = CGlTextureFont::eTruncate_Ellipsis,
TModelUnit  rotate_degrees = 0.0f 
)
virtual

◆ x_ClippingRect()

string CSVGRenderer::x_ClippingRect ( GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height 
)
protected

◆ x_GetGradientColors()

void CSVGRenderer::x_GetGradientColors ( vector< CVect2< float >> const vertices,
vector< CRgbaColor > const colors,
vector< CRgbaColor > &  gradient 
)
protected

Definition at line 659 of file svg_renderer.cpp.

References a, b, color, colors, CRgbaColor::Interpolate(), l(), r(), and ct::sort().

Referenced by CSVGRenderer::x_PrintTriBuffer().

◆ x_GetLineStyle()

void CSVGRenderer::x_GetLineStyle ( CGlVboNode node,
GLushort &  pattern,
GLint &  factor,
double &  width,
svg::Stroke::ELineCapStyle &  lcap,
svg::Stroke::ELineJoinStyle &  ljoin 
)
inlineprotected

◆ x_LinearGradient()

string CSVGRenderer::x_LinearGradient ( std::vector< CRgbaColor > const colors)
protected

◆ x_PolygonStippleToPattern()

string CSVGRenderer::x_PolygonStippleToPattern ( const GLubyte *  stipple,
const CRgbaColor fill_rgba_color 
)
protected

◆ x_PrintLineBuffer()

void CSVGRenderer::x_PrintLineBuffer ( CGlVboNode node)
protected

◆ x_PrintPointBuffer()

void CSVGRenderer::x_PrintPointBuffer ( CGlVboNode node)
protected

◆ x_PrintQuadBuffer()

void CSVGRenderer::x_PrintQuadBuffer ( CGlVboNode node)
protected

◆ x_PrintTriBuffer()

void CSVGRenderer::x_PrintTriBuffer ( CGlVboNode node)
protected

◆ x_ProjectVertex()

void CSVGRenderer::x_ProjectVertex ( CVect2< float > &  vertex)
inlineprotected

◆ x_ProjectVertices()

void CSVGRenderer::x_ProjectVertices ( vector< CVect2< float >> &  vertices)
inlineprotected

◆ x_RenderBuffer() [1/2]

void CGlRenderPdf::x_RenderBuffer ( CGlVboNode node)
protectedvirtual

Send the current buffer to the pdf library for rendering.

Reimplemented from CRenderCommon.

Definition at line 113 of file glrenderpdf.cpp.

References CGlRenderPdf::m_Pdf, CRenderCommon::m_Viewport, and CPdf::PrintBuffer().

◆ x_RenderBuffer() [2/2]

void CSVGRenderer::x_RenderBuffer ( CGlVboNode node)
protectedvirtual

◆ ~CGlRenderPdf()

virtual CGlRenderPdf::~CGlRenderPdf ( )
inlinevirtual

Definition at line 77 of file glrenderpdf.hpp.

Variable Documentation

◆ m_ClippingId

std::string CSVGRenderer::m_ClippingId
private

◆ m_ClippingRects

map<string, string> CSVGRenderer::m_ClippingRects
private

Definition at line 121 of file svg_renderer.hpp.

Referenced by CSVGRenderer::Finalize(), and CSVGRenderer::x_ClippingRect().

◆ m_ClippingStack

std::stack<std::string> CSVGRenderer::m_ClippingStack
private

◆ m_Height

int CSVGRenderer::m_Height
private

◆ m_IsGreyscale

bool CSVGRenderer::m_IsGreyscale = false
private

◆ m_LinearGradients

map<string, string> CSVGRenderer::m_LinearGradients
private

Definition at line 120 of file svg_renderer.hpp.

Referenced by CSVGRenderer::Finalize(), and CSVGRenderer::x_LinearGradient().

◆ m_Pdf

CRef<CPdf> CGlRenderPdf::m_Pdf
protected

◆ m_PolygonStipplePatterns

map<string, string> CSVGRenderer::m_PolygonStipplePatterns
private

◆ m_Simplified

bool CSVGRenderer::m_Simplified = false
private

Definition at line 116 of file svg_renderer.hpp.

Referenced by CSVGRenderer::IsSimplified(), and CSVGRenderer::SetSimplified().

◆ m_SVG

unique_ptr<svg::SVG> CSVGRenderer::m_SVG
private
Modified on Fri Sep 20 14:57:36 2024 by modify_doxy.py rev. 669887