glbarcode++
 
Loading...
Searching...
No Matches
RendererSvg.hpp
Go to the documentation of this file.
1// RendererSvg.hpp
2//
3// Copyright (C) 2013-2026 Jaye Evins <evins@snaught.com>
4//
5// This file is part of glbarcode++.
6//
7// glbarcode++ is free software: you can redistribute it and/or modify
8// it under the terms of the GNU Lesser General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// glbarcode++ is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU Lesser General Public License for more details.
16//
17// You should have received a copy of the GNU Lesser General Public License
18// along with glbarcode++. If not, see <http://www.gnu.org/licenses/>.
19//
20
21#ifndef glbarcode_RendererSvg_hpp
22#define glbarcode_RendererSvg_hpp
23
24
25#include "Renderer.hpp"
26
27
28namespace glbarcode
29{
30
38 class RendererSvg : public Renderer
39 {
40 public:
45
46
50 RendererSvg( const std::string& filename );
51
52
56 RendererSvg( const RendererSvg& from );
57
58
62 virtual ~RendererSvg();
63
64
72
73
78 std::string filename( void ) const;
79
80
87 RendererSvg& setFilename( const std::string& filename );
88
89
90 private:
91 /*
92 * Virtual methods implemented by SVG renderer.
93 */
94 void drawBegin( double w, double h ) override;;
95 void drawEnd( void ) override;;
96 void drawLine( double x, double y, double w, double h ) override;;
97 void drawBox( double x, double y, double w, double h ) override;;
98 void drawText( double x, double y, double size, const std::string& text, HAlign halign = H_ALIGN_CENTER ) override;;
99 void drawRing( double x, double y, double r, double w ) override;;
100 void drawHexagon( double x, double y, double h ) override;;
101
102
103 private:
107 struct PrivateData;
108 PrivateData *d;
109 };
110
111}
112
113#endif // glbarcode_RendererSvg_hpp
Definition RendererSvg.hpp:39
RendererSvg(const RendererSvg &from)
RendererSvg & setFilename(const std::string &filename)
RendererSvg(const std::string &filename)
RendererSvg & operator=(const RendererSvg &from)
std::string filename(void) const
Definition Renderer.hpp:48
Definition Barcode.hpp:38
HAlign
Definition Enums.hpp:29
@ H_ALIGN_CENTER
Definition Enums.hpp:30