Static Public Member Functions | Static Public Attributes | List of all members
RackSVG Class Reference

SVG panel utils. More...

#include <graphics.h>

Static Public Member Functions

static drain::image::TreeSVG & getStyle (RackContext &ctx)
 Some SVG style classes. Identifiers for IMAGE and RECT elements over which TEXT elements will be aligned. More...
 
static const std::string & guessFormat (const std::string &key)
 returns timeformat
 
static drain::image::TreeSVG & getMainGroup (RackContext &ctx)
 Top-level GROUP used by Rack. All the graphic elements will be created inside this element.
 
static drain::image::TreeSVG & getCurrentAlignedGroup (RackContext &ctx)
 Return current row or column of image panels.
 
static drain::image::TreeSVG & getImagePanelGroup (RackContext &ctx, const drain::FilePath &filepath)
 For each image an own group is created (for clarity, to contain also title TEXT's etc)
 
static void applyAlignment (RackContext &ctx, drain::image::TreeSVG &group)
 
static bool applyInclusion (RackContext &cxt, const drain::FilePath &filepath)
 
static void addImage (RackContext &ctx, const drain::image::Image &src, const drain::FilePath &filepath)
 Add pixel image (PNG)
 
static void addImage (RackContext &ctx, const drain::image::TreeSVG &svg, const drain::FilePath &filepath)
 Currently, uses file link (does not embed) More...
 
static void addImage (RackContext &ctx, const drain::Frame2D< drain::image::svg::coord_t > &frame, const drain::FilePath &filepath, const std::string &styleClass="")
 Add external image from a file path. More...
 
static void addTitleBox (const PanelConfSVG &conf, drain::image::TreeSVG &object, PanelConfSVG::ElemClass elemClass)
 Add TEXT elements: MAINTITLE, LOCATION, TIME, GENERAL.
 
static void addTitles (const PanelConfSVG &conf, drain::image::TreeSVG &object, const std::string &anchor, PanelConfSVG::ElemClass elemClass)
 
static drain::image::TreeSVG & addRectangleGroup (RackContext &ctx, const drain::Frame2D< double > &frame={200, 200})
 Add rectangle.
 
static drain::image::TreeSVG & addImageBorder (drain::image::TreeSVG &imagePanel)
 Add. More...
 
static void completeSVG (RackContext &ctx)
 Traverse groups, collecting info, recognizing common (shared) variables and pruning them recursively.
 

Static Public Attributes

static const std::string BACKGROUND_RECT = "bgRect"
 Group identifiers for elements which be automatically aligned (stacked horizontally or vertically)
 

Detailed Description

SVG panel utils.

Member Function Documentation

◆ addImage() [1/2]

void addImage ( RackContext ctx,
const drain::Frame2D< drain::image::svg::coord_t > &  frame,
const drain::FilePath filepath,
const std::string &  styleClass = "" 
)
static

Add external image from a file path.

Add pixel image (PNG)

Parameters
styleClass- optional style class, possibly FLOAT

◆ addImage() [2/2]

void addImage ( RackContext ctx,
const drain::image::TreeSVG &  svg,
const drain::FilePath filepath 
)
static

Currently, uses file link (does not embed)

Add SVG image.

◆ addImageBorder()

drain::image::TreeSVG & addImageBorder ( drain::image::TreeSVG &  imagePanel)
static

Add.

Parameters
imagePanel

◆ addTitles()

void addTitles ( const PanelConfSVG conf,
drain::image::TreeSVG &  object,
const std::string &  anchor,
PanelConfSVG::ElemClass  elemClass 
)
static

TODO const double fontSize = // getStyleValue(root, RackSVG::TITLE, "font-size", 12.5); root[drain::image::svg::STYLE][elemClass]->get("font-size", 12.5);

◆ getStyle()

drain::image::TreeSVG & getStyle ( RackContext ctx)
static

Some SVG style classes. Identifiers for IMAGE and RECT elements over which TEXT elements will be aligned.

Some SVG style classes. Identifiers for IMAGE and RECT elements over which TEXT elements will be aligned Initialize styles, if undone.


The documentation for this class was generated from the following files: