Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Eepic_Plane Class Reference

2D canvas for generating EEPIC/LaTeX picture environments. More...

#include <eepicgeom.H>

Collaboration diagram for Eepic_Plane:
[legend]

Public Types

typedef void(Eepic_Plane::* Draw_Segment_Fct) (const Segment &poly, std::ostream &output)
 

Public Member Functions

double h_geom_number_to_eepic (const Geom_Number &x) const
 Convert a geometric x proportion into plane units using wide.
 
double v_geom_number_to_eepic (const Geom_Number &y) const
 Convert a geometric y proportion into plane units using height.
 
double x_geom_number_to_eepic (const Geom_Number &x) const
 Convert a geometric x coordinate into plane x coordinate.
 
double y_geom_number_to_eepic (const Geom_Number &y) const
 Convert a geometric y coordinate into plane y coordinate.
 
void compute_extreme_points ()
 Linear scan over all objects to compute extreme points.
 
void zoom (const double &factor)
 Scale the EEPIC plane in real points (zoom in/out).
 
const Pointleftmost () const
 
const Pointrightmost () const
 
const Pointhighest () const
 
const Pointlowest () const
 
std::string point_string (const Point &p)
 Given point p, returns "(x,y)" in normalized plane coordinates.
 
void draw (std::ostream &output, const bool &squarize=true)
 Emits a complete LaTeX picture environment containing the geometric objects.
 
const doubleget_wide () const
 Plane accessors.
 
const doubleget_height () const
 Picture height (in EEPIC units).
 
const doubleget_yoffset () const
 Y offset of the LaTeX picture environment.
 
const doubleget_xoffset () const
 X offset of the LaTeX picture environment.
 
const doubleget_r () const
 Radius used to draw points (also used as text baseline offset).
 
 Eepic_Plane (const double &__wide, const double &__height, const double &__xoffset=0.0, const double &__yoffset=0.0)
 Construct a plane with a fixed picture frame.
 
 ~Eepic_Plane ()
 Destructor: deletes all stored Eepic_Geom_Object clones.
 
void put_cartesian_axis ()
 Enable drawing Cartesian axes when calling draw().
 
void put (const Eepic_Geom_Object &__eepic_geom_obj)
 Design note: why Eepic_Plane stores Eepic_Geom_Object wrappers.
 
void set_resolution (const double &res)
 Set the output resolution in millimeters (unitlength = res mm).
 
const doubleget_resolution () const
 Return the current output resolution in millimeters.
 
void set_fill_type (const std::string &ftype)
 Set the fill type used by LaTeX eepic (e.g., "black").
 
void set_shade_thickness (const double &__thickness)
 Set the thickness used for shaded primitives.
 
double get_shade_thickness () const
 Return the current shading thickness.
 
double get_dotgap () const
 Return the dot gap used for dotted/dashed lines.
 
void draw_point (const Point &p, std::ostream &output)
 EEPIC "primitive drawing" methods.
 
void draw_segment (const Segment &sg, std::ostream &output)
 Emit EEPIC code to draw segment sg.
 
void draw_arrow (const Segment &sg, std::ostream &output)
 Emit EEPIC code to draw segment sg with an arrow head.
 
void draw_dotted_segment (const Segment &sg, std::ostream &output)
 Emit EEPIC code to draw dotted segment sg.
 
void draw_dash_segment (const Segment &sg, std::ostream &output)
 Emit EEPIC code to draw dashed segment sg.
 
void draw_arrow_dotted_segment (const Segment &sg, std::ostream &output)
 Emit EEPIC code to draw dotted segment sg with arrow head.
 
void draw_arrow_dash_segment (const Segment &sg, std::ostream &output)
 Emit EEPIC code to draw dashed segment sg with arrow head.
 
void draw_ellipse (const Ellipse &e, std::ostream &output)
 Emit EEPIC code to draw ellipse e.
 
template<class Poly >
void draw_polygon (Poly &poly, std::ostream &output, Draw_Segment_Fct draw_sg_fct)
 
template<class Poly >
void draw_closed_polygon (Poly &poly, std::ostream &output)
 
template<class Poly >
void draw_dotted_closed_polygon (Poly &poly, std::ostream &output)
 
template<class Poly >
void draw_dots_from_polygon (Poly &poly, std::ostream &output)
 
void draw_arrow_extreme (const Segment &sg, std::ostream &output)
 
template<class Poly >
void draw_arrows_in_polygon (Poly &poly, std::ostream &output)
 
template<class Poly >
void draw_closed_polygon_with_arrows (Poly &poly, std::ostream &output)
 
void draw_point_text (const Point &p, std::ostream &output)
 
template<class Poly >
void draw_points_text_in_polygon (Poly &poly, std::ostream &output)
 
template<class Poly >
void draw_vertex_numbers_in_polygon (Poly &poly, std::ostream &output)
 
template<class Poly >
void draw_spline (Poly &poly, std::ostream &output)
 
template<class Poly >
void draw_dash_spline (Poly &poly, std::ostream &output)
 
template<class Poly >
void draw_spline_arrow (Poly &poly, std::ostream &output)
 
template<class Poly >
void draw_dash_spline_arrow (Poly &poly, std::ostream &output)
 
void draw_text (const Text &t, std::ostream &output, const double &hfactor, const double &vfactor)
 

Static Public Attributes

static const double arrow_width_in_mm = 0.5
 
static const double arrow_lenght_in_mm = 1.5
 

Private Member Functions

double geom_number_to_plane (const Geom_Number &p, const Geom_Number &geom_max, const double &max) const
 Rescales a coordinate value p from a geometric scale geom_max into the plane scale max.
 
double xpic (const double &x) const
 Points must be normalized to the plane size (in picture coordinates).
 
double ypic (const double &y) const
 Normalize to y-axis origin.
 
void compute_geom_plane (const bool &squarize)
 Compute extreme coordinates and derive width/height of all objects.
 
void draw_cartesian_axis (std::ostream &output)
 

Private Attributes

double wide
 Width in resolution points.
 
double height
 Height in resolution points.
 
double real_wide = 0
 Actual width after scaling.
 
double real_height = 0
 Actual height after scaling.
 
double xoffset
 Additional horizontal margin.
 
double yoffset
 Additional vertical margin.
 
Geom_Number geom_wide
 Width from leftmost to rightmost point.
 
Geom_Number geom_height
 Height from lowest to highest point.
 
DynDlist< Eepic_Geom_Object * > list
 List of geometric objects.
 
Geom_Number geom_x_min
 Minimum x value in geometric coordinates.
 
Geom_Number geom_y_min
 Minimum y value in geometric coordinates.
 
double x_min
 Minimum x value in plane coordinates.
 
double y_min
 Minimum y value in plane coordinates.
 
Point __leftmost
 Point with minimum x-coordinate.
 
Point __rightmost
 Point with maximum x-coordinate.
 
Point __highest
 Point with maximum y-coordinate.
 
Point __lowest
 Point with minimum y-coordinate.
 
bool with_cartesian_axis
 Flag to draw Cartesian axes.
 
double r
 Actual radius in real points for drawing a point.
 
double resolution
 Resolution in millimeters (default: 0.05mm)
 
std::string fill_type
 Fill type for shapes (e.g., "black")
 
std::string shade_type
 Shading type for segments.
 
double shade_thickness
 Current shading thickness.
 

Static Private Attributes

static const double default_r = 20
 Default radius for drawing points (also used for text height)
 
static const double normal_thickness = 20
 Default line thickness.
 
static const double default_shade_thickness = 200
 Default shading thickness.
 
static const double dotgap = 65
 Gap between dots in dotted lines.
 

Detailed Description

2D canvas for generating EEPIC/LaTeX picture environments.

Eepic_Plane serves as a container for geometric objects and handles the transformation from geometric coordinates to EEPIC picture coordinates. It generates a complete LaTeX picture environment that can be included in any LaTeX document with the eepic package.

Coordinate System

The plane maintains two coordinate systems:

  • Geometric coordinates: The original coordinates of the objects
  • EEPIC coordinates: Normalized coordinates for the picture environment

The transformation between these systems handles:

  • Scaling to fit the specified width and height
  • Optional aspect ratio preservation (squarize mode)
  • Offset adjustments for margins

Drawing Methods

The class provides primitive drawing methods for:

  • Points (draw_point)
  • Segments in various styles (draw_segment, draw_dotted_segment, etc.)
  • Arrows (draw_arrow, draw_arrow_extreme)
  • Ellipses (draw_ellipse)
  • Polygons (draw_polygon, draw_closed_polygon, etc.)
  • Splines (draw_spline, draw_dash_spline)
  • Text (draw_text, draw_point_text)

Example Usage

// Create a 500x500 point canvas
Eepic_Plane plane(500, 500);
// Add geometric objects
Point p1(0, 0), p2(100, 100);
Segment seg(p1, p2);
put_in_plane(plane, seg);
// Generate EEPIC output
std::ofstream file("diagram.tex");
plane.draw(file);
2D canvas for generating EEPIC/LaTeX picture environments.
Definition eepicgeom.H:250
Rectangular point in the plane.
Definition point.H:156
Fundamental segment defined by two points.
Definition point.H:417
void put_in_plane(Eepic_Plane &plane, const Point &geom_obj)
Definition eepicgeom.C:50
DynList< T > maps(const C &c, Op op)
Classic map operation.
fstream file[12]
Definition treapObs.C:67
Author
Leandro Rabindranath León

Definition at line 249 of file eepicgeom.H.

Member Typedef Documentation

◆ Draw_Segment_Fct

typedef void(Eepic_Plane::* Eepic_Plane::Draw_Segment_Fct) (const Segment &poly, std::ostream &output)

Definition at line 836 of file eepicgeom.H.

Constructor & Destructor Documentation

◆ Eepic_Plane()

Eepic_Plane::Eepic_Plane ( const double __wide,
const double __height,
const double __xoffset = 0.0,
const double __yoffset = 0.0 
)
inline

Construct a plane with a fixed picture frame.

Parameters
__widePicture width.
__heightPicture height.
__xoffsetX offset for the LaTeX picture environment.
__yoffsetY offset for the LaTeX picture environment.

Definition at line 544 of file eepicgeom.H.

◆ ~Eepic_Plane()

Eepic_Plane::~Eepic_Plane ( )
inline

Destructor: deletes all stored Eepic_Geom_Object clones.

Definition at line 557 of file eepicgeom.H.

References Aleph::Dlink::is_empty(), list, Aleph::maps(), and Aleph::DynDlist< T >::remove_first_ne().

Member Function Documentation

◆ compute_extreme_points()

◆ compute_geom_plane()

void Eepic_Plane::compute_geom_plane ( const bool squarize)
inlineprivate

Compute extreme coordinates and derive width/height of all objects.

If squarize is true, rescaling preserves aspect ratio (no distortion).

Definition at line 406 of file eepicgeom.H.

References __highest, __leftmost, __lowest, __rightmost, compute_extreme_points(), geom_height, geom_number_to_double(), geom_wide, geom_x_min, geom_y_min, h_geom_number_to_eepic(), height, Aleph::maps(), real_height, real_wide, squarize, v_geom_number_to_eepic(), wide, x_geom_number_to_eepic(), x_min, y_geom_number_to_eepic(), and y_min.

Referenced by draw().

◆ draw()

void Eepic_Plane::draw ( std::ostream &  output,
const bool squarize = true 
)
inline

Emits a complete LaTeX picture environment containing the geometric objects.

If squarize == false, objects are scaled independently in x/y to fit exactly in the plane defined at construction time.

If squarize == true, aspect ratio is preserved (no distortion) but the available space may be used less efficiently.

Definition at line 475 of file eepicgeom.H.

References __highest, __leftmost, __lowest, __rightmost, compute_geom_plane(), Eepic_Geom_Object::draw(), draw_cartesian_axis(), fill_type, Aleph::Dlink::Iterator::has_curr(), list, output, point_string(), real_height, real_wide, resolution, Aleph::DynDlist< T >::size(), squarize, xoffset, and yoffset.

Referenced by generate_picture(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().

◆ draw_arrow()

void Eepic_Plane::draw_arrow ( const Segment sg,
std::ostream &  output 
)
inline

Emit EEPIC code to draw segment sg with an arrow head.

Definition at line 731 of file eepicgeom.H.

References DRAW_ARROW, and output.

Referenced by Eepic_Arrow::draw(), Eepic_Thick_Arrow::draw(), and draw_cartesian_axis().

◆ draw_arrow_dash_segment()

void Eepic_Plane::draw_arrow_dash_segment ( const Segment sg,
std::ostream &  output 
)
inline

Emit EEPIC code to draw dashed segment sg with arrow head.

Definition at line 805 of file eepicgeom.H.

References DRAW_ARROW_DASH_SEGMENT, and output.

Referenced by Eepic_Dash_Arrow::draw(), and Eepic_Thick_Dash_Arrow::draw().

◆ draw_arrow_dotted_segment()

void Eepic_Plane::draw_arrow_dotted_segment ( const Segment sg,
std::ostream &  output 
)
inline

Emit EEPIC code to draw dotted segment sg with arrow head.

Definition at line 786 of file eepicgeom.H.

References DRAW_ARROW_DOTTED_SEGMENT, and output.

Referenced by Eepic_Dotted_Arrow::draw().

◆ draw_arrow_extreme()

void Eepic_Plane::draw_arrow_extreme ( const Segment sg,
std::ostream &  output 
)
inline

◆ draw_arrows_in_polygon()

template<class Poly >
void Eepic_Plane::draw_arrows_in_polygon ( Poly poly,
std::ostream &  output 
)
inline

◆ draw_cartesian_axis()

void Eepic_Plane::draw_cartesian_axis ( std::ostream &  output)
private

Definition at line 243 of file eepicgeom.C.

References __highest, __leftmost, __lowest, __rightmost, draw_arrow(), Aleph::maps(), output, and with_cartesian_axis.

Referenced by draw().

◆ draw_closed_polygon()

◆ draw_closed_polygon_with_arrows()

template<class Poly >
void Eepic_Plane::draw_closed_polygon_with_arrows ( Poly poly,
std::ostream &  output 
)
inline

◆ draw_dash_segment()

◆ draw_dash_spline()

template<class Poly >
void Eepic_Plane::draw_dash_spline ( Poly poly,
std::ostream &  output 
)
inline

◆ draw_dash_spline_arrow()

template<class Poly >
void Eepic_Plane::draw_dash_spline_arrow ( Poly poly,
std::ostream &  output 
)
inline

◆ draw_dots_from_polygon()

◆ draw_dotted_closed_polygon()

template<class Poly >
void Eepic_Plane::draw_dotted_closed_polygon ( Poly poly,
std::ostream &  output 
)
inline

Definition at line 870 of file eepicgeom.H.

References dotgap, output, and point_string().

◆ draw_dotted_segment()

◆ draw_ellipse()

void Eepic_Plane::draw_ellipse ( const Ellipse e,
std::ostream &  output 
)
inline

◆ draw_point()

void Eepic_Plane::draw_point ( const Point p,
std::ostream &  output 
)
inline

EEPIC "primitive drawing" methods.

The draw() method of each Eepic_* wrapper may call one (or more) of these primitives. They are also callable by users (at their own risk).

This family of primitives assumes that the extreme points required to map geometric coordinates into EEPIC coordinates were already computed by compute_geom_plane(). Emit EEPIC code to draw point p into output.

Definition at line 644 of file eepicgeom.H.

References output, r, x_geom_number_to_eepic(), y, and y_geom_number_to_eepic().

Referenced by Eepic_Point::draw(), and draw_dots_from_polygon().

◆ draw_point_text()

void Eepic_Plane::draw_point_text ( const Point p,
std::ostream &  output 
)
inline

Definition at line 921 of file eepicgeom.H.

References output, r, x_geom_number_to_eepic(), y, and y_geom_number_to_eepic().

Referenced by draw_points_text_in_polygon().

◆ draw_points_text_in_polygon()

template<class Poly >
void Eepic_Plane::draw_points_text_in_polygon ( Poly poly,
std::ostream &  output 
)
inline

◆ draw_polygon()

◆ draw_segment()

void Eepic_Plane::draw_segment ( const Segment sg,
std::ostream &  output 
)
inline

◆ draw_spline()

template<class Poly >
void Eepic_Plane::draw_spline ( Poly poly,
std::ostream &  output 
)
inline

Definition at line 972 of file eepicgeom.H.

References output, and point_string().

Referenced by Eepic_Spline::draw(), Eepic_Thick_Spline::draw(), and draw_spline_arrow().

◆ draw_spline_arrow()

template<class Poly >
void Eepic_Plane::draw_spline_arrow ( Poly poly,
std::ostream &  output 
)
inline

◆ draw_text()

◆ draw_vertex_numbers_in_polygon()

template<class Poly >
void Eepic_Plane::draw_vertex_numbers_in_polygon ( Poly poly,
std::ostream &  output 
)
inline

◆ geom_number_to_plane()

double Eepic_Plane::geom_number_to_plane ( const Geom_Number p,
const Geom_Number geom_max,
const double max 
) const
inlineprivate

Rescales a coordinate value p from a geometric scale geom_max into the plane scale max.

Formula: result = p * max / geom_max

Definition at line 306 of file eepicgeom.H.

References geom_number_to_double(), Aleph::maps(), and max().

Referenced by h_geom_number_to_eepic(), v_geom_number_to_eepic(), x_geom_number_to_eepic(), and y_geom_number_to_eepic().

◆ get_dotgap()

double Eepic_Plane::get_dotgap ( ) const
inline

Return the dot gap used for dotted/dashed lines.

Definition at line 631 of file eepicgeom.H.

References dotgap.

◆ get_height()

const double & Eepic_Plane::get_height ( ) const
inline

Picture height (in EEPIC units).

Definition at line 526 of file eepicgeom.H.

References height.

Referenced by TEST_F(), and TEST_F().

◆ get_r()

const double & Eepic_Plane::get_r ( ) const
inline

Radius used to draw points (also used as text baseline offset).

Definition at line 535 of file eepicgeom.H.

References r.

◆ get_resolution()

const double & Eepic_Plane::get_resolution ( ) const
inline

Return the current output resolution in millimeters.

Definition at line 613 of file eepicgeom.H.

References resolution.

◆ get_shade_thickness()

double Eepic_Plane::get_shade_thickness ( ) const
inline

Return the current shading thickness.

Definition at line 628 of file eepicgeom.H.

References shade_thickness.

◆ get_wide()

const double & Eepic_Plane::get_wide ( ) const
inline

Plane accessors.

Picture width (in EEPIC units).

Definition at line 523 of file eepicgeom.H.

References wide.

Referenced by TEST_F(), and TEST_F().

◆ get_xoffset()

const double & Eepic_Plane::get_xoffset ( ) const
inline

X offset of the LaTeX picture environment.

Definition at line 532 of file eepicgeom.H.

References xoffset.

◆ get_yoffset()

const double & Eepic_Plane::get_yoffset ( ) const
inline

Y offset of the LaTeX picture environment.

Definition at line 529 of file eepicgeom.H.

References yoffset.

◆ h_geom_number_to_eepic()

double Eepic_Plane::h_geom_number_to_eepic ( const Geom_Number x) const
inline

Convert a geometric x proportion into plane units using wide.

Definition at line 338 of file eepicgeom.H.

References geom_number_to_plane(), geom_wide, and wide.

Referenced by compute_geom_plane(), and draw_ellipse().

◆ highest()

const Point & Eepic_Plane::highest ( ) const
inline

Definition at line 453 of file eepicgeom.H.

References __highest.

Referenced by TEST(), and TEST().

◆ leftmost()

const Point & Eepic_Plane::leftmost ( ) const
inline

Definition at line 449 of file eepicgeom.H.

References __leftmost.

Referenced by TEST(), TEST(), and TEST().

◆ lowest()

const Point & Eepic_Plane::lowest ( ) const
inline

Definition at line 455 of file eepicgeom.H.

References __lowest.

Referenced by TEST(), and TEST().

◆ point_string()

std::string Eepic_Plane::point_string ( const Point p)
inline

Given point p, returns "(x,y)" in normalized plane coordinates.

Definition at line 458 of file eepicgeom.H.

References x_geom_number_to_eepic(), y, and y_geom_number_to_eepic().

Referenced by draw(), draw_closed_polygon(), draw_dash_spline(), draw_dotted_closed_polygon(), and draw_spline().

◆ put()

void Eepic_Plane::put ( const Eepic_Geom_Object __eepic_geom_obj)
inline

Design note: why Eepic_Plane stores Eepic_Geom_Object wrappers.

Eepic_Plane stores objects of type Eepic_Geom_Object. However, the goal is to let users work directly with objects derived from Geom_Object.

One approach would be to make Geom_Object highly polymorphic (virtual clone, virtual draw, virtual extreme points). This header avoids that for two reasons:

  1. Geom_Object would become "coarse-grained": even small types like Point would pay the cost of a larger vtable (at least ~7 virtual methods).
  2. The required polymorphism depends on the rendering backend: drawing in EEPIC is not the same as drawing on a GUI canvas. Baking the rendering API into Geom_Object would not be general.

For that reason, this header defines an external helper: put_in_plane(plane, geom_obj), which:

  • wraps/clones geom_obj into its corresponding Eepic_* wrapper
  • inserts the wrapper into the plane

For implementation simplicity, the insertion primitive is public, but its intended usage is indirect (via put_in_plane()). Insert an already-wrapped EEPIC drawable into the plane.

This method clones the input object (polymorphic copy via clone()) and stores it in the plane. Typical usage is through the helper put_in_plane(plane, geom_obj) which builds the right wrapper type.

Parameters
__eepic_geom_objAn Eepic_Geom_Object wrapper to clone and store.

Definition at line 599 of file eepicgeom.H.

References Aleph::DynDlist< T >::append(), list, and Aleph::maps().

◆ put_cartesian_axis()

void Eepic_Plane::put_cartesian_axis ( )
inline

Enable drawing Cartesian axes when calling draw().

Definition at line 564 of file eepicgeom.H.

References with_cartesian_axis.

◆ rightmost()

const Point & Eepic_Plane::rightmost ( ) const
inline

Definition at line 451 of file eepicgeom.H.

References __rightmost.

Referenced by TEST(), TEST(), and TEST().

◆ set_fill_type()

void Eepic_Plane::set_fill_type ( const std::string &  ftype)
inline

Set the fill type used by LaTeX eepic (e.g., "black").

Definition at line 616 of file eepicgeom.H.

References fill_type, and Aleph::maps().

◆ set_resolution()

void Eepic_Plane::set_resolution ( const double res)
inline

Set the output resolution in millimeters (unitlength = res mm).

Definition at line 607 of file eepicgeom.H.

References Aleph::maps(), and resolution.

◆ set_shade_thickness()

void Eepic_Plane::set_shade_thickness ( const double __thickness)
inline

Set the thickness used for shaded primitives.

Definition at line 622 of file eepicgeom.H.

References Aleph::maps(), and shade_thickness.

◆ v_geom_number_to_eepic()

double Eepic_Plane::v_geom_number_to_eepic ( const Geom_Number y) const
inline

Convert a geometric y proportion into plane units using height.

Definition at line 344 of file eepicgeom.H.

References geom_height, geom_number_to_plane(), height, and y.

Referenced by compute_geom_plane(), and draw_ellipse().

◆ x_geom_number_to_eepic()

double Eepic_Plane::x_geom_number_to_eepic ( const Geom_Number x) const
inline

Convert a geometric x coordinate into plane x coordinate.

Definition at line 350 of file eepicgeom.H.

References geom_number_to_plane(), geom_wide, wide, and xpic().

Referenced by compute_geom_plane(), Eepic_Triangle::draw(), draw_ellipse(), draw_point(), draw_point_text(), draw_text(), draw_vertex_numbers_in_polygon(), and point_string().

◆ xpic()

double Eepic_Plane::xpic ( const double x) const
inlineprivate

Points must be normalized to the plane size (in picture coordinates).

These routines normalize a coordinate with respect to the origin (x or y axis). Normalize to x-axis origin.

Definition at line 325 of file eepicgeom.H.

References x_min.

Referenced by x_geom_number_to_eepic().

◆ y_geom_number_to_eepic()

double Eepic_Plane::y_geom_number_to_eepic ( const Geom_Number y) const
inline

Convert a geometric y coordinate into plane y coordinate.

Definition at line 356 of file eepicgeom.H.

References geom_height, geom_number_to_plane(), height, y, and ypic().

Referenced by compute_geom_plane(), Eepic_Triangle::draw(), draw_ellipse(), draw_point(), draw_point_text(), draw_text(), draw_vertex_numbers_in_polygon(), and point_string().

◆ ypic()

double Eepic_Plane::ypic ( const double y) const
inlineprivate

Normalize to y-axis origin.

Definition at line 331 of file eepicgeom.H.

References y, and y_min.

Referenced by y_geom_number_to_eepic().

◆ zoom()

void Eepic_Plane::zoom ( const double factor)
inline

Scale the EEPIC plane in real points (zoom in/out).

Definition at line 395 of file eepicgeom.H.

References ah_domain_error_if, height, and wide.

Referenced by generate_picture(), TEST_F(), TEST_F(), and TEST_F().

Member Data Documentation

◆ __highest

Point Eepic_Plane::__highest
private

Point with maximum y-coordinate.

Definition at line 278 of file eepicgeom.H.

Referenced by compute_extreme_points(), compute_geom_plane(), draw(), draw_cartesian_axis(), and highest().

◆ __leftmost

Point Eepic_Plane::__leftmost
private

Point with minimum x-coordinate.

Definition at line 276 of file eepicgeom.H.

Referenced by compute_extreme_points(), compute_geom_plane(), draw(), draw_cartesian_axis(), and leftmost().

◆ __lowest

Point Eepic_Plane::__lowest
private

Point with minimum y-coordinate.

Definition at line 279 of file eepicgeom.H.

Referenced by compute_extreme_points(), compute_geom_plane(), draw(), draw_cartesian_axis(), and lowest().

◆ __rightmost

Point Eepic_Plane::__rightmost
private

Point with maximum x-coordinate.

Definition at line 277 of file eepicgeom.H.

Referenced by compute_extreme_points(), compute_geom_plane(), draw(), draw_cartesian_axis(), and rightmost().

◆ arrow_lenght_in_mm

const double Eepic_Plane::arrow_lenght_in_mm = 1.5
static

Definition at line 686 of file eepicgeom.H.

◆ arrow_width_in_mm

const double Eepic_Plane::arrow_width_in_mm = 0.5
static

Definition at line 684 of file eepicgeom.H.

◆ default_r

const double Eepic_Plane::default_r = 20
staticprivate

Default radius for drawing points (also used for text height)

Definition at line 284 of file eepicgeom.H.

◆ default_shade_thickness

const double Eepic_Plane::default_shade_thickness = 200
staticprivate

Default shading thickness.

Definition at line 295 of file eepicgeom.H.

◆ dotgap

const double Eepic_Plane::dotgap = 65
staticprivate

Gap between dots in dotted lines.

Definition at line 299 of file eepicgeom.H.

Referenced by draw_dotted_closed_polygon(), and get_dotgap().

◆ fill_type

std::string Eepic_Plane::fill_type
private

Fill type for shapes (e.g., "black")

Definition at line 291 of file eepicgeom.H.

Referenced by draw(), and set_fill_type().

◆ geom_height

Geom_Number Eepic_Plane::geom_height
private

Height from lowest to highest point.

Definition at line 263 of file eepicgeom.H.

Referenced by compute_geom_plane(), v_geom_number_to_eepic(), and y_geom_number_to_eepic().

◆ geom_wide

Geom_Number Eepic_Plane::geom_wide
private

Width from leftmost to rightmost point.

Definition at line 262 of file eepicgeom.H.

Referenced by compute_geom_plane(), h_geom_number_to_eepic(), and x_geom_number_to_eepic().

◆ geom_x_min

Geom_Number Eepic_Plane::geom_x_min
private

Minimum x value in geometric coordinates.

Definition at line 267 of file eepicgeom.H.

Referenced by compute_geom_plane().

◆ geom_y_min

Geom_Number Eepic_Plane::geom_y_min
private

Minimum y value in geometric coordinates.

Definition at line 268 of file eepicgeom.H.

Referenced by compute_geom_plane().

◆ height

double Eepic_Plane::height
private

Height in resolution points.

Definition at line 253 of file eepicgeom.H.

Referenced by compute_geom_plane(), get_height(), v_geom_number_to_eepic(), y_geom_number_to_eepic(), and zoom().

◆ list

DynDlist<Eepic_Geom_Object *> Eepic_Plane::list
private

List of geometric objects.

Definition at line 265 of file eepicgeom.H.

Referenced by ~Eepic_Plane(), compute_extreme_points(), draw(), and put().

◆ normal_thickness

const double Eepic_Plane::normal_thickness = 20
staticprivate

Default line thickness.

Definition at line 294 of file eepicgeom.H.

◆ r

double Eepic_Plane::r
private

Actual radius in real points for drawing a point.

Definition at line 286 of file eepicgeom.H.

Referenced by draw_point(), draw_point_text(), draw_vertex_numbers_in_polygon(), and get_r().

◆ real_height

double Eepic_Plane::real_height = 0
private

Actual height after scaling.

Definition at line 257 of file eepicgeom.H.

Referenced by compute_geom_plane(), and draw().

◆ real_wide

double Eepic_Plane::real_wide = 0
private

Actual width after scaling.

Definition at line 256 of file eepicgeom.H.

Referenced by compute_geom_plane(), and draw().

◆ resolution

double Eepic_Plane::resolution
private

Resolution in millimeters (default: 0.05mm)

Definition at line 289 of file eepicgeom.H.

Referenced by draw(), get_resolution(), and set_resolution().

◆ shade_thickness

double Eepic_Plane::shade_thickness
private

Current shading thickness.

Definition at line 297 of file eepicgeom.H.

Referenced by get_shade_thickness(), and set_shade_thickness().

◆ shade_type

std::string Eepic_Plane::shade_type
private

Shading type for segments.

Definition at line 292 of file eepicgeom.H.

◆ wide

double Eepic_Plane::wide
private

Width in resolution points.

Definition at line 252 of file eepicgeom.H.

Referenced by compute_geom_plane(), get_wide(), h_geom_number_to_eepic(), x_geom_number_to_eepic(), and zoom().

◆ with_cartesian_axis

bool Eepic_Plane::with_cartesian_axis
private

Flag to draw Cartesian axes.

Definition at line 281 of file eepicgeom.H.

Referenced by draw_cartesian_axis(), and put_cartesian_axis().

◆ x_min

double Eepic_Plane::x_min
private

Minimum x value in plane coordinates.

Definition at line 272 of file eepicgeom.H.

Referenced by compute_geom_plane(), and xpic().

◆ xoffset

double Eepic_Plane::xoffset
private

Additional horizontal margin.

Definition at line 259 of file eepicgeom.H.

Referenced by draw(), and get_xoffset().

◆ y_min

double Eepic_Plane::y_min
private

Minimum y value in plane coordinates.

Definition at line 273 of file eepicgeom.H.

Referenced by compute_geom_plane(), and ypic().

◆ yoffset

double Eepic_Plane::yoffset
private

Additional vertical margin.

Definition at line 260 of file eepicgeom.H.

Referenced by draw(), and get_yoffset().


The documentation for this class was generated from the following files: