Empirical
|
Base class to maintain canvas actions. More...
#include <CanvasAction.h>
Public Member Functions | |
CanvasAction () | |
CanvasAction (const CanvasAction &) | |
virtual | ~CanvasAction () |
virtual void | Apply ()=0 |
Apply current action to emp_i.ctx. More... | |
virtual CanvasAction * | Clone () const =0 |
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... | |
Base class to maintain canvas actions.
|
inline |
|
inline |
|
inlinevirtual |
|
pure virtual |
Apply current action to emp_i.ctx.
Implemented in emp::web::CanvasText, emp::web::CanvasMultiLine, emp::web::CanvasLine, emp::web::CanvasPolygon, emp::web::CanvasImage, emp::web::CanvasClearRect, emp::web::CanvasFont, emp::web::CanvasRect, emp::web::CanvasRotate, emp::web::CanvasCircle, and emp::web::CanvasStrokeColor.
|
pure virtual |
Make a copy of the current action.
Implemented in emp::web::CanvasText, emp::web::CanvasMultiLine, emp::web::CanvasLine, emp::web::CanvasPolygon, emp::web::CanvasImage, emp::web::CanvasClearRect, emp::web::CanvasFont, emp::web::CanvasRect, emp::web::CanvasRotate, emp::web::CanvasCircle, and emp::web::CanvasStrokeColor.
|
inlineprotected |
Helper function to set the fill status.
|
inlineprotected |
Helper function to set the stroke status.
|
inlineprotected |
Helper function to set the stroke status.