scenepic 1.1.0
3D Visualization Made Easy
Public Member Functions | Public Attributes | List of all members
scenepic::Graph::Margin Struct Reference

Represents the margin along the edges of a graph. More...

#include <graph.h>

Public Member Functions

 Margin ()
 Default constructor. More...
 
 Margin (double size)
 Constructor. More...
 
 Margin (double top, double right, double bottom, double left)
 Constructor. More...
 
std::string to_string () const
 Returns a string representation of the margin. More...
 
JsonValue to_json () const
 Convert this object into ScenePic json. More...
 

Public Attributes

double top
 The top margin in pixels. More...
 
double right
 The right margin in pixels. More...
 
double bottom
 The bottom margin in pixels. More...
 
double left
 The left margin in pixels. More...
 

Detailed Description

Represents the margin along the edges of a graph.

Constructor & Destructor Documentation

◆ Margin() [1/3]

scenepic::Graph::Margin::Margin ( )

Default constructor.

Sets all margins to 10 pixels.

◆ Margin() [2/3]

scenepic::Graph::Margin::Margin ( double  size)

Constructor.

Parameters
sizespace in pixels to use for all margins

◆ Margin() [3/3]

scenepic::Graph::Margin::Margin ( double  top,
double  right,
double  bottom,
double  left 
)

Constructor.

Parameters
topthe top margin value in pixels
rightthe right margin value in pixels
bottomthe bottom margin value in pixels
leftthe left margin value in pixels

Member Function Documentation

◆ to_json()

JsonValue scenepic::Graph::Margin::to_json ( ) const

Convert this object into ScenePic json.

Returns
a json value

◆ to_string()

std::string scenepic::Graph::Margin::to_string ( ) const

Returns a string representation of the margin.

Member Data Documentation

◆ bottom

double scenepic::Graph::Margin::bottom

The bottom margin in pixels.

◆ left

double scenepic::Graph::Margin::left

The left margin in pixels.

◆ right

double scenepic::Graph::Margin::right

The right margin in pixels.

◆ top

double scenepic::Graph::Margin::top

The top margin in pixels.


The documentation for this struct was generated from the following file: