Logo ROOT   6.16/01
Reference Guide
RPadPos.cxx
Go to the documentation of this file.
1/// \file RPadPos.cxx
2/// \ingroup Gpad ROOT7
3/// \author Axel Naumann <axel@cern.ch>
4/// \date 2018-02-08
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#include "ROOT/RPadPos.hxx"
17
18#include <ROOT/RPadExtent.hxx>
19#include <ROOT/TLogger.hxx>
20
21////////////////////////////////////////////////////////////////////////////////
22/// Initialize a RPadPos from a style string.
23/// Syntax: X, Y
24/// where X and Y are a series of numbers separated by "+", where each number is
25/// followed by one of `px`, `user`, `normal` to specify an extent in pixel,
26/// user or normal coordinates. Spaces between any part is allowed.
27/// Example: `100 px + 0.1 user, 0.5 normal` is a `RPadPos{100_px + 0.1_user, 0.5_normal}`.
28
30 const std::string &attrStrVal, RPadPos &val)
31{
32 val.SetFromAttrString(name, attrStrVal);
33}
void InitializeAttrFromString(const std::string &name, const std::string &attrStrVal, RPadExtent &val)
Initialize a RPadExtent from a style string.
Definition: RPadExtent.cxx:28
void SetFromAttrString(const std::string &name, const std::string &attrStrVal)
Initialize a RPadHorizVert from a style string.
Definition: RPadExtent.cxx:42
A position (horizontal and vertical) in a RPad.
Definition: RPadPos.hxx:27