NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CSVGRenderer Class Reference

Search Toolkit Book for CSVGRenderer

#include <gui/print/svg_renderer.hpp>

+ Inheritance diagram for CSVGRenderer:
+ Collaboration diagram for CSVGRenderer:

Public Member Functions

virtual bool IsSimplified () const
 
void SetSimplified (bool simplified=true)
 
virtual bool IsPrinterFriendly () const
 
virtual void SetIsGreyscale (bool b)
 
virtual ERenderTarget GetApi ()
 Overridden in subclasses to return the supported rendering target. More...
 
virtual void Hint (GLenum, GLenum)
 
virtual void Initialize (const TVPRect &viewport)
 
virtual void Finalize ()
 
virtual void Viewport (GLint x, GLint y, GLsizei width, GLsizei height)
 
virtual void Ortho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal)
 
virtual void BeginText (const CGlTextureFont *font, const CRgbaColor &color)
 Set OpenGL state needed for writing text (call before DrawText) More...
 
virtual void BeginText (const CGlTextureFont *font)
 Same as above, but get color from m_RenderNode.m_State. More...
 
virtual void EndText ()
 Pops matrices and attributes after writing text. More...
 
virtual void WriteText (TModelUnit x, TModelUnit y, const char *text, TModelUnit rotate_degrees=0.0)
 Write text at specified model coords. More...
 
virtual void 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 Write (CNcbiOstream &ostrm)
 
virtual void BeginClippingRect (GLint x, GLint y, GLsizei width, GLsizei height)
 
virtual void EndClippingRect ()
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 
- Public Member Functions inherited from CRenderVector
 CRenderVector ()
 
virtual void PushAttrib (GLbitfield mask)
 
virtual void PopAttrib ()
 
virtual void Enable (GLenum glstate)
 
virtual void Disable (GLenum glstate)
 glDisable() More...
 
virtual void LineWidth (GLfloat w)
 Set line width for drawing: glLineWidth() More...
 
virtual void PointSize (GLfloat s)
 Set point size for drawing: glPointSize() More...
 
virtual void ShadeModel (GLenum mode)
 Set shade model for default lighting: glShadeModel(GL_FLAT or GL_SMOOTH) More...
 
virtual void Scissor (GLint x, GLint y, GLsizei width, GLsizei height)
 Set clipping window: glScissor(x,y,width,height) More...
 
virtual void ColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
 Color{3,4}{f,d}{v} commands are defined above.... More...
 
virtual void PolygonMode (GLenum face, GLenum mode)
 Set the polygon rasterization mode. More...
 
virtual void LineStipple (GLint factor, GLushort pattern)
 Set line stipple pattern: glLineStipple(). Deprecated in gl 3.2+. More...
 
virtual void PolygonStipple (GLubyte *mask)
 Set polygon stipple pattern: glPolygonStipple(). Deprecated in gl 3.2+. More...
 
virtual void BlendFunc (GLenum sfactor, GLenum dfactor)
 Options to be used when GL_BLEND is enabled. More...
 
virtual void TexEnvi (GLenum target, GLenum pname, GLint param)
 
virtual void BlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
 
virtual void LineJoinStyle (IGlState::ELineJoinStyle s)
 PDF-specific rendering state. More...
 
virtual void LineCapStyle (IGlState::ELineCapStyle c)
 Set line cap ending style (pdf only) More...
 
virtual void PdfShadeStyle (IGlState::EPdfShadeStyle s)
 Set (override defualt) shading style for polygons. More...
 
virtual void UseProgram (GLuint)
 For shaders. Only works with OpenGL 2.0+. More...
 
virtual void MatrixMode (GLenum mode)
 
virtual void PushMatrix ()
 
virtual void PopMatrix ()
 
virtual void LoadIdentity ()
 
virtual void LoadMatrixf (const GLfloat *m)
 
virtual void LoadMatrixd (const GLdouble *m)
 
virtual CMatrix4< float > GetModelViewMatrix () const
 
virtual CMatrix4< float > GetProjectionMatrix () const
 
virtual void GetModelViewMatrix (GLdouble *m) const
 
virtual void GetProjectionMatrix (GLdouble *m) const
 
virtual void Rotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
 
virtual void Rotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 
virtual void Scaled (GLdouble x, GLdouble y, GLdouble z)
 
virtual void Scalef (GLfloat x, GLfloat y, GLfloat z)
 
virtual void Translated (GLdouble x, GLdouble y, GLdouble z)
 
virtual void Translatef (GLfloat x, GLfloat y, GLfloat z)
 
virtual TModelUnit GetMetric (const CGlTextureFont *font, IGlFont::EMetric metric, const char *text=NULL, int len=-1) const
 Get font metrics - metrics differ when the font under opengl has been replaced by a bitmap font for (screen) readability. More...
 
virtual TModelUnit TextWidth (const CGlTextureFont *font, const char *text) const
 
virtual TModelUnit TextHeight (const CGlTextureFont *font) const
 
virtual TModelUnit GetFontDescender (const CGlTextureFont *font) const
 
virtual TModelUnit GetAdvance (const CGlTextureFont *font, char c) const
 
virtual TModelUnit GetMaxWidth (const CGlTextureFont *font, int max_num) const
 
- Public Member Functions inherited from CRenderCommon
 CRenderCommon ()
 
