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

Set the line color on subsequent draw-related actions. More...

#include <CanvasAction.h>

Inheritance diagram for emp::web::CanvasStrokeColor:
emp::web::CanvasAction

Public Member Functions

 CanvasStrokeColor (const std::string &c)
 
void Apply ()
 Apply current action to emp_i.ctx. More...
 
CanvasActionClone () const
 Make a copy of the current action. 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

std::string color
 Color to use. More...
 

Detailed Description

Set the line color on subsequent draw-related actions.

Constructor & Destructor Documentation

emp::web::CanvasStrokeColor::CanvasStrokeColor ( const std::string &  c)
inline

Member Function Documentation

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

Apply current action to emp_i.ctx.

Implements emp::web::CanvasAction.

CanvasAction* emp::web::CanvasStrokeColor::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::CanvasAction::Stroke ( const std::string &  style = "")
inlineprotectedinherited

Helper function to set the stroke status.

Member Data Documentation

std::string emp::web::CanvasStrokeColor::color
protected

Color to use.


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