19 #include "ROOT/TDrawingAttr.hxx" 20 #include "ROOT/TDrawingOptsBase.hxx" 24 #include "ROOT/TPalette.hxx" 29 namespace Experimental {
40 TDrawingAttr<TPadPos>
fPos{*
this,
"frame.pos", 0.1_normal, 0.1_normal};
42 TDrawingAttr<TPadExtent>
fSize{*
this,
"frame.size", 0.8_normal, 0.8_normal};
47 std::vector<std::unique_ptr<TPadUserAxisBase>>
fUserCoord;
66 explicit TFrame(std::vector<std::unique_ptr<TPadUserAxisBase>> &&coords,
const DrawingOpts &opts);
83 void SetUserAxis(std::vector<std::unique_ptr<TPadUserAxisBase>> &&axes) { fUserCoord = std::move(axes); }
86 std::array<TPadLength::Normal, 2>
UserToNormal(
const std::array<TPadLength::User, 2> &pos)
const 88 return {{fUserCoord[0]->ToNormal(pos[0]), fUserCoord[1]->ToNormal(pos[1])}};
size_t GetNDimensions() const
Get the number of axes.
std::array< TPadLength::Normal, 2 > UserToNormal(const std::array< TPadLength::User, 2 > &pos) const
Convert user coordinates to normal coordinates.
Namespace for new ROOT classes and functions.
TPadUserAxisBase & GetUserAxis(size_t dimension) const
Get the current user coordinate system for a given dimension.
TPadExtent fSize
Size of the frame, in parent TPad coordinates.
A position (horizontal and vertical) in a TPad.
TDrawingAttr< TPadExtent > fSize
Size of the frame in parent TPad coordinates.
TPalette fPalette
Palette used to visualize user coordinates.
TPadPos fPos
Offset with respect to parent TPad.
void SetUserAxis(std::vector< std::unique_ptr< TPadUserAxisBase >> &&axes)
Set the user coordinate system.
void GrowToDimensions(size_t nDimensions)
Create nDimensions default axes for the user coordinate system.
TDrawingAttr< TPadPos > fPos
Position of the frame in parent TPad coordinates.
Holds a user coordinate system with a palette.
std::vector< std::unique_ptr< TPadUserAxisBase > > fUserCoord
Mapping of user coordinates to normal coordinates, one entry per dimension.
An extent / size (horizontal and vertical) in a TPad.
TFrame(const DrawingOpts &opts)