Euphoria
eu::window::Canvas Struct Reference

#include <canvas.h>

Public Member Functions

void begin (const CanvasConfig &cc)
 
void end (const CanvasConfig &cc)
 
void show_grid (const CanvasConfig &cc) const
 
void draw_vertical_line (float rx, ImU32 grid_color) const
 
void draw_horizontal_line (float ry, ImU32 grid_color) const
 
void show_ruler (float ruler_interval, ImU32 ruler_color, float length) const
 
void show_ruler (const CanvasConfig &cc) const
 
ImVec2 from_world_to_screen (const ImVec2 &v) const
 
ImVec2 from_world_to_screen_size (const ImVec2 &v) const
 
ImVec2 from_screen_to_world (const ImVec2 &v) const
 
ImVec2 get_mouse () const
 

Public Attributes

core::CanvasLogic view
 
ImVec2 position = ImVec2 {0, 0}
 

Detailed Description

Definition at line 17 of file canvas.h.

Member Function Documentation

◆ begin()

void eu::window::Canvas::begin ( const CanvasConfig cc)

Definition at line 107 of file canvas.cc.

◆ draw_horizontal_line()

void eu::window::Canvas::draw_horizontal_line ( float  ry,
ImU32  grid_color 
) const

Definition at line 56 of file canvas.cc.

◆ draw_vertical_line()

void eu::window::Canvas::draw_vertical_line ( float  rx,
ImU32  grid_color 
) const

Definition at line 42 of file canvas.cc.

◆ end()

void eu::window::Canvas::end ( const CanvasConfig cc)

Definition at line 145 of file canvas.cc.

◆ from_screen_to_world()

ImVec2 eu::window::Canvas::from_screen_to_world ( const ImVec2 &  v) const

Definition at line 169 of file canvas.cc.

◆ from_world_to_screen()

ImVec2 eu::window::Canvas::from_world_to_screen ( const ImVec2 &  v) const

Definition at line 157 of file canvas.cc.

◆ from_world_to_screen_size()

ImVec2 eu::window::Canvas::from_world_to_screen_size ( const ImVec2 &  v) const

Definition at line 163 of file canvas.cc.

◆ get_mouse()

ImVec2 eu::window::Canvas::get_mouse ( ) const

Definition at line 175 of file canvas.cc.

◆ show_grid()

void eu::window::Canvas::show_grid ( const CanvasConfig cc) const

Definition at line 13 of file canvas.cc.

◆ show_ruler() [1/2]

void eu::window::Canvas::show_ruler ( const CanvasConfig cc) const

Definition at line 101 of file canvas.cc.

◆ show_ruler() [2/2]

void eu::window::Canvas::show_ruler ( float  ruler_interval,
ImU32  ruler_color,
float  length 
) const

Definition at line 70 of file canvas.cc.

Member Data Documentation

◆ position

ImVec2 eu::window::Canvas::position = ImVec2 {0, 0}

Definition at line 20 of file canvas.h.

◆ view

core::CanvasLogic eu::window::Canvas::view

Definition at line 19 of file canvas.h.


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