Dune Core Modules (2.9.0)
Default options class to write SVG matrices. More...
#include <dune/istl/io.hh>
Public Member Functions | |
template<class RowPrefix , class ColPrefix > | |
std::string | blockStyleClass (const RowPrefix &row_prefix, const ColPrefix &col_prefix) const |
Helper function that returns an style class for a given prefix. More... | |
template<class Stream , class RowPrefix , class ColPrefix , class Block > | |
void | writeBlockTitle (Stream &out, const RowPrefix &row_prefix, const ColPrefix &col_prefix, const Block &block) const |
Helper function writes a title for a given block and prefix. More... | |
template<class Stream , class RowPrefix , class ColPrefix , class Block > | |
void | writeSVGBlock (Stream &out, const RowPrefix &row_prefix, const ColPrefix &col_prefix, const Block block, const std::array< std::size_t, 4 > &svg_box) const |
Write an SVG object for a given block/value in the matrix. More... | |
Public Attributes | |
std::size_t | block_size = 10 |
size (pixels) of the deepst block/value of the matrix | |
std::size_t | interspace = 5 |
size (pixels) of the interspace between blocks | |
std::size_t | width = 500 |
Final width size (pixels) of the SVG header. If 0, size is automatic. | |
std::size_t | height = 0 |
Final height size (pixels) of the SVG header. If 0, size is automatic. | |
bool | write_header = true |
Whether to write the SVG header. | |
std::string | style |
CSS style block to write in header. | |
std::function< std::string(const double &)> | color_fill |
Color fill for default options. More... | |
bool | write_block_title = true |
(Helper) Whether to write a title on the rectangle value | |
Detailed Description
Default options class to write SVG matrices.
This object is intended customize the output of the SVG writer for matrices writeSVGMatrix.
Member Function Documentation
◆ blockStyleClass()
|
inline |
Helper function that returns an style class for a given prefix.
- Note
- This function is only a helper to the default writeSVGBlock and is not required for custom options classes.
Referenced by writeSVGBlock().
◆ writeBlockTitle()
|
inline |
Helper function writes a title for a given block and prefix.
- Note
- This function is only a helper to the default writeSVGBlock and is not required for custom options classes.
Referenced by writeSVGBlock().
◆ writeSVGBlock()
|
inline |
Write an SVG object for a given block/value in the matrix.
This function is called for every matrix block; that includes root and intermediate nested blocks of matrices. SVG blocks are written from outer to inner matrix blocks, this means that in case of overlaps in the SVG objects, the more nested blocks take precedence.
- Warning
- If the SVG bounding box is not respected, the content may be ommited in the final SVG view.
- Note
- This function signature is required for any custom options class.
- Template Parameters
-
Stream An ostream type (possibly a NullStream!) RowPrefix A ReservedVector ColPrefix A ReservedVector Block The type of the current block
- Parameters
-
out An stream to send SVG object to row_prefix A multindex of indices to access current row col_prefix A multindex of indices to access current column block The current matrix/sub-block/value svg_box SVG object bounding box (position and sizes).
References blockStyleClass(), color_fill, height, width, and writeBlockTitle().
Member Data Documentation
◆ color_fill
std::function<std::string(const double&)> Dune::DefaultSVGMatrixOptions::color_fill |
Color fill for default options.
Example:
Referenced by writeSVGBlock().
The documentation for this struct was generated from the following file:
- dune/istl/io.hh