Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
a5578fdf
Commit
a5578fdf
authored
May 08, 2016
by
Hans-Christian Ebke
Browse files
Replaces C++11's std::round. Fixed typo.
parent
6bf233e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
widgets/coreWidget/viewerControl.cc
View file @
a5578fdf
...
...
@@ -67,6 +67,7 @@
#endif
#include
<OpenFlipper/widgets/snapshotDialog/SnapshotDialog.hh>
#include
<cmath>
//== IMPLEMENTATION ==========================================================
...
...
@@ -541,7 +542,7 @@ void CoreWidget::applicationSnapshot() {
writeImageAsynchronously
(
pic
,
suggestSnapshotFilename
(
snapshotName_
));
}
void
CoreWidget
::
viewerSnapshot
(
QString
file_ame
,
bool
store_comments
,
void
CoreWidget
::
viewerSnapshot
(
QString
file_
n
ame
,
bool
store_comments
,
bool
comments_visible_only
,
bool
comments_targeted_only
,
bool
store_material_info
,
int
snapshot_width
,
int
snapshot_height
,
bool
snapshot_transparent
,
bool
hide_coord_sys
,
...
...
@@ -550,7 +551,7 @@ void CoreWidget::viewerSnapshot(QString file_ame, bool store_comments,
if
(
snapshot_height
<
0
)
{
int
w
=
glView_
->
width
();
int
h
=
glView_
->
height
();
snapshot_height
=
static_cast
<
int
>
(
std
::
round
(
snapshot_height
=
static_cast
<
int
>
(
round
(
static_cast
<
double
>
(
snapshot_width
)
/
w
*
h
));
}
...
...
@@ -603,7 +604,7 @@ void CoreWidget::viewerSnapshot(QString file_ame, bool store_comments,
examiner_widgets_
[
PluginFunctions
::
activeExaminer
()]
->
encodeView
(
view
,
window_size
,
splitter_size
);
finalImage
.
setText
(
"View"
,
view
);
}
finalImage
.
save
(
file_ame
);
finalImage
.
save
(
file_
n
ame
);
break
;
}
...
...
@@ -639,7 +640,7 @@ void CoreWidget::viewerSnapshot(QString file_ame, bool store_comments,
if
(
!
comments
.
isEmpty
())
finalImage
.
setText
(
"Mesh Comments"
,
comments
);
finalImage
.
save
(
file_ame
);
finalImage
.
save
(
file_
n
ame
);
break
;
}
...
...
@@ -688,7 +689,7 @@ void CoreWidget::viewerSnapshot(QString file_ame, bool store_comments,
if
(
!
comments
.
isEmpty
())
finalImage
.
setText
(
"Mesh Comments"
,
comments
);
finalImage
.
save
(
file_ame
);
finalImage
.
save
(
file_
n
ame
);
break
;
}
...
...
@@ -735,7 +736,7 @@ void CoreWidget::viewerSnapshot(QString file_ame, bool store_comments,
if
(
!
comments
.
isEmpty
())
finalImage
.
setText
(
"Mesh Comments"
,
comments
);
finalImage
.
save
(
file_ame
);
finalImage
.
save
(
file_
n
ame
);
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment