Swiftray  1.0
reference-context.h
Go to the documentation of this file.
1 #include <QDebug>
4 
5 #pragma once
6 
7 namespace Parser {
8 
10 public:
12  : BaseContext(referencing), referencing_(referencing) {}
13 
14  // Viewport Events Policy
15  void get_reference_viewport_size(double &width, double &height) {
16  if (referencing_.width())
17  width = *referencing_.width();
18  if (referencing_.height())
19  height = *referencing_.height();
20  }
21 
22 private:
23  UseContext &referencing_;
24 };
25 
26 }
Definition: base-context.h:10
Definition: reference-context.h:9
ReferencedSymbolOrSvgContext(UseContext &referencing)
Definition: reference-context.h:11
void get_reference_viewport_size(double &width, double &height)
Definition: reference-context.h:15
Definition: use-context.h:8
boost::optional< double > const & height() const
Definition: use-context.h:16
boost::optional< double > const & width() const
Definition: use-context.h:14
Definition: base-context.h:8