1 #ifndef GUI_UTILS__SVG_RENDERER_HPP
2 #define GUI_UTILS__SVG_RENDERER_HPP
55 void SetSimplified(
bool simplified =
true) { m_Simplified = simplified; };
63 virtual void Hint(GLenum, GLenum) {}
65 virtual void Initialize(
const TVPRect& viewport);
66 virtual void Finalize();
68 virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
70 virtual void Ortho(GLdouble left, GLdouble right,
71 GLdouble bottom, GLdouble top,
72 GLdouble nearVal, GLdouble farVal);
109 string x_PolygonStippleToPattern(
const GLubyte* stipple,
const CRgbaColor& fill_rgba_color);
110 string x_LinearGradient(std::vector<CRgbaColor>
const&
colors);
111 string x_ClippingRect(GLint x, GLint y, GLsizei width, GLsizei height);
112 void x_GetGradientColors(vector<
CVect2<float>>
const& vertices, vector<CRgbaColor>
const &
colors, vector<CRgbaColor>& gradient);
113 void x_GetLineStyle(
CGlVboNode &node, GLushort &pattern, GLint &factor,
double &width, svg::Stroke::ELineCapStyle &lcap, svg::Stroke::ELineJoinStyle &ljoin);
116 bool m_Simplified =
false;
117 bool m_IsGreyscale =
false;
CGlVboNode A rendering node that holds a vertex buffer object.
virtual void EndClippingRect()
virtual void BeginText(const CGlTextureFont *font, const CRgbaColor &color)
Text is drawn is pixel coordinates.
virtual void WriteText(TModelUnit x, TModelUnit y, const char *text, TModelUnit rotate_degrees=0.0)
Write text at specified model coords.
virtual void BeginClippingRect(GLint x, GLint y, GLsizei width, GLsizei height)
virtual void EndText()
Pops matrices and attributes after writing text.
virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
virtual void x_RenderBuffer(CGlVboNode *node)
virtual void Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal)
class CRgbaColor provides a simple abstraction for managing colors.
static const Colors colors
ERenderTarget
Different api levels based on information from OpenGL driver.
map< string, string > m_LinearGradients
virtual ERenderTarget GetApi()
Overridden in subclasses to return the supported rendering target.
virtual void SetIsGreyscale(bool b)
void SetSimplified(bool simplified=true)
std::stack< std::string > m_ClippingStack
virtual void Hint(GLenum, GLenum)
map< string, string > m_ClippingRects
map< string, string > m_PolygonStipplePatterns
virtual bool IsPrinterFriendly() const
virtual bool IsSimplified() const
unique_ptr< svg::SVG > m_SVG
void Write(CObjectOStream &out, TConstObjectPtr object, const CTypeRef &type)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_GUIPRINT_EXPORT
static void text(MDB_val *v)
Standard mechanism to include OpenGL headers for all platforms.