Browse Source

Speed up grid drawing.

master
Jonathan Moore Liles 8 years ago
parent
commit
a22886288a
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      FreeEditUI.fl

+ 2
- 6
FreeEditUI.fl View File

@@ -96,9 +96,7 @@ for (int ncoord=0;ncoord<2;ncoord++){
int psteps=(int)(floor(log10(extreme->get_max()/extreme->get_min())))+1;
for (int k=1;k<=psteps;k++){
for (int i=1;i<10;i++){
if (i==1) fl_line_style(FL_SOLID);
else if(i==5) fl_line_style(FL_DASH);
else fl_line_style(FL_DOT);
fl_line_style(FL_SOLID);
float fpos=extreme->real_value_to_coord(p10*i);
if ((fpos>0.0)&&(fpos<1.0)){
if (ncoord==0){
@@ -129,9 +127,7 @@ for (int ncoord=0;ncoord<2;ncoord++){
for (int i=0;i<nsteps;i++){
float fpos=extreme->real_value_to_coord(min1+i*stepsize);
int ks=(i+kstep)%10; if (ks<0) ks+=10;
if (ks==0) fl_line_style(FL_SOLID);
else if (ks==5) fl_line_style(FL_DASH);
else fl_line_style(FL_DOT);
fl_line_style(FL_SOLID);
if ((fpos>0.0)&&(fpos<1.0)){
if (ncoord==0){
int pos=(int)(fpos*lx);


Loading…
Cancel
Save