Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
solverstack
vite
Commits
632e18ad
Commit
632e18ad
authored
Feb 28, 2018
by
Mathieu Faverge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Limit the zoom inside the box
parent
ea825ae7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
plugins/MatrixVisualizer/Common/Zooming.cpp
plugins/MatrixVisualizer/Common/Zooming.cpp
+6
-3
No files found.
plugins/MatrixVisualizer/Common/Zooming.cpp
View file @
632e18ad
...
...
@@ -95,6 +95,7 @@ void Zooming::move(double xStart, double xEnd, double yStart, double yEnd)
int
xEnd
=
(
cblk
->
m_lcolnum
-
startCol
)
*
xCoeff
;
xEnd
=
(
xEnd
>
x
+
1
)
?
xEnd
:
x
+
1
;
float
cblk_color
=
cblk
->
m_color
;
blok
=
m_matrix
->
m_bloktab
+
fbloknum
;
for
(
j
=
fbloknum
;
j
<
lbloknum
;
++
j
,
blok
++
)
...
...
@@ -111,11 +112,13 @@ void Zooming::move(double xStart, double xEnd, double yStart, double yEnd)
yEnd
=
(
yEnd
>
y
+
1
)
?
yEnd
:
y
+
1
;
float
color
=
blok
->
m_color
==
-
1.
?
cblk_color
:
blok
->
m_color
;
for
(
m
=
x
;
m
<
xEnd
;
m
++
)
{
for
(
n
=
y
;
n
<
yEnd
;
n
++
)
{
m_colors
[
m
][
n
]
=
0.0
f
;
for
(
n
=
y
;
n
<
yEnd
;
n
++
)
{
m_colors
[
m
][
n
]
=
color
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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