VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMilStdSVGRenderer.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 // This C++ implementation was translated from the original Javascript code by
7 // Mans Beckman - www.spatialillusions.com. The original Javascript code is
8 // licensed under the MIT License found below.
9 /******************************************************************************
10 ** The MIT License (MIT)
11 **
12 ** Copyright (c) 2017 Mans Beckman - www.spatialillusions.com
13 **
14 ** Permission is hereby granted, free of charge, to any person obtaining a copy
15 ** of this software and associated documentation files (the "Software"), to deal
16 ** in the Software without restriction, including without limitation the rights
17 ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18 ** copies of the Software, and to permit persons to whom the Software is
19 ** furnished to do so, subject to the following conditions:
20 **
21 ** The above copyright notice and this permission notice shall be included in all
22 ** copies or substantial portions of the Software.
23 **
24 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 ** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29 ** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 ** SOFTWARE.
31 ******************************************************************************/
32 
33 #pragma once
34 
37 
38 #include <vrvMilStd/vrvMilStd.h>
41 #include <string>
42 #include <sstream>
43 
44 namespace makVrv
45 {
46 
54  {
55  public:
57  DtMilStdSVGRenderer( const DtMilStdJsonRegistry& registry );
58 
60  virtual ~DtMilStdSVGRenderer() = default;
61 
64  DtMilStdSVGRenderer() = delete;
65  DtMilStdSVGRenderer( const DtMilStdSVGRenderer& ) = delete;
66  DtMilStdSVGRenderer( const DtMilStdSVGRenderer&& ) = delete;
67  DtMilStdSVGRenderer& operator=( const DtMilStdSVGRenderer& ) = delete;
68  DtMilStdSVGRenderer& operator=( const DtMilStdSVGRenderer&& ) = delete;
70 
75  virtual bool render( const DtMilStdSymbol& symbol, std::string& outputSvgString );
76 
78  virtual std::vector<DtDrawPath> drawPaths( const DtMilStdSymbol& symbol );
79 
95  virtual bool renderStatusOverlay( const DtMilStdSymbol& symbol, std::string& outputSvgString );
96 
97  protected:
99  virtual std::vector<DtDrawPath> framePaths( const DtMilStdSymbol& symbol ) const;
101  virtual std::vector<DtDrawPath> statusPaths( const DtMilStdSymbol& symbol ) const;
103  virtual std::vector<DtDrawPath> contextPaths( const DtMilStdSymbol& symbol ) const;
105  virtual std::vector<DtDrawPath> hqtfPaths( const DtMilStdSymbol& symbol ) const;
107  virtual std::vector<DtDrawPath> echelonPaths( const DtMilStdSymbol& symbol ) const;
109  virtual std::vector<DtDrawPath> iconPaths( const DtMilStdSymbol& symbol ) const;
111  virtual std::vector<DtDrawPath> modifier1Paths( const DtMilStdSymbol& symbol ) const;
113  virtual std::vector<DtDrawPath> modifier2Paths( const DtMilStdSymbol& symbol ) const;
114 
115  std::string renderFrame( const DtMilStdSymbol& symbol );
116  std::string renderStatus( const DtMilStdSymbol& symbol );
117  std::string renderContext( const DtMilStdSymbol& symbol );
118  std::string renderHqtf( const DtMilStdSymbol& symbol );
119  std::string renderEchelon( const DtMilStdSymbol& symbol );
120  std::string renderIcon( const DtMilStdSymbol& symbol );
121  std::string renderTextFields( const DtMilStdSymbol& symbol );
122  std::string renderModifiers( const DtMilStdSymbol& symbol );
123  static std::string pathToSVG( const DtDrawPath& path );
124 
126  };
127 
128 } // namespace makVrv
const DtMilStdJsonRegistry & myRegistry
Source of frame and icon geometry.
Definition: DtMilStdSVGRenderer.h:125
Definition: DtMilStdTypes.h:231
Per-DtDe JSON registry of MIL-STD frame and icon geometry.
#define DT_DLL_VRVMILSTD
Definition: vrvMilStd.h:20
SVG renderer for MIL-STD-2525D / APP-6D military symbols.
Definition: DtMilStdSVGRenderer.h:53
Complete MIL-STD geometry registry loaded from JSON files.
Definition: DtMilStdJsonRegistry.h:87
Military symbol parsed from a SIDC string.
Definition: DtMilStdSymbol.h:51
Contains DLL export macros.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)