[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49756] Crash when panning an image to top of
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes |
Date: |
Thu, 25 Oct 2018 21:24:30 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0 |
Follow-up Comment #12, bug #49756 (project octave):
Can you just put std::abs around the calculation so it doesn't matter whether
y(0) or y(1) is larger? Also, it looks like the same situation could happen
for the x-axis. Maybe std::abs again?
if (w > 1)
{
pix_dx = (p1(0) - p0(0)) / (w-1);
nor_dx = (x(1) - x(0)) / (w-1);
}
else
{
const ColumnVector p1w = xform.transform (x(1) + 1, y(1), 0);
pix_dx = p1w(0) - p0(0);
nor_dx = 1;
}
if (h > 1)
{
pix_dy = (p1(1) - p0(1)) / (h-1);
nor_dy = (y(1) - y(0)) / (h-1);
}
else
{
const ColumnVector p1h = xform.transform (x(1), y(1) + 1, 0);
pix_dy = p1h(1) - p0(1);
nor_dy = 1;
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?49756>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Pantxo Diribarne, 2018/10/24
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Pantxo Diribarne, 2018/10/24
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Pantxo Diribarne, 2018/10/24
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Rik, 2018/10/24
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Pantxo Diribarne, 2018/10/24
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Markus Mützel, 2018/10/25
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Pantxo Diribarne, 2018/10/25
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes,
Rik <=
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Pantxo Diribarne, 2018/10/26
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Marshall, 2018/10/27
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Pantxo Diribarne, 2018/10/28
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Rik, 2018/10/30
- [Octave-bug-tracker] [bug #49756] Crash when panning an image to top of axes, Marshall, 2018/10/30