38#ifndef DRAIN_IMAGE_SVG
39#define DRAIN_IMAGE_SVG
45#include "TreeUtilsSVG.h"
127 return getImage(filepath, src.getGeometry().getAreaGeometry());
132 drain::image::TreeSVG & getMetadata()
const {
133 return getUniqueElem(imagePanelGroup, svg::METADATA);
136 drain::image::TreeSVG& getOverlayGroup()
const;
139 drain::image::TreeSVG& getBackGround()
const {
140 drain::image::TreeSVG & overlay = getOverlayGroup();
141 return getUniqueElem(overlay,
BACKGROUND, svg::RECT);
147 drain::image::TreeSVG & getImageBorder()
const {
148 drain::image::TreeSVG & imageBorder = getUniqueElem(imagePanelGroup,
IMAGE_BORDER, svg::RECT);
149 imageBorder->addClass(FloaterSVG::FLOATING);
163 drain::image::TreeSVG & getMouseListenerElem()
const;
170 return imagePanelGroup[svg::IMAGE][svg::DESC](svg::DESC);
179 drain::image::TreeSVG & select = getOverlayGroup()[SELECTOR];
180 select->addClass(SELECTOR);
187 drain::image::TreeSVG & imagePanelGroup;
189 drain::image::TreeSVG & getUniqueElem(drain::image::TreeSVG & parent,
const drain::ClassXML & cls, drain::image::svg::tag_t type = drain::image::svg::GROUP)
const;
191 drain::image::TreeSVG & getUniqueElem(drain::image::TreeSVG & parent, drain::image::svg::tag_t type = drain::image::svg::GROUP)
const;
198DRAIN_TYPENAME(image::ImagePanel);
A wrapper marking string an CSS effect.
Definition ClassXML.h:57
Extracts and stores directory path, base filename and extension.
Definition FilePath.h:54
Something that has width and height.
Definition Frame.h:53
Creator of SVG image elements located in a SVG group with fixed structure.
Definition ImageSVG.h:62
drain::image::TreeSVG & getSelectionVisualisation()
Return a SELECTOR element or group.
Definition ImageSVG.h:178
static const ClassXML BACKGROUND
RECT, by default invisible, used for aligning other objects, like titles.
Definition ImageSVG.h:92
drain::image::TreeSVG & getImage(const drain::image::Image &src, const drain::FilePath &filepath) const
Recommended version, if image is defined.
Definition ImageSVG.h:126
ImagePanel(drain::image::TreeSVG &imagePanelGroup, const drain::Frame2D< int > &geom={0, 0})
Retrieves the group defined last, or creates...
static const ClassXML IMAGE_BORDER
Topmost layer, optionally with a visible border.
Definition ImageSVG.h:115
static const ClassXML DATA_ARRAY
Optional image serving as a data block.
Definition ImageSVG.h:107
static const ClassXML OVERLAY
Group for vector graphics.
Definition ImageSVG.h:96
static const ClassXML IMAGE_PANEL
Group containing and image and, potentially, title TEXTs.
Definition ImageSVG.h:88
ImagePanel(drain::image::TreeSVG &imagePanelGroup, const drain::image::Image &src, const drain::FilePath &filePath)
Recommended constructor, if Image is defined: stores also METADATA.
drain::image::TreeSVG & getVectorOverlayGroup(const std::string &key="", const drain::Frame2D< drain::image::svg::coord_t > &geom={0, 0}) const
For vector graphics (grids, sectors)
Definition ImageSVG.cpp:372
drain::image::TreeSVG & getDescription()
Return a description element (of the image).
Definition ImageSVG.h:169
Class for multi-channel digital images. Supports dynamic typing with base types (char,...
Definition Image.h:183