Fixed line rendering in all projects
This commit is contained in:
parent
798bd4f5d4
commit
ea02923498
@ -240,7 +240,7 @@ void MyWindow::DrawLine(int x1, int y1, int x2, int y2, QImage *img){
|
||||
|
||||
QColor color(255, 255, 255, 255);
|
||||
|
||||
if(abs(a) < 0.5f){
|
||||
if(abs(a) < 1.0f){
|
||||
for(int x = x1; x <= x2; x++){
|
||||
int x_form = x - x1;
|
||||
int y = a * x_form + y1;
|
||||
|
@ -226,7 +226,7 @@ void MyWindow::DrawLine(int x1, int y1, int x2, int y2, QImage *img){
|
||||
|
||||
QColor color(255, 255, 255, 255);
|
||||
|
||||
if(abs(a) < 0.5f){
|
||||
if(abs(a) < 1.0f){
|
||||
for(int x = x1; x <= x2; x++){
|
||||
int x_form = x - x1;
|
||||
int y = a * x_form + y1;
|
||||
|
@ -236,7 +236,7 @@ void MyWindow::DrawLine(int x1, int y1, int x2, int y2, bool update_temp){
|
||||
|
||||
QColor color(255, 255, 255, 255);
|
||||
|
||||
if(abs(a) < 0.5f){
|
||||
if(abs(a) < 1.0f){
|
||||
for(int x = x1; x <= x2; x++){
|
||||
int x_form = x - x1;
|
||||
int y = a * x_form + y1;
|
||||
|
@ -241,7 +241,7 @@ void MyWindow::DrawLine(int x1, int y1, int x2, int y2, QImage *img){
|
||||
|
||||
QColor color(255, 255, 255, 255);
|
||||
|
||||
if(abs(a) < 0.5f){
|
||||
if(abs(a) < 1.0f){
|
||||
for(int x = x1; x <= x2; x++){
|
||||
int x_form = x - x1;
|
||||
int y = a * x_form + y1;
|
||||
|
Loading…
Reference in New Issue
Block a user