Euphoria
eu::core::Canvas Struct Reference

hacky layer between something that looks like the html 'canvas rendering context 2d' and the euphoria image drawing operations https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D More...

#include <image_canvas.h>

Public Member Functions

 Canvas (Image *i)
 
void translate (float x, float y)
 
void rotate (float r)
 
void begin_path ()
 
void close_path ()
 
void move_to (float x, float y)
 
void draw_line_to (float dx, float dy)
 should be named line_to but that name is horrible More...
 
vec2f transform_position (const vec2f &v) const
 
void fill_rect (int x, int y, int w, int h) const
 
void fill () const
 

Public Attributes

Rgbi fill_style
 
Imagetarget_image
 
mat3f transform
 
bool building_path
 
std::vector< vec2fpath
 

Detailed Description

hacky layer between something that looks like the html 'canvas rendering context 2d' and the euphoria image drawing operations https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D

Definition at line 15 of file image_canvas.h.

Constructor & Destructor Documentation

◆ Canvas()

eu::core::Canvas::Canvas ( Image i)

Definition at line 28 of file image_canvas.cc.

Member Function Documentation

◆ begin_path()

void eu::core::Canvas::begin_path ( )

Definition at line 67 of file image_canvas.cc.

◆ close_path()

void eu::core::Canvas::close_path ( )

Definition at line 75 of file image_canvas.cc.

◆ draw_line_to()

void eu::core::Canvas::draw_line_to ( float  dx,
float  dy 
)

should be named line_to but that name is horrible

Definition at line 90 of file image_canvas.cc.

◆ fill()

void eu::core::Canvas::fill ( ) const

Definition at line 101 of file image_canvas.cc.

◆ fill_rect()

void eu::core::Canvas::fill_rect ( int  x,
int  y,
int  w,
int  h 
) const

Definition at line 37 of file image_canvas.cc.

◆ move_to()

void eu::core::Canvas::move_to ( float  x,
float  y 
)

Definition at line 82 of file image_canvas.cc.

◆ rotate()

void eu::core::Canvas::rotate ( float  r)

Definition at line 61 of file image_canvas.cc.

◆ transform_position()

vec2f eu::core::Canvas::transform_position ( const vec2f v) const

Definition at line 18 of file image_canvas.cc.

◆ translate()

void eu::core::Canvas::translate ( float  x,
float  y 
)

Definition at line 54 of file image_canvas.cc.

Member Data Documentation

◆ building_path

bool eu::core::Canvas::building_path

Definition at line 20 of file image_canvas.h.

◆ fill_style

Rgbi eu::core::Canvas::fill_style

Definition at line 17 of file image_canvas.h.

◆ path

std::vector<vec2f> eu::core::Canvas::path

Definition at line 21 of file image_canvas.h.

◆ target_image

Image* eu::core::Canvas::target_image

Definition at line 18 of file image_canvas.h.

◆ transform

mat3f eu::core::Canvas::transform

Definition at line 19 of file image_canvas.h.


The documentation for this struct was generated from the following files: