Loading...
Searching...
No Matches
graphics-panel.h
1/*
2
3MIT License
4
5Copyright (c) 2017 FMI Open Development / Markus Peura, first.last@fmi.fi
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software and associated documentation files (the "Software"), to deal
9in the Software without restriction, including without limitation the rights
10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11copies of the Software, and to permit persons to whom the Software is
12furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in all
15copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23SOFTWARE.
24
25*/
26/*
27Part of Rack development has been done in the BALTRAD projects part-financed
28by the European Union (European Regional Development Fund and European
29Neighbourhood Partnership Instrument, Baltic Sea Region Programme 2007-2013)
30*/
31
32
33#ifndef RACK_GRAPHICS_PANEL
34#define RACK_GRAPHICS_PANEL
35
36
37#include <drain/image/FilePng.h>
38#include <drain/image/TreeSVG.h>
39#include <drain/prog/Command.h>
40#include <drain/prog/CommandInstaller.h>
41#include <drain/prog/CommandBank.h>
42#include <drain/util/Output.h>
43#include <drain/image/TreeSVG.h>
44#include "data/SourceODIM.h" // for NOD
45
46#include "resources.h"
47//#include "fileio-svg.h"
48#include "graphics-radar.h"
49#include "graphics-panel.h"
50//#include "resources-image.h"
51
52
53namespace rack {
54
55
56
58class RackSVG {
59
60
61public:
62
63 //typedef drain::StyleSelectorXML<NodeSVG> Select;
64
65 // Identifier for the anchor background
66 // static const std::string BACKGROUND_RECT; // = "mainRect";
67
68 enum ElemClass {
69 NONE = 0,
70 MAIN_TITLE = 1, // Main title in SVG image
71 GROUP_TITLE = 2, // Group title
72 IMAGE_TITLE = 4, // Image title: small text (time, location) in corners of radar images
73 // Topical
74 TIME = 8, // Date and time attributes
75 LOCATION = 16, // Place (coordinates, municipality)
76 GENERAL = 32, // Default type
77 ALL = (63),
78 // MAIN,
79 IMAGE_PANEL,
80 IMAGE_BORDER, // RECT surrounding the image, potentially also a COORD_TRACKER
81 BACKGROUND_RECT, // invisible RECT used for aligning
82 SIDE_PANEL,
83 BORDER, // Overall image border (RECT), invisible by default
84 // --
85 MOUSE, // A group marked for mouse event listeners
86 MOUSE_TRACKER, // Area inside which mouse events will be tracked.
87 MONITOR, // Display of interactive operations
88 SELECTOR, // Interactive element illustrating a selection by the user
89 DATA_ARRAY, // Image used as data array only, not to be displayed
90 // SHARED_METADATA, // Something that should not be repeated in panels.
91 // --- unused ? ---
92 // TITLE, // Default title
93 };
94
95
97
100 static
101 drain::image::TreeSVG & getStyle(RackContext & ctx);
102
103 static
104 drain::image::TreeSVG & getOnLoadScript(RackContext & ctx);
105
114 static
115 drain::image::TreeSVG & getJavaScriptDefs(RackContext & ctx); //, const std::string & section="cls");
116
118
121 static
122 drain::image::TreeSVG & addJavaScripsDef(RackContext & ctx, const std::string & key, const std::string & section="cls");
123
124
126 static
127 const std::string & guessFormat(const std::string & key);
128
130
134 static
135 drain::image::TreeSVG & getMainGroup(RackContext & ctx);
136
137 static
138 drain::image::TreeSVG & getCurrentAlignedGroup(RackContext & ctx);
139
140 static
141 drain::image::TreeSVG & getImagePanelGroup(RackContext & ctx, const drain::FilePath & filepath);
142
143 static
144 drain::image::TreeSVG & getImagePanelGroup(RackContext & ctx);
145
146
150 static
151 drain::image::TreeSVG & getAdapterGroup(drain::image::TreeSVG & group);
152
153
154 static
155 //void applyAlignment(RackContext & ctx, drain::image::TreeSVG & group);
157
158 static
159 bool applyInclusion(RackContext & cxt, const drain::FilePath & filepath); // , IncludePolicy fileFormat);
160
161 static
162 // drain::image::TreeSVG &
163 void addImage(RackContext & ctx, const drain::image::Image & src, const drain::FilePath & filepath);
164
166 static
167 // drain::image::TreeSVG &
168 void addImage(RackContext & ctx, const drain::image::TreeSVG & svg, const drain::FilePath & filepath);
169
171
174 static
175 // drain::image::TreeSVG &
176 void addImage(RackContext & ctx, const drain::Frame2D<drain::image::svg::coord_t> & frame, const drain::FilePath & filepath, const std::string & styleClass = "");
177
178
180
183 static
184 drain::image::TreeSVG & addTitleBox(const ConfSVG & conf, drain::image::TreeSVG & object, RackSVG::ElemClass elemClass);
185
186 // TODO: title area "filling order", by group class.
188
189 static
190 drain::image::TreeSVG & appendTitleElements(const ConfSVG &conf, drain::image::TreeSVG &group, const std::string &anchor, RackSVG::ElemClass elemClass);
191
192 static inline
193 drain::image::TreeSVG & appendTitleElements(const ConfSVG &conf, drain::image::TreeSVG &group, const char * anchor, RackSVG::ElemClass elemClass){
194 return appendTitleElements(conf, group, std::string(anchor), elemClass);
195 }
196
197 template <class T>
198 static inline
199 drain::image::TreeSVG & appendTitleElements(const ConfSVG &conf, drain::image::TreeSVG &group, const T & anchorId, RackSVG::ElemClass elemClass){
200 //const drain::StringWrapper<T> anchor(anchorId);
201 const drain::EnumWrapper<T> anchor(anchorId);
202 // const std::string & s = anchor;
203 return appendTitleElements(conf, group, (const std::string &)anchor, elemClass);
204 }
205
206
208 static
209 drain::image::TreeSVG & addRectangleGroup(RackContext & ctx, const drain::Frame2D<double> & frame = {200,200});
210
211
213
216 static
217 drain::image::TreeSVG & addImageBorder(drain::image::TreeSVG & imagePanel); // , const drain::Frame2D<double> & frame = {200,200});
218
219
220protected:
221
222
223};
224
225} // rack
226
227
228
229namespace drain {
230
231DRAIN_ENUM_DICT(rack::RackSVG::ElemClass);
232DRAIN_ENUM_OSTREAM(rack::RackSVG::ElemClass);
233
234DRAIN_XML_ENUM_KEY(image::TreeSVG, rack::RackSVG::ElemClass);
235
236/*
237template <> // for T (Tree class)
238template <> // for K (path elem arg)
239bool image::TreeSVG::hasChild(const rack::RackSVG::ElemClass & key) const ;
240
242template <> // for T (Tree class)
243template <> // for K (path elem arg)
244const image::TreeSVG & image::TreeSVG::operator[](const rack::RackSVG::ElemClass & value) const;
245
246
247template <> // for T (Tree class)
248template <> // for K (path elem arg)
249image::TreeSVG & image::TreeSVG::operator[](const rack::RackSVG::ElemClass & key);
250*/
251
252//
253/*
254template <> // for T (Tree class)
255template <> // for K (path elem arg)
256image::TreeSVG & image::TreeSVG::operator[](const rack::GraphicsContext::ElemClass &x);
257*/
258
260
268//template <>
269//const drain::Enum<RackSVG::TitleClass>::dict_t drain::Enum<RackSVG::TitleClass>::dict;
270
271/*
272template <>
273const std::string std::static_cast<std::string>(const RackSVG::ElemClass & e){
274 return drain::Enum<RackSVG::ElemClass>::dict.getKey(e);
275}
276*/
277
278}
279
280
281namespace rack {
282
283using namespace drain::image;
284// Move to graphics.h ?
285
287
292class TitleCreatorSVG : public drain::TreeVisitor<TreeSVG> {
293
294public:
295
296
297 inline
298 TitleCreatorSVG(const ConfSVG & svgConf) : svgConf(svgConf) {
299 //titles.set(0xff);
300 /*
301 if (!svgConf.mainTitle.empty()){
302 titles.set(PanelConfSVG::ElemClass::MAIN_TITLE);
303 }
304
305 if (!svgConf.groupTitleSyntax.empty()){
306 titles.set(PanelConfSVG::ElemClass::GROUP_TITLE);
307 }
308
309 titles.set(PanelConfSVG::ElemClass::IMAGE_TITLE);
310 */
311 /*
312 if (!svgConf.groupNameSyntax.empty()){
313 titles.set(RackSVG::ElemClass::GROUP_TITLE);
314 }
315 */
316 };
317
320 int visitPostfix(TreeSVG &root, const TreeSVG::path_t &path) override;
321
325 void formatTitle(TreeSVG & group, const NodeSVG::map_t & attributes) const;
326
327 const ConfSVG & svgConf;
328
329
330};
331
332
333// ....
334
336
337public:
338
339 CmdLayout() : drain::BasicCommand(__FUNCTION__, "Set main panel alignment"){
340
341 getParameters().link("orientation", orientation="HORZ",
342 drain::sprinter(drain::Enum<orientation_enum>::dict.getKeys(), {"|"}).str());
343 getParameters().link("direction", direction="INCR",
344 drain::sprinter(drain::Enum<direction_enum>::dict.getKeys(), {"|"}).str());
345
346 }
347
348 CmdLayout(const CmdLayout & cmd) : drain::BasicCommand(cmd) {
349 getParameters().copyStruct(cmd.getParameters(), cmd, *this);
350 };
351
352
353 virtual
354 void exec() const override;
355
356protected:
357
358 typedef drain::image::AlignBase::Axis orientation_enum;
360
361 //volatile
362 mutable
363 std::string orientation;
364
365 // volatile
366 mutable
367 std::string direction;
368
369
370};
371
381//class CmdAlign : public drain::SimpleCommand<std::string> {
383
384public:
385
386 /*
387 CmdAlign() : drain::SimpleCommand<std::string>(__FUNCTION__, "Alignment of the next element", "topology", "",
388 drain::sprinter(drain::Enum<AlignSVG::Topol>::dict.getKeys(), {"|"}).str() + ':' +
389 drain::sprinter(drain::Enum<AlignSVG::HorzAlign>::dict.getKeys(), {"|"}).str() + ',' +
390 drain::sprinter(drain::Enum<AlignSVG::Topol>::dict.getKeys(), {"|"}).str() + ':' +
391 drain::sprinter(drain::Enum<AlignSVG::VertAlign>::dict.getKeys(), {"|"}).str()
392 ){
393 //getParameters().link("", x, drain::StringBuilder<':'>());
394 }
395 */
396
397
398 CmdAlign() : drain::BasicCommand(__FUNCTION__, "Alignment of the next element"){
399
400 getParameters().link("position", position,
401 drain::sprinter(drain::Enum<MutualAlign::Topol>::dict.getKeys(), {"|"}).str() + ':' +
402 drain::sprinter(drain::Enum<AlignSVG::HorzAlign>::dict.getKeys(), {"|"}).str() + ',' +
403 drain::sprinter(drain::Enum<MutualAlign::Topol>::dict.getKeys(), {"|"}).str() + ':' +
404 drain::sprinter(drain::Enum<AlignSVG::VertAlign>::dict.getKeys(), {"|"}).str()
405 ).setSeparator(':');
406
407 getParameters().link("anchor", anchor.str(),
408 std::string("<name>|<empty>") + drain::sprinter(drain::Enum<drain::image::AnchorElem::Anchor>::dict.getKeys(), {"|"}).str()
409 );
410 getParameters().link("anchorHorz", anchorHorz.str(),
411 "..."
412 );
413 getParameters().link("anchorVert", anchorVert.str(),
414 "..."
415 );
416 }
417
418 CmdAlign(const CmdAlign & cmd) : drain::BasicCommand(cmd){
419 getParameters().copyStruct(cmd.getParameters(), cmd, *this, drain::ReferenceMap::LINK);
420 };
421
422
423 virtual
424 void exec() const override;
425
426protected:
427
428 std::string position;
429
430 mutable
432
433 mutable
434 drain::image::AnchorElem anchorHorz;
435
436 mutable
437 drain::image::AnchorElem anchorVert;
438
439};
440
441/*
442class CmdAnchor : public drain::SimpleCommand<std::string> {
443
444public:
445
446 inline
447 CmdAnchor() : drain::SimpleCommand<std::string>(__FUNCTION__, "Alignment of the next element", "topology", "",
448 drain::sprinter(drain::Enum<drain::image::AnchorElem::Anchor>::dict.getKeys(), {"|"}).str()
449 ){
450 //getParameters().link("", x, drain::StringBuilder<':'>());
451 }
452
453 virtual
454 void exec() const override {
455
456 RackContext & ctx = getContext<RackContext>();
457 drain::Logger mout(ctx.log, __FUNCTION__, getName());
458
459 }
460};
461 */
462
464class CmdAdjustSizes : public drain::SimpleCommand<std::string> {
465
466public:
467
468 CmdAdjustSizes(const std::string & name, const std::string & description) : drain::SimpleCommand<std::string>(name, description) {
469 // getParameters().link("sizes", fontSizes);
470 }
471
472 template <class T, size_t N=2>
473 void adjust(drain::UniTuple<T,N> & tuple, float decay = 0.8) const{
474
475
476 double defaultValue = decay * tuple[0];
477
478 tuple.clear();
479
480 drain::Reference ref(tuple);
481 ref.setFill(false);
482 ref = value;
483
484 for (double & s: tuple){
485 defaultValue = 0.1 * ::round(10.0 * defaultValue);
486 // mout.attention("font size ", s, ", [", defaultValue, "]");
487 if (s == 0.0){
488 s = defaultValue;
489 }
490 else {
491 if (s > defaultValue){
492 // mout.suspicious<LOG_WARNING>("font size increasing (", s, '>', defaultValue, ") unexpectedly");
493 }
494 defaultValue = s;
495 }
496 defaultValue *= decay;
497 }
498 // mout.accept<LOG_WARNING>("new values: ", ctx.svgPanelConf.fontSizes);
499
500
501 }
502
503
504};
505
506
507// class CmdFontSizes : public drain::BasicCommand {
509
510public:
511
512 inline
513 CmdFontSizes() : CmdAdjustSizes(__FUNCTION__, "Adjust font sizes in CSS style section.") {
514 }
515
516 virtual
517 void exec() const override;
518
519};
520
521
523
524public:
525
526 inline
527 CmdTitleHeights() : CmdAdjustSizes(__FUNCTION__, "Set title box heights and adjust font sizes. See --gFontSizes") {
528 }
529
530 virtual
531 void exec() const override;
532
533};
534
535class CmdLinkImage : public drain::SimpleCommand<std::string> {
536
537public:
538
539 inline
540 CmdLinkImage() : drain::SimpleCommand<std::string>(__FUNCTION__, "Link arbitrary external image (PNG).") {
541 }
542
543 void exec() const override;
544
545};
546
547
548
549//class CmdGroupTitle : public drain::BasicCommand {
550class CmdGroupTitle : public drain::SimpleCommand<std::string> {
551
552public:
553
554 inline
555 CmdGroupTitle() : drain::SimpleCommand<std::string>(__FUNCTION__, "Set titles, supporting variables", "syntax") {
556 // RackContext & ctx = getContext<RackContext>();
557 getParameters().separator = 0;
558 // getParameters().link("syntax", ctx.svgPanelConf.groupTitleSyntax, "example: '${what:date|%Y%m} ${NOD}'");
559 }
560
561 inline
562 CmdGroupTitle(const CmdGroupTitle & cmd) : drain::SimpleCommand<std::string>(cmd) { // drain::BasicCommand(cmd) {
563 // getParameters().copyStruct(cmd.getParameters(), cmd, *this, drain::ReferenceMap::LINK);
564 }
565
566 void exec() const override;
567
568};
569
570class CmdGroupId : public drain::SimpleCommand<std::string> {
571
572public:
573
574 //CmdGroupTitle() : drain::BasicCommand(__FUNCTION__, "Set titles automatically") {
575 CmdGroupId() : drain::SimpleCommand<std::string>(__FUNCTION__, "Set grouping criterion based on variables", "syntax") {
576 getParameters().separator = 0;
577 }
578
579 CmdGroupId(const CmdGroupId & cmd) : drain::SimpleCommand<std::string>(cmd) { // drain::BasicCommand(cmd) {
580 // getParameters().copyStruct(cmd.getParameters(), cmd, *this, drain::ReferenceMap::LINK);
581 }
582
583 inline
584 void exec() const override {
585 RackContext & ctx = getContext<RackContext>();
586 drain::Logger mout(ctx.log, __FILE__, __FUNCTION__);
587 // mout.accept<LOG_WARNING>("old value: ", value);
588 drain::StringTools::replace(value, '/', '-', ctx.svgPanelConf.groupIdentifier);
589 // notice if pruned/modified?
590 mout.accept<LOG_WARNING>("new value: ", ctx.svgPanelConf.groupIdentifier);
591 }
592
593};
594
595
596/*
597class CmdImageTitle : public drain::BasicCommand {
598
599public:
600
601 CmdImageTitle() : drain::BasicCommand(__FUNCTION__, "Set titles automatically") {
602 RackContext & ctx = getContext<RackContext>();
603 getParameters().link("title", ctx.svgPanelConf.imageTitle, "'TIME'|'LOCATION'|'GENERAL'");
604 }
605
606 CmdImageTitle(const CmdImageTitle & cmd) : drain::BasicCommand(cmd) {
607 getParameters().copyStruct(cmd.getParameters(), cmd, *this, drain::ReferenceMap::LINK);
608 }
609
610 void exec() const override {
611 RackContext & ctx = getContext<RackContext>();
612 drain::Logger mout(ctx.log, __FILE__, __FUNCTION__);
613 }
614
615};
616*/
617
619
620public:
621
622 // TODO: use unlinked SimpleCommand,
623
624 inline
625 CmdTitle() : drain::BasicCommand(__FUNCTION__, "Set main title") {
626 RackContext & ctx = getContext<RackContext>();
627 getParameters().separator = 0;
628 getParameters().link("title", ctx.svgPanelConf.mainTitle, "<empty>|<string>|'auto'");
629 }
630
631 inline
632 CmdTitle(const CmdTitle & cmd) : drain::BasicCommand(cmd) {
633 getParameters().copyStruct(cmd.getParameters(), cmd, *this, drain::ReferenceMap::LINK);
634 }
635
636};
637
656/*
657class CmdTitles : public drain::BasicCommand {
658
659public:
660
661 CmdTitles() : drain::BasicCommand(__FUNCTION__, "Set titles automatically") {
662 RackContext & ctx = getContext<RackContext>();
663 getParameters().link("main", ctx.svgPanelConf.mainTitle, "NONE|AUTO|USER");
664 getParameters().link("group", ctx.svgPanelConf.mainTitle, "NONE|AUTO|USER");
665 getParameters().link("image", ctx.svgPanelConf.mainTitle, "NONE|TIME|LOCATION|GENERAL");
666 }
667
668 CmdTitles(const CmdTitles & cmd) : drain::BasicCommand(cmd) {
669 getParameters().copyStruct(cmd.getParameters(), cmd, *this, drain::ReferenceMap::LINK);
670 }
671
672};
673 */
674
675
676class CmdInclude : public drain::SimpleCommand<std::string> {
677
678public:
679
680 CmdInclude() : drain::SimpleCommand<std::string>(__FUNCTION__, "Select images to include in SVG panel", "include",
681 drain::sprinter(drain::Enum<drain::image::FileSVG::IncludePolicy>::dict.getKeys(), '|').str()) {
682 }
683
684 void exec() const override;
685
686};
687
688
689/*
690class CmdTitles : public drain::SimpleCommand<std::string> {
691public:
692
693 CmdTitles() : drain::SimpleCommand<std::string>(__FUNCTION__, "Set titles automatically", "[MAINTITLE|TIME|LOCATION|GENERAL]") {
694 }
695
696 void exec() const {
697
698 RackContext & ctx = getContext<RackContext>();
699 drain::Logger mout(ctx.log, __FILE__, __FUNCTION__);
700
701 mout.unimplemented<LOG_ERR>(__FILE__, __FUNCTION__);
702 //ctx.svgPanelConf.svgTitles.set(value);
703
704 }
705
706};
707 */
708
709
710} // rack::
711
712
713#endif
Simple implementation of Command: adds name , description and parameters .
Definition Command.h:445
Definition Enum.h:223
Extracts and stores directory path, base filename and extension.
Definition FilePath.h:58
Something that has width and height.
Definition Frame.h:55
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:313
Logger & accept(const TT &... args)
Some input has been accepted, for example by a syntax.
Definition Log.h:583
void copyStruct(const ReferenceMap &m, const T &src, T &dst, extLinkPolicy policy=RESERVE)
Experimental. Copies references and values of a structure to another.
Definition ReferenceMap.h:415
@ LINK
Definition ReferenceMap.h:400
A single-parameter command.
Definition Command.h:469
char separator
Default character used for splitting input and output. See setValues.
Definition SmartMap.h:85
static void replace(const std::string &src, char search, char repl, std::ostream &ostr)
Replaces instances of 'search' to 'repl' in src.
Definition StringTools.cpp:94
Default implementation of a tree visitor (concept) compatible TreeUtils::traverser()
Definition TreeUtils.h:270
Tuple of N elements of type T.
Definition UniTuple.h:65
VariableT is a final class applied through typedefs Variable, Reference and FlexibleVariable.
Definition VariableT.h:87
Class for multi-channel digital images. Supports dynamic typing with base types (char,...
Definition Image.h:193
Direction
Direction for "Stacked", horziontally or vertically sequentially aligned layout.
Definition LayoutSVG.h:65
Definition TreeSVG.h:182
"Virtual" command base for FontSizes and HeaderSizes
Definition graphics-panel.h:464
Definition graphics-panel.h:382
virtual void exec() const override
Definition graphics-panel.cpp:1059
Definition graphics-panel.h:508
virtual void exec() const override
Run the command with current parameter values.
Definition graphics-panel.cpp:1138
Definition graphics-panel.h:570
void exec() const override
Run the command with current parameter values.
Definition graphics-panel.h:584
Definition graphics-panel.h:550
void exec() const override
Run the command with current parameter values.
Definition graphics-panel.cpp:1197
Definition graphics-panel.h:676
void exec() const override
Definition graphics-panel.cpp:1299
Definition graphics-panel.h:335
virtual void exec() const override
Run the command with current parameter values.
Definition graphics-panel.cpp:1032
Definition graphics-panel.h:535
void exec() const override
Run the command with current parameter values.
Definition graphics-panel.cpp:1165
Definition graphics-panel.h:522
virtual void exec() const override
Run the command with current parameter values.
Definition graphics-panel.cpp:1148
Definition graphics-panel.h:618
Resources provided separately for each thread.
Definition resources.h:67
SVG support for creating aligned image panels.
Definition graphics-panel.h:58
static drain::image::TreeSVG & addTitleBox(const ConfSVG &conf, drain::image::TreeSVG &object, RackSVG::ElemClass elemClass)
Create a title from background rectangle and TEXT elements (MAINTITLE, LOCATION, TIME,...
Definition graphics-panel.cpp:709
static drain::image::TreeSVG & appendTitleElements(const ConfSVG &conf, drain::image::TreeSVG &group, const std::string &anchor, RackSVG::ElemClass elemClass)
Add title elements in given group, to "reserve slots" for actual text content to be added later.
Definition graphics-panel.cpp:741
static drain::image::TreeSVG & addJavaScripsDef(RackContext &ctx, const std::string &key, const std::string &section="cls")
key => Rack.cls.key = 'key';
Definition graphics-panel.cpp:283
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)
Definition graphics-panel.cpp:554
static drain::image::TreeSVG & getMainGroup(RackContext &ctx)
Top-level GROUP used by Rack. All the graphic elements will be created inside this element.
Definition graphics-panel.cpp:414
static drain::image::TreeSVG & addImageBorder(drain::image::TreeSVG &imagePanel)
Add.
Definition graphics-panel.cpp:698
static drain::image::TreeSVG & getJavaScriptDefs(RackContext &ctx)
Definition graphics-panel.cpp:266
static drain::image::TreeSVG & addRectangleGroup(RackContext &ctx, const drain::Frame2D< double > &frame={200, 200})
Add rectangle.
static const std::string & guessFormat(const std::string &key)
returns timeformat
Definition graphics-panel.cpp:299
static drain::image::TreeSVG & getAdapterGroup(drain::image::TreeSVG &group)
Return current row or column of image panels.
Definition graphics-panel.cpp:463
static void addImage(RackContext &ctx, const drain::image::Image &src, const drain::FilePath &filepath)
Add pixel image (PNG).
Definition graphics-panel.cpp:597
static void consumeAlignRequest(RackContext &ctx, drain::image::NodeSVG &node)
Apply an alignment, to next object only.
Definition graphics-panel.cpp:329
static drain::image::TreeSVG & getStyle(RackContext &ctx)
Some SVG style classes. Identifiers for IMAGE and RECT elements over which TEXT elements will be alig...
Definition graphics-panel.cpp:114
Formats titles from metadata. Invoked by drain::TreeUtils::traverse()
Definition graphics-panel.h:292
void formatTitle(TreeSVG &group, const NodeSVG::map_t &attributes) const
Definition graphics-panel.cpp:839
Namespace for images and image processing tools.
Definition AccumulationArray.cpp:45
Definition DataSelector.cpp:1277
Definition DataSelector.cpp:44
A container for a static dictionary of enumeration values.
Definition Enum.h:51
Definition AlignAnchorSVG.h:77
Definition TreeSVG.h:104
Definition resources-image.h:56