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

Change the default font to be used. More...

#include <CanvasAction.h>

Inheritance diagram for emp::web::CanvasImage:
emp::web::CanvasAction

Public Member Functions

 CanvasImage (const RawImage &raw_image, double _x=0.0, double _y=0.0, double _w=0.0, double _h=0.0)
 
 CanvasImage (const RawImage &raw_image, Point _p, double _w=0.0, double _h=0.0)
 
 CanvasImage (const std::string &url, double _x=0.0, double _y=0.0, double _w=0.0, double _h=0.0)
 
 CanvasImage (const std::string &url, Point _p, double _w=0.0, double _h=0.0)
 
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

RawImage image
 
Point position
 
double width
 
double height
 

Detailed Description

Change the default font to be used.

Constructor & Destructor Documentation

emp::web::CanvasImage::CanvasImage ( const RawImage raw_image,
double  _x = 0.0,
double  _y = 0.0,
double  _w = 0.0,
double  _h = 0.0 
)
inline
emp::web::CanvasImage::CanvasImage ( const RawImage raw_image,
Point  _p,
double  _w = 0.0,
double  _h = 0.0 
)
inline
emp::web::CanvasImage::CanvasImage ( const std::string &  url,
double  _x = 0.0,
double  _y = 0.0,
double  _w = 0.0,
double  _h = 0.0 
)
inline
emp::web::CanvasImage::CanvasImage ( const std::string &  url,
Point  _p,
double  _w = 0.0,
double  _h = 0.0 
)
inline

Member Function Documentation

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

Apply current action to emp_i.ctx.

Implements emp::web::CanvasAction.

CanvasAction* emp::web::CanvasImage::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

double emp::web::CanvasImage::height
protected
RawImage emp::web::CanvasImage::image
protected
Point emp::web::CanvasImage::position
protected
double emp::web::CanvasImage::width
protected

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