fix put_BrushGradient

isUndefined didn't work
This commit is contained in:
Kulikova Svetlana
2021-03-03 11:55:02 +03:00
parent 88ae82035e
commit 5d1aadd5eb
2 changed files with 5 additions and 10 deletions

View File

@ -3,7 +3,7 @@
#include <string>
#include <iostream>
#include <math.h>
#include <cmath>
#ifndef M_PI
#define M_PI 3.14159265358979323846
@ -1230,9 +1230,9 @@ void CGraphics::put_BrushTextureAlpha(int a)
void CGraphics::put_BrushGradient(LONG* pColors, double* pPositions, size_t nCount, double x0, double y0, double x1, double y1, double r0, double r1)
{
#ifdef _DEBUG
std::cout << "put_BrushGradient " << std::endl;
std::cout << "put_BrushGradient " << x0 << " " << y0 << " " << x1 << " " << y1 << " " << r0 << " " << r1 << std::endl;
#endif
if(r0 < 0)
if (std::isnan(r0))
{
// линейный
double dX = x1 - x0, dY = y1 - y0;