virtual ~CRenderCommon ()
 
virtual void Clear ()
 Clear/delete any graphics/OpenGL memory. More...
 
virtual void Begin (GLenum mode)
 Start rendering. More...
 
virtual void End ()
 Finish rendering (create buffer and send to renderer) More...
 
virtual CRef< CGlStateGetState ()
 Allow caller to access state directly. More...
 
virtual void ResetState ()
 
virtual void Render (CGlPane &pane, CGlModel2D *model)
 
virtual void Vertex3f (GLfloat x, GLfloat y, GLfloat z)
 Explicit support not currently available for: GLbyte, GlShort and GLint calls, e.g. More...
 
virtual void Rectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
 Rect() functions also do Begin() and End() (as in OpenGL) More...
 
virtual void ColorC (const CRgbaColor &color)
 Colors (also defined in IGlState since they can be set either before or inside of Begin()/End(). More...
 
virtual void TexCoord2f (GLfloat s, GLfloat t)
 Texture coords. More...
 
void SetTextColor (const CRgbaColor &color)
 Update text color and alpha. More...
 
CRgbaColor GetTextColor () const
 
virtual void GetViewport (GLint *params)
 
- Public Member Functions inherited from IRender
virtual ~IRender ()
 
void Color3f (GLfloat r, GLfloat g, GLfloat b)
 
void Color3fv (const GLfloat *v)
 
void Color4f (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 
void Color4fv (const GLfloat *v)
 
void Color3d (GLdouble r, GLdouble g, GLdouble b)
 
void Color3dv (const GLdouble *v)
 
void Color4d (GLdouble r, GLdouble g, GLdouble b, GLdouble a)
 
void Color4dv (const GLdouble *v)
 
void Vertex2f (GLfloat x, GLfloat y)
 
void Vertex2fv (const GLfloat *v)
 
void Vertex3fv (const GLfloat *v)
 
void Vertex2d (GLdouble x, GLdouble y)
 
void Vertex2dv (const GLdouble *v)
 
void Vertex3d (GLdouble x, GLdouble y, GLdouble z)
 
void Vertex3dv (const GLdouble *v)
 
void Rectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
 
void RectC (const TVPRect &rc)
 
void RectC (const TModelRect &rc)
 
void TexCoord2fv (const GLfloat *v)
 
void TexCoord2d (GLdouble s, GLdouble t)
 
void TexCoord2dv (const GLdouble *v)
 

Protected Member Functions

virtual void x_RenderBuffer (CGlVboNode *node)
 
void x_PrintLineBuffer (CGlVboNode &node)
 
void x_PrintPointBuffer (CGlVboNode &node)
 
void x_PrintTriBuffer (CGlVboNode &node)
 
void x_PrintQuadBuffer (CGlVboNode &node)
 
void x_ProjectVertex (CVect2< float > &vertex)
 
void x_ProjectVertices (vector< CVect2< float >> &vertices)
 
string x_PolygonStippleToPattern (const GLubyte *stipple, const CRgbaColor &fill_rgba_color)
 
string x_LinearGradient (std::vector< CRgbaColor > const &colors)
 
string x_ClippingRect (GLint x, GLint y, GLsizei width, GLsizei height)
 
void x_GetGradientColors (vector< CVect2< float >> const &vertices, vector< CRgbaColor > const &colors, vector< CRgbaColor > &gradient)
 
void x_GetLineStyle (CGlVboNode &node, GLushort &pattern, GLint &factor, double &width, svg::Stroke::ELineCapStyle &lcap, svg::Stroke::ELineJoinStyle &ljoin)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 
- Protected Member Functions inherited from CRenderCommon
void x_SyncAttribs (vector< CRgbaColor > &colors)
 
void x_SyncAttribs (vector< CVect3< float > > &vecs)
 
void x_SyncAttribs (vector< CVect2< float > > &vecs)
 

Private Attributes

bool m_Simplified = false
 
bool m_IsGreyscale = false
 
int m_Height
 
map< string, stringm_PolygonStipplePatterns
 
map< string, stringm_LinearGradients
 
map< string, stringm_ClippingRects
 
unique_ptr< svg::SVG > m_SVG
 
std::string m_ClippingId
 
std::stack< std::stringm_ClippingStack
 

Additional Inherited Members

- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Protected Attributes inherited from CRenderCommon
vector< CVect3< float > > m_VertexBuffer
 
vector< CRgbaColorm_ColorBuffer
 
vector< CVect2< float > > m_TexCoord2DBuffer1
 
CGlVboNode m_RenderNode
 vertex buffer node for rendering all Begin()/End() renders More...
 
CRef< CGlStatem_State
 state used by all nodes More...
 
GLenum m_MatrixMode
 current modelview matrix and matrix mode More...
 
GLint m_Viewport [4]
 current projection set by Viewport() More...
 
GLenum m_CurrentMode
 rendering mode from Begin() More...
 
const CGlTextureFontm_CurrentFont
 text parameters More...
 
CRgbaColor m_TextColor
 color and alpha for text only (other GL options do not apply to text) More...
 

Detailed Description

Definition at line 51 of file svg_renderer.hpp.


The documentation for this class was generated from the following files:
Modified on Wed Sep 04 15:03:02 2024 by modify_doxy.py rev. 669887