Track a rectangle shape to be drawn on a canvas.
More...
#include <CanvasShape.h>
|
| CanvasRect (Point _p, double _w, double _h, const std::string &fc="", const std::string &lc="") |
|
| CanvasRect (double _x, double _y, double _w, double _h, const std::string &fc="", const std::string &lc="") |
|
void | Apply () |
| Apply current action to emp_i.ctx. More...
|
|
CanvasAction * | Clone () 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...
|
|
|
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...
|
|
Track a rectangle shape to be drawn on a canvas.
emp::web::CanvasRect::CanvasRect |
( |
Point |
_p, |
|
|
double |
_w, |
|
|
double |
_h, |
|
|
const std::string & |
fc = "" , |
|
|
const std::string & |
lc = "" |
|
) |
| |
|
inline |
emp::web::CanvasRect::CanvasRect |
( |
double |
_x, |
|
|
double |
_y, |
|
|
double |
_w, |
|
|
double |
_h, |
|
|
const std::string & |
fc = "" , |
|
|
const std::string & |
lc = "" |
|
) |
| |
|
inline |
void emp::web::CanvasRect::Apply |
( |
| ) |
|
|
inlinevirtual |
void emp::web::CanvasShape::ApplyColor |
( |
| ) |
|
|
inlineinherited |
Actually change the color on screen.
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.
std::string emp::web::CanvasShape::fill_color |
|
protectedinherited |
Internal color to fill shape with.
std::string emp::web::CanvasShape::line_color |
|
protectedinherited |
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: