Fix crash when setting graph options to very large numbers (#904)
* fix crash * Fixes * Update build/pipelines/templates/build-app-internal.yaml Co-Authored-By: Stephanie Anderl <46726333+sanderl@users.noreply.github.com> Co-authored-by: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>
This commit is contained in:
parent
c3414ea9c9
commit
9329af37f1
@ -29,7 +29,7 @@ jobs:
|
||||
downloadDirectory: $(Build.SourcesDirectory)
|
||||
vstsFeed: WindowsApps
|
||||
vstsFeedPackage: calculator-internals
|
||||
vstsPackageVersion: 0.0.31
|
||||
vstsPackageVersion: 0.0.33
|
||||
|
||||
- template: ./build-single-architecture.yaml
|
||||
parameters:
|
||||
|
@ -179,10 +179,19 @@ namespace GraphControl::DX
|
||||
|
||||
int formulaId = -1;
|
||||
float nearestPointLocationX, nearestPointLocationY;
|
||||
float nearestPointValueX, nearestPointValueY;
|
||||
double nearestPointValueX, nearestPointValueY, rhoValueOut, thetaValueOut, tValueOut;
|
||||
|
||||
if (renderer->GetClosePointData(
|
||||
trackPoint.X, trackPoint.Y, formulaId, nearestPointLocationX, nearestPointLocationY, nearestPointValueX, nearestPointValueY)
|
||||
trackPoint.X,
|
||||
trackPoint.Y,
|
||||
formulaId,
|
||||
nearestPointLocationX,
|
||||
nearestPointLocationY,
|
||||
nearestPointValueX,
|
||||
nearestPointValueY,
|
||||
rhoValueOut,
|
||||
thetaValueOut,
|
||||
tValueOut)
|
||||
== S_OK)
|
||||
{
|
||||
if (!isnan(nearestPointLocationX) && !isnan(nearestPointLocationY))
|
||||
|
@ -38,19 +38,25 @@ namespace MockGraphingImpl
|
||||
}
|
||||
|
||||
virtual HRESULT GetClosePointData(
|
||||
float inScreenPointX,
|
||||
float inScreenPointY,
|
||||
double inScreenPointX,
|
||||
double inScreenPointY,
|
||||
int& formulaIdOut,
|
||||
float& xScreenPointOut,
|
||||
float& yScreenPointOut,
|
||||
float& xValueOut,
|
||||
float& yValueOut)
|
||||
double& xValueOut,
|
||||
double& yValueOut,
|
||||
double& rhoValueOut,
|
||||
double& thetaValueOut,
|
||||
double& tValueOut)
|
||||
{
|
||||
formulaIdOut = 0;
|
||||
xScreenPointOut = 0;
|
||||
yScreenPointOut = 0;
|
||||
xValueOut = 0;
|
||||
yValueOut = 0;
|
||||
rhoValueOut = 0;
|
||||
thetaValueOut = 0;
|
||||
tValueOut = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,17 @@ namespace Graphing::Renderer
|
||||
virtual HRESULT SetDpi(float dpiX, float dpiY) = 0;
|
||||
|
||||
virtual HRESULT DrawD2D1(ID2D1Factory* pDirect2dFactory, ID2D1RenderTarget* pRenderTarget, bool& hasSomeMissingDataOut) = 0;
|
||||
virtual HRESULT GetClosePointData(float inScreenPointX, float inScreenPointY, int& formulaIdOut, float& xScreenPointOut, float& yScreenPointOut, float& xValueOut, float& yValueOut) = 0;
|
||||
virtual HRESULT GetClosePointData(
|
||||
double inScreenPointX,
|
||||
double inScreenPointY,
|
||||
int& formulaIdOut,
|
||||
float& xScreenPointOut,
|
||||
float& yScreenPointOut,
|
||||
double& xValueOut,
|
||||
double& yValueOut,
|
||||
double& rhoValueOut,
|
||||
double& thetaValueOut,
|
||||
double& tValueOut) = 0;
|
||||
|
||||
virtual HRESULT ScaleRange(double centerX, double centerY, double scale) = 0;
|
||||
virtual HRESULT ChangeRange(ChangeRangeAction action) = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user