Commit 4ca18174 authored by Olivier Lagrasse's avatar Olivier Lagrasse
Browse files

- Resize SVG export.

- Add rule for the OpenGL render.
parent dfe854ea
......@@ -80,12 +80,11 @@ SET(VITE_HDRS
trace/DrawTree.hpp
trace/Trace.hpp
# Render headers
render/render.hpp
render/Render.hpp
render/Geometry.hpp
render/Hook_event.hpp
render/Render_opengl_dl.hpp
render/Render_opengl.hpp
render/render_svg.hpp
render/Render_svg.hpp
render/render_stats.hpp
render/render_stats_opengl.hpp
render/render_stats_svg.hpp
......@@ -161,8 +160,9 @@ SET(VITE_SRCS
# Render code files
render/Geometry.cpp
render/Hook_event.cpp
render/Render.hpp
render/Render_opengl.cpp
render/render_svg.cpp
render/Render_svg.cpp
render/render_stats_opengl.cpp
render/render_stats_svg.cpp
#render/vbo.cpp
......
......@@ -73,15 +73,21 @@
// const int Info::Core::_STATE_RENDER_DISPLAY_INFORMATION = 21;
// const int Info::Core::_STATE_RENDER_UPDATE = 22;
Element_pos Info::Container::x_min = 0;
Element_pos Info::Container::x_max = 0;
Element_pos Info::Container::y_min = 0;
Element_pos Info::Container::y_max = 0;
int Info::Screen::width = 800;
int Info::Screen::height = 600;
Element_pos Info::Container::x_min = 0;
Element_pos Info::Container::x_max = 0;
Element_pos Info::Container::y_min = 0;
Element_pos Info::Container::y_max = 0;
Element_pos Info::Entity::x_min = 0;
Element_pos Info::Entity::x_max = 0;
Element_pos Info::Entity::y_min = 0;
Element_pos Info::Entity::y_max = 0;
Element_pos Info::Entity::x_min = 0;
Element_pos Info::Entity::x_max = 0;
Element_pos Info::Entity::y_min = 0;
Element_pos Info::Entity::y_max = 0;
Element_pos Info::Render::width = 100; /* 100 OpenGL units for 1 pixel */
Element_pos Info::Render::height = 100; /* 100 OpenGL units for 1 pixel */
bool Info::Render::_key_alt = false;
bool Info::Render::_key_ctrl = false;
......@@ -95,5 +101,5 @@ Element_pos Info::Render::_info_accurate = 0.0;
bool Info::Render::_no_arrows = false;
bool Info::Render::_no_events = false;
QLabel* Info::Render::_ui_render_min_value = NULL;
QLabel* Info::Render::_ui_render_max_value = NULL;
QLabel* Info::Render::_ui_render_min_value = NULL;
QLabel* Info::Render::_ui_render_max_value = NULL;
......@@ -74,142 +74,20 @@ public:
/*!
* \brief Sub structure to store core system informations.
* \brief Sub structure to store screen informations.
*/
// struct Core{
// /*!
// * \brief Function pointer to the launch_action method of core system.
// */
// static void (Interface_console::* launch_action)(int, void*);
// /***********************************
// *
// * The command line parameter processing functions.
// *
// **********************************/
// /*!
// *\brief An error state.
// */
// static const int _STATE_UNKNOWN;
// /*!
// *\brief A state which corresponds to display a help text.
// */
// static const int _STATE_DISPLAY_HELP;
// /*!
// *\brief A state which corresponds to display the trace within a time.
// */
// static const int _STATE_IN_AN_INTERVAL; // 2^0
// /*!
// *\brief A state which corresponds to display a the ViTE window and opening a file.
// */
// static const int _STATE_OPEN_FILE; // 2^1
// /*!
// *\brief A state which corresponds to display the trace within a time.
// */
// static const int _STATE_OPEN_FILE_IN_AN_INTERVAL;
// /*!
// *\brief A state which corresponds to an export of file.
// */
// static const int _STATE_EXPORT_FILE; // 2^2
// /*!
// *\brief A state which corresponds to an export of file.
// */
// static const int _STATE_EXPORT_FILE_IN_INTERVAL;
// /*!
// *\brief A state which corresponds to release the OpenGL render area (display the wait screen).
// */
// static const int _STATE_RELEASE_RENDER_AREA;
// /*!
// *\brief A state which corresponds to change the render area translation.
// */
// static const int _STATE_RENDER_AREA_CHANGE_TRANSLATE;
// /*!
// *\brief A state which corresponds to change the render area scale.
// */
// static const int _STATE_RENDER_AREA_CHANGE_SCALE;
// /*!
// *\brief A state which corresponds to change the render area container/state scale.
// */
// static const int _STATE_RENDER_AREA_CHANGE_CONTAINER_SCALE;
// /*!
// *\brief Informs that a trace has to be parsed and displayed in the main window.
// */
// static const int _DRAW_OPENGL;
// /*!
// *\brief Informs that a trace has to be exported in svg format.
// */
// static const int _DRAW_SVG;
// /*!
// *\brief A state which corresponds to display the ViTE window.
// */
// static const int _STATE_LAUNCH_GRAPHICAL_INTERFACE;
// /*!
// *\brief A state which corresponds to replace the render area scale.
// */
// static const int _STATE_RENDER_AREA_REPLACE_SCALE;
// /*!
// *\brief A state which corresponds to replace the render area translate.
// */
// static const int _STATE_RENDER_AREA_REPLACE_TRANSLATE;
// /*!
// *\brief A state which corresponds to replace the render area translate.
// */
// static const int _STATE_RENDER_AREA_REPLACE_TRANSLATE_Y;
// /*!
// *\brief A state which corresponds to the registered render area translate.
// */
// static const int _STATE_RENDER_AREA_REGISTERED_TRANSLATE;
// /*!
// *\brief A state which corresponds to change the render area scale.
// */
// static const int _STATE_RENDER_AREA_CHANGE_SCALE_Y;
// /*!
// *\brief A state which corresponds to set new scroll bar length.
// */
// static const int _STATE_AJUST_SCROLL_BARS;
// /*!
// *\brief A state which corresponds to a scroll modification of the render area.
// */
// static const int _STATE_REFRESH_SCROLL_BARS;
// /*!
// *\brief Allow render area to change the graphical interface zoom box value.
// */
// static const int _STATE_ZOOM_BOX_VALUE;
// /*!
// *\brief Display information about a selected entity.
// */
// static const int _STATE_RENDER_DISPLAY_INFORMATION;
// /*!
// *\brief Update the render area.
// */
// static const int _STATE_RENDER_UPDATE;
// };
struct Screen{
/*!
* \brief The screen width. (in pixel)
*/
static int width;
/*!
* \brief The screen height. (in pixel)
*/
static int height;
};
/*!
......@@ -271,6 +149,16 @@ public:
*/
struct Render{
/*!
* \brief The render width. (no unit)
*/
static Element_pos width;
/*!
* \brief The render height. (no unit)
*/
static Element_pos height;
/*!
* \brief Contains the state of tke ALT key.
* true -> key pushed.
......
......@@ -62,7 +62,7 @@
#include "trace/Trace.hpp"
/* -- */
//#include "render/render.hpp"
#include "render/render_svg.hpp"
//#include "render/render_svg.hpp"
/* -- */
#include "statistics/Stats_window.hpp"
/* -- */
......
......@@ -74,20 +74,20 @@ Geometry::Geometry(){
_render_width = 100; /* 100 OpenGL units for the render scene width */
_render_height = 100; /* 100 OpenGL units for the render scene height */
// Info::Render::width = 100;
// Info::Render::height = 100; /* 100 OpenGL units for the render scene height */
_x_scale_container_state = 0.2;/* 20% of screen is used for containers then the other part for states */
_ruler_height = 4.0; /* height of the ruler */
_ruler_y = 0.0; /* highness of the ruler */
_default_entity_x_translate = 20;/* _render_width * _x_scale_container_state */
_default_entity_x_translate = 20;/* Info::Render::width * _x_scale_container_state */
_container_x_max = 0;
_container_y_max = 0;
_container_x_min = 0;
_container_y_min = 0;
/*Info::Container::x_max = 0;
Info::Container::y_max = 0;
Info::Container::x_min = 0;
Info::Container::y_min = 0;*/
_state_y_max = 0;
_state_y_min = 0;
......@@ -118,8 +118,8 @@ Geometry::Geometry(){
_z_state = -5.0;
/* Set in the child class */
_screen_width = 0;
_screen_height = 0;
// Info::Screen::width = 0;
//Info::Screen::height = 0;
}
......@@ -142,33 +142,33 @@ Geometry::~Geometry(){
Element_pos Geometry::screen_to_render_x(Element_pos e){
return e * (Element_pos)_render_width / (Element_pos)_screen_width;
return e * (Element_pos)Info::Render::width / (Element_pos)Info::Screen::width;
}
Element_pos Geometry::screen_to_render_y(Element_pos e){
return e * (Element_pos)_render_height / (Element_pos)_screen_height;
return e * (Element_pos)Info::Render::height / (Element_pos)Info::Screen::height;
}
Element_pos Geometry::render_to_trace_x(Element_pos e){
return (e - _default_entity_x_translate + _x_state_translate) *
(Info::Entity::x_max - Info::Entity::x_min) / ((_render_width - _default_entity_x_translate) * _x_state_scale);
(Info::Entity::x_max - Info::Entity::x_min) / ((Info::Render::width - _default_entity_x_translate) * _x_state_scale);
}
Element_pos Geometry::render_to_trace_y(Element_pos e){
return (e-_ruler_y-_ruler_height + _y_state_translate) *
(_container_y_max - _container_y_min) / ((_render_height - _ruler_height) * _y_state_scale);
(Info::Container::y_max - Info::Container::y_min) / ((Info::Render::height - _ruler_height) * _y_state_scale);
}
Element_pos Geometry::render_to_screen_x(Element_pos e){
return e * (Element_pos)_screen_width / (Element_pos)_render_width;
return e * (Element_pos)Info::Screen::width / (Element_pos)Info::Render::width;
}
Element_pos Geometry::render_to_screen_y(Element_pos e){
return e * (Element_pos)_screen_height / (Element_pos)_render_height;
return e * (Element_pos)Info::Screen::height / (Element_pos)Info::Render::height;
}
Element_pos Geometry::trace_to_render_x(Element_pos e){
......@@ -185,10 +185,10 @@ Element_pos Geometry::trace_to_render_y(Element_pos e){
Element_pos Geometry::coeff_trace_render_x(){
return ((_render_width-_default_entity_x_translate)*_x_state_scale) / (Info::Entity::x_max - Info::Entity::x_min);
return ((Info::Render::width-_default_entity_x_translate)*_x_state_scale) / (Info::Entity::x_max - Info::Entity::x_min);
}
Element_pos Geometry::coeff_trace_render_y(){
return ((_render_height-_ruler_height)*_y_state_scale) / (_container_y_max-_container_y_min);
return ((Info::Render::height-_ruler_height)*_y_state_scale) / (Info::Container::y_max - Info::Container::y_min);
}
......@@ -72,42 +72,42 @@ protected:
/*!
* \brief The opengl render area width in pixels.
*/
Element_pos _screen_width;
// Element_pos _screen_width;
/*!
* \brief The opengl render area height in pixels.
*/
Element_pos _screen_height;
// Element_pos _screen_height;
/*!
* \brief The opengl visibled scene width in the OpenGL units.
*/
Element_pos _render_width;
// Element_pos _render_width;
/*!
* \brief The opengl visibled scene height in the OpenGL units.
*/
Element_pos _render_height;
// Element_pos _render_height;
/*!
* \brief The width of container area draw.
*/
Element_pos _container_x_max;
// Element_pos _container_x_max;
/*!
* \brief The height of container area draw.
*/
Element_pos _container_y_max;
// Element_pos _container_y_max;
/*!
* \brief The x base of container area draw.
*/
Element_pos _container_x_min;
// Element_pos _container_x_min;
/*!
* \brief The y base of container area draw.
*/
Element_pos _container_y_min;
//Element_pos _container_y_min;
/*!
* \brief The width of state area draw.
......
......@@ -116,8 +116,8 @@ Hook_event::Hook_event(Render_opengl* render_instance, Core* core, QWidget *pare
/* init main informations about OpenGL scene and QGLWidget size */
_screen_width = width(); /* get the QGLWidget visibled width (in pixel) */
_screen_height = height(); /* get the QGLWidget visibled height (in pixel) */
Info::Screen::width = width(); /* get the QGLWidget visibled width (in pixel) */
Info::Screen::height = height(); /* get the QGLWidget visibled height (in pixel) */
_ruler_distance = 5;
......@@ -253,8 +253,8 @@ void Hook_event::mouseDoubleClickEvent ( QMouseEvent * event ){
/*
* Now determine where the user had clicked
*/
x_click = _mouse_x * (Element_pos)_render_width/(Element_pos)_screen_width;/* x position of the click in the OpenGL scene */
y_click = _mouse_y * (Element_pos)_render_height/(Element_pos)_screen_height;/* y position of the click in the OpenGL scene */
x_click = _mouse_x * (Element_pos)Info::Render::width/(Element_pos)Info::Screen::width;/* x position of the click in the OpenGL scene */
y_click = _mouse_y * (Element_pos)Info::Render::height/(Element_pos)Info::Screen::height;/* y position of the click in the OpenGL scene */
/*
* First, check the y position if user clicks on the ruler or other
......@@ -264,12 +264,12 @@ void Hook_event::mouseDoubleClickEvent ( QMouseEvent * event ){
/* Work out the y value in Data Structure coordinates */
y_result = y_click-(_ruler_y+_ruler_height) + _y_state_translate;
y_result *= (_container_y_max-_container_y_min)/((_render_height-_ruler_height)*_y_state_scale);
y_result *= (Info::Container::y_max-Info::Container::y_min)/((Info::Render::height-_ruler_height)*_y_state_scale);
/*
* Second, check the x position if user click on the container or other
*/
if (x_click <= (_x_scale_container_state*_render_width) ){/* user had clicked on the container */
if (x_click <= (_x_scale_container_state*Info::Render::width) ){/* user had clicked on the container */
return;
}
else{
......@@ -284,14 +284,14 @@ void Hook_event::mouseDoubleClickEvent ( QMouseEvent * event ){
x_result = (x_click - _default_entity_x_translate + _x_state_translate);
/*
* To convert from [0;_render_width*_state_scale] to [_state_x_min;_state_x_max]
* To convert from [0;Info::Render::width*_state_scale] to [_state_x_min;_state_x_max]
*/
// x_result *= (_state_x_max - _state_x_min)/((_render_width-_default_entity_x_translate)*_x_state_scale);
// x_result *= (_state_x_max - _state_x_min)/((Info::Render::width-_default_entity_x_translate)*_x_state_scale);
x_result /= coeff_trace_render_x();
Info::Render::_info_x = x_result;
Info::Render::_info_y = y_result;
Info::Render::_info_accurate = 1/coeff_trace_render_x();//(_state_x_max - _state_x_min)/((_render_width-_default_entity_x_translate)*_x_state_scale);//_state_x_max/_render_width;
Info::Render::_info_accurate = 1/coeff_trace_render_x();//(_state_x_max - _state_x_min)/((Info::Render::width-_default_entity_x_translate)*_x_state_scale);//_state_x_max/Info::Render::width;
_core->launch_action(_core->_STATE_RENDER_DISPLAY_INFORMATION, NULL);
}/* end else of if (x_click...) */
......@@ -395,7 +395,7 @@ void Hook_event::apply_zoom_box(Element_pos x_min, Element_pos x_max, Element_po
* of the render area. Idem for the right, the top and the bottom.
*
* Thus, we need to know the difference the scale between the rectangle width and height and the render area width and height.
* Results are given by the scale: _screen_width/(x_max - x_min) for the horizontal dimension.
* Results are given by the scale: Info::Screen::width/(x_max - x_min) for the horizontal dimension.
*
* Then, our selection rectangle is scaled. Nevertheless, it should not be centered inside the render area. So, we work out
* the correct x and y translation to make both the render area middle and the selection rectangle middle fit.
......@@ -419,16 +419,16 @@ void Hook_event::apply_zoom_box(Element_pos x_min, Element_pos x_max, Element_po
*
* Work out the new selection middle position after applying the scale.
*/
x_scaled_middle_selection = (x_middle_selection + _x_state_translate /*- _default_entity_x_translate*/)*(_screen_width/((x_max - x_min)));
y_scaled_middle_selection = (y_middle_selection + _y_state_translate /*- _ruler_height*/ )*(_screen_height/((y_max - y_min)));
x_scaled_middle_selection = (x_middle_selection + _x_state_translate /*- _default_entity_x_translate*/)*(Info::Screen::width/((x_max - x_min)));
y_scaled_middle_selection = (y_middle_selection + _y_state_translate /*- _ruler_height*/ )*(Info::Screen::height/((y_max - y_min)));
/*
* 2nd step:
*
* Work out the distance between the state origin and the render area middle (_render_width/2).
* Work out the distance between the state origin and the render area middle (Info::Render::width/2).
*/
x_distance_between_state_origin_and_render_middle = _x_state_translate /*- _default_entity_x_translate*/ + _render_width/2;
y_distance_between_state_origin_and_render_middle = _y_state_translate /*- _ruler_height*/ + _render_height/2;
x_distance_between_state_origin_and_render_middle = _x_state_translate /*- _default_entity_x_translate*/ + Info::Render::width/2;
y_distance_between_state_origin_and_render_middle = _y_state_translate /*- _ruler_height*/ + Info::Render::height/2;
/*
* 3rd step:
......@@ -446,12 +446,12 @@ void Hook_event::apply_zoom_box(Element_pos x_min, Element_pos x_max, Element_po
/* NOTE: do not use replace_scale() because the translate will be also modified */
int buf;
_x_state_scale *= _screen_width/(x_max - x_min);
_x_state_scale *= Info::Screen::width/(x_max - x_min);
buf = (int)(100*_x_state_scale);
_core->launch_action(_core->_STATE_ZOOM_BOX_VALUE, &buf);
_y_state_scale *= _screen_height/(y_max - y_min);
_y_state_scale *= Info::Screen::height/(y_max - y_min);
_mouse_pressed = false;
_render_instance->updateGL();
......@@ -523,18 +523,18 @@ void Hook_event::keyPressEvent(QKeyEvent * event) {
* Key 'Page Up' pressed.
*/
if (true == Info::Render::_key_alt)
change_translate_y(-(int)_render_height);
change_translate_y(-(int)Info::Render::height);
else
change_translate((int)_render_width);
change_translate((int)Info::Render::width);
break;
case Qt::Key_PageDown:
/*
* Key 'Page Down' pressed.
*/
if (true == Info::Render::_key_alt)
change_translate_y((int)_render_height);
change_translate_y((int)Info::Render::height);
else
change_translate(-(int)_render_width);
change_translate(-(int)Info::Render::width);
break;
default:
......@@ -598,7 +598,7 @@ void Hook_event::replace_scale(Element_pos new_scale){
* Finally, translate the result.
*
*/
_x_state_translate += ( _x_state_translate - _default_entity_x_translate + (Element_pos)_render_width/2.0) * ((new_scale)/(_x_state_scale) - 1);
_x_state_translate += ( _x_state_translate - _default_entity_x_translate + (Element_pos)Info::Render::width/2.0) * ((new_scale)/(_x_state_scale) - 1);
_x_state_scale = new_scale;
buf = (int)(100*_x_state_scale);
......@@ -622,7 +622,7 @@ void Hook_event::replace_scale_y(Element_pos new_scale){
* Finally, translate the result.
*
*/
_y_state_translate += ( _y_state_translate - _ruler_height + (Element_pos)_render_height/2.0) * ((new_scale)/(_y_state_scale) - 1);
_y_state_translate += ( _y_state_translate - _ruler_height + (Element_pos)Info::Render::height/2.0) * ((new_scale)/(_y_state_scale) - 1);
_y_state_scale = new_scale;
/* TODO add a zoom box value for y zoom */
......@@ -682,21 +682,21 @@ void Hook_event::registered_translate(int id){
switch (id){
case Info::Render::X_TRACE_BEGINNING:/* show the beginning entities */
_x_state_translate = _default_entity_x_translate - (Element_pos)_render_width/2.0;
_x_state_translate = _default_entity_x_translate - (Element_pos)Info::Render::width/2.0;
break;
case Info::Render::Y_TRACE_BEGINNING:/* show the beginning entities */
_y_state_translate = (Element_pos)_render_height/2.0 - _ruler_height;
_y_state_translate = (Element_pos)Info::Render::height/2.0 - _ruler_height;
break;
case Info::Render::X_TRACE_ENDING:/* show the ending entities */
// _x_state_translate = (_default_entity_x_translate - (Element_pos)_render_width/2.0 + _state_x_max*_x_state_scale
// *((_render_width-_default_entity_x_translate)/(_state_x_max-_state_x_min)));
_x_state_translate = (_default_entity_x_translate - (Element_pos)_render_width/2.0 + Info::Entity::x_max*coeff_trace_render_x());//_x_state_scale
// *((_render_width-_default_entity_x_translate)/(_state_x_max-_state_x_min)));
// _x_state_translate = (_default_entity_x_translate - (Element_pos)Info::Render::width/2.0 + _state_x_max*_x_state_scale
// *((Info::Render::width-_default_entity_x_translate)/(_state_x_max-_state_x_min)));
_x_state_translate = (_default_entity_x_translate - (Element_pos)Info::Render::width/2.0 + Info::Entity::x_max*coeff_trace_render_x());//_x_state_scale
// *((Info::Render::width-_default_entity_x_translate)/(_state_x_max-_state_x_min)));
break;
case Info::Render::Y_TRACE_ENDING:/* show the ending entities */
_y_state_translate = ( -_ruler_height + (Element_pos)_render_height/2.0 - _state_y_max*_y_state_scale
*((_render_height-_ruler_height)/(_state_y_max-_state_y_min)));
_y_state_translate = ( -_ruler_height + (Element_pos)Info::Render::height/2.0 - _state_y_max*_y_state_scale
*((Info::Render::height-_ruler_height)/(_state_y_max-_state_y_min)));
break;
case Info::Render::X_TRACE_ENTIRE:/* show the entire entities */
// replace_translate(0);//_x_state_translate = 0;
......@@ -738,8 +738,8 @@ void Hook_event::change_scale_container_state(int view_size){
}
void Hook_event::update_visible_interval_value(){
Info::Render::_x_min_visible = max(Info::Entity::x_min, (_x_state_translate - _default_entity_x_translate)/coeff_trace_render_x());//(_x_state_scale*((_render_width-_default_entity_x_translate)/(_state_x_max-_state_x_min)) ));
Info::Render::_x_max_visible = min(Info::Entity::x_max, (_x_state_translate - _default_entity_x_translate + _render_width)/coeff_trace_render_x());///(_x_state_scale*((_render_width-_default_entity_x_translate)/(_state_x_max-_state_x_min)) ));
Info::Render::_x_min_visible = max(Info::Entity::x_min, (_x_state_translate - _default_entity_x_translate)/coeff_trace_render_x());//(_x_state_scale*((Info::Render::width-_default_entity_x_translate)/(_state_x_max-_state_x_min)) ));
Info::Render::_x_max_visible = min(Info::Entity::x_max, (_x_state_translate - _default_entity_x_translate + Info::Render::width)/coeff_trace_render_x());///(_x_state_scale*((Info::Render::width-_default_entity_x_translate)/(_state_x_max-_state_x_min)) ));
}
......@@ -758,34 +758,34 @@ void Hook_event::update_visible_interval_value(){
Element_pos Hook_event::screen_to_render_x(Element_pos e){
return e * (Element_pos)_render_width / (Element_pos)_screen_width;
return e * (Element_pos)Info::Render::width / (Element_pos)Info::Screen::width;
}
Element_pos Hook_event::screen_to_render_y(Element_pos e){
return e * (Element_pos)_render_height / (Element_pos)_screen_height;
return e * (Element_pos)Info::Render::height / (Element_pos)Info::Screen::height;
}
Element_pos Hook_event::render_to_trace_x(Element_pos e){
return (e - _default_entity_x_translate + _x_state_translate) *
(_state_x_max - _state_x_min) / ((_render_width - _default_entity_x_translate) * _x_state_scale);
(_state_x_max - _state_x_min) / ((Info::Render::width - _default_entity_x_translate) * _x_state_scale);
}
Element_pos Hook_event::render_to_trace_y(Element_pos e){
return (e-_ruler_y-_ruler_height + _y_state_translate) *
(_container_y_max - _container_y_min) / ((_render_height - _ruler_height) * _y_state_scale);
(Info::Container::y_max - Info::Container::y_min) / ((Info::Render::height - _ruler_height) * _y_state_scale);
}
Element_pos Hook_event::render_to_screen_x(Element_pos e){
return e * (Element_pos)_screen_width / (Element_pos)_render_width;
return e * (Element_pos)Info::Screen::width / (Element_pos)Info::Render::width;
}
Element_pos Hook_event::render_to_screen_y(Element_pos e){
return e * (Element_pos)_screen_height / (Element_pos)_render_height;
return e * (Element_pos)Info::Screen::height / (Element_pos)Info::Render::height;