Empirical
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
emp::web::CanvasMultiLine Class Reference

#include <CanvasShape.h>

Inheritance diagram for emp::web::CanvasMultiLine:
emp::web::CanvasShape emp::web::CanvasAction

Public Member Functions

 CanvasMultiLine (double _x1, double _y1, const emp::vector< Point > &_points, const std::string &lc="", double lw=1.0)
 
 CanvasMultiLine (Point p1, const emp::vector< Point > &_points, const std::string &lc="", double lw=1.0)
 
void Apply ()
 Apply current action to emp_i.ctx. More...
 
CanvasActionClone () const
 Make a copy of the current action. More...
 
void MoveTo (Point _p)
 Shift the position of this shape to a point. More...
 
void MoveTo (double _x, double _y)
 Shift the position of this shape to coordinates. More...
 
void SetLineWidth (double lw=1.0)
 Setup details needed before drawing lines. More...
 
void SetFillColor (const std::string &color)
 Change the fill color of this shape. More...
 
void SetLineColor (const std::string &color)
 Change the stroke color of this shape. More...
 
void ApplyColor ()
 Actually change the color on screen. More...
 

Protected Member Functions

void Fill (const std::string &style="")
 Helper function to set the fill status. More...
 
void Stroke (const std::string &style="")
 Helper function to set the stroke status. More...
 
void LineWidth (double line_width=1.0)
 Helper function to set the stroke status. More...
 

Protected Attributes

Point p
 Anchor point for this shape. More...
 
std::string fill_color
 Internal color to fill shape with. More...
 
std::string line_color
 Border color for shape. More...
 
double line_width
 How wide should lines be? More...
 

Detailed Description

A whole series of line segments on the canvas. Currently not working...

Constructor & Destructor Documentation

emp::web::CanvasMultiLine::CanvasMultiLine ( double  _x1,
double  _y1,
const emp::vector< Point > &  _points,
const std::string &  lc = "",
double  lw = 1.0 
)
inline
emp::web::CanvasMultiLine::CanvasMultiLine ( Point  p1,
const emp::vector< Point > &  _points,
const std::string &  lc = "",
double  lw = 1.0 
)
inline

Member Function Documentation

void emp::web::CanvasMultiLine::Apply ( )
inlinevirtual

Apply current action to emp_i.ctx.

Implements emp::web::CanvasAction.

void emp::web::CanvasShape::ApplyColor ( )
inlineinherited

Actually change the color on screen.

CanvasAction* emp::web::CanvasMultiLine::Clone ( ) const
inlinevirtual

Make a copy of the current action.

Implements emp::web::CanvasAction.

void emp::web::CanvasAction::Fill ( const std::string &  style = "")
inlineprotectedinherited

Helper function to set the fill status.

void emp::web::CanvasAction::LineWidth ( double  line_width = 1.0)
inlineprotectedinherited

Helper function to set the stroke status.

void emp::web::CanvasShape::MoveTo ( Point  _p)
inlineinherited

Shift the position of this shape to a point.

void emp::web::CanvasShape::MoveTo ( double  _x,
double  _y 
)
inlineinherited

Shift the position of this shape to coordinates.

void emp::web::CanvasShape::SetFillColor ( const std::string &  color)
inlineinherited

Change the fill color of this shape.

void emp::web::CanvasShape::SetLineColor ( const std::string &  color)
inlineinherited

Change the stroke color of this shape.

void emp::web::CanvasShape::SetLineWidth ( double  lw = 1.0)
inlineinherited

Setup details needed before drawing lines.

void emp::web::CanvasAction::Stroke ( const std::string &  style = "")
inlineprotectedinherited

Helper function to set the stroke status.

Member Data Documentation

std::string emp::web::CanvasShape::fill_color
protectedinherited

Internal color to fill shape with.

std::string emp::web::CanvasShape::line_color
protectedinherited

Border color for shape.

double emp::web::CanvasShape::line_width
protectedinherited

How wide should lines be?

Point emp::web::CanvasShape::p
protectedinherited

Anchor point for this shape.


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