mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Plot the Temperature Text.
I Moved the 'plot text' method of the Old Graphics to the new layout - this one was mostly unchanged as it was already good as is. And used the TemperatureProfileItem to also display texts. This was the first implementation of the new system that uses *less* code than the original one, wich makes me happy. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4ff73cf537
commit
35979537d9
5 changed files with 96 additions and 21 deletions
|
@ -38,12 +38,6 @@ static struct graphics_context last_gc;
|
|||
static double plot_scale = SCALE_SCREEN;
|
||||
#endif
|
||||
|
||||
struct text_render_options {
|
||||
double size;
|
||||
color_indice_t color;
|
||||
double hpos, vpos;
|
||||
};
|
||||
|
||||
extern struct ev_select *ev_namelist;
|
||||
extern int evn_allocated;
|
||||
extern int evn_used;
|
||||
|
@ -436,24 +430,25 @@ void ProfileGraphicsView::plot(struct dive *d, bool forceRedraw)
|
|||
scene()->addItem(rect);
|
||||
|
||||
/* Depth profile */
|
||||
plot_depth_profile();
|
||||
plot_events(dc);
|
||||
plot_depth_profile(); // TODO: PARTIALLY PORTED.
|
||||
plot_events(dc); // PORTED
|
||||
|
||||
if (rulerEnabled && !printMode)
|
||||
if (rulerEnabled && !printMode) // TODO: NOT PORTED.
|
||||
create_ruler();
|
||||
|
||||
/* Temperature profile */
|
||||
plot_temperature_profile();
|
||||
plot_temperature_profile(); // PORTED
|
||||
|
||||
/* Cylinder pressure plot */
|
||||
plot_cylinder_pressure();
|
||||
plot_cylinder_pressure(); // PORTED
|
||||
|
||||
/* Text on top of all graphs.. */
|
||||
/* Text on top of all graphs.. */ // TODO: NOT PORTED, ANY TEXT.
|
||||
plot_temperature_text();
|
||||
plot_depth_text();
|
||||
plot_cylinder_pressure_text();
|
||||
plot_deco_text();
|
||||
|
||||
// NOT PORTED.
|
||||
/* Put the dive computer name in the lower left corner */
|
||||
gc.leftx = 0; gc.rightx = 1.0;
|
||||
gc.topy = 0; gc.bottomy = 1.0;
|
||||
|
@ -463,11 +458,13 @@ void ProfileGraphicsView::plot(struct dive *d, bool forceRedraw)
|
|||
// The Time ruler should be right after the DiveComputer:
|
||||
timeMarkers->setPos(0, diveComputer->y());
|
||||
|
||||
// NOT PORTED.
|
||||
if (PP_GRAPHS_ENABLED) {
|
||||
plot_pp_gas_profile();
|
||||
plot_pp_text();
|
||||
}
|
||||
|
||||
// NOT PORTED.
|
||||
plot_depth_scale();
|
||||
|
||||
#if 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue