71 double *px, *py=&Dummy, *pz;
75 int nn, nnn, m,
x, y, d, dmin = INT_MAX;
89 n = (n % nnn) + (n / nnn) * nnn * pDy->
count;
98 for(nn=0; nn<nnn; nn++) {
103 pz += 2*(pD->
count-1);
105 x = int(
fCX+0.5) -
cx;
106 y = int(
fCY+0.5) -
cy;
113 if(isCross) m *= pD->
count;
121 VarPos = (
double*)malloc(nn);
191 if(fabs(v-(*pp)) < fabs(v-(*(pp+1))))
break;
253 Text = QObject::tr(
"invalid");
263 QFontMetrics metrics(Font);
264 QSize r = metrics.size(0,
Text);
277 if(!px)
return false;
278 for(n=0; n<pD->
count; n++) {
279 if(
VarPos[0] <= *px)
break;
282 if(n == pD->
count) px--;
285 if(px <= pD->Points)
return false;
289 if(px >= (pD->
Points + pD->
count - 1))
return false;
305 if(!pD)
return false;
311 if(!pD)
return false;
313 if(!px)
return false;
314 for(n=1; n<pD->
count; n++) {
315 if(fabs(
VarPos[i]-(*px)) < fabs(
VarPos[i]-(*(px+1))))
break;
333 if(!pD)
return false;
335 if(!px)
return false;
336 for(n=0; n<pD->
count; n++) {
337 if(fabs(
VarPos[i]-(*px)) < fabs(
VarPos[i]-(*(px+1))))
break;
341 }
while(px <= pD->Points);
361 p->
Painter->setWorldXForm(
true);
362 QWMatrix wm = p->
Painter->worldMatrix();
363 p->
Painter->setWorldMatrix(QWMatrix());
366 p->
Painter->setPen(QPen(QPen::black,1));
368 x2_ += int(6.0*p->
Scale);
369 y2_ += int(6.0*p->
Scale);
374 p->
Painter->setWorldMatrix(wm);
375 p->
Painter->setWorldXForm(
false);
377 p->
Painter->setPen(QPen(QPen::darkMagenta,0));
380 x2 = int(
float(x2_) / p->
Scale);
381 y2 = int(
float(y2_) / p->
Scale);
384 p->
map(x0+
x1, y0+
y1, x1_, y1_);
401 p->
Painter->setPen(QPen(QPen::darkGray,3));
416 p->drawLine(x0+
cx, y0-
cy, x0+
x1, y0+
y1);
462 s += QString::number(
VarPos[
i])+
"/";
463 s.at(s.length()-1) =
' ';
465 s += QString::number(
x1) +
" "+ QString::number(
y1) +
" "
480 if(s.at(0) !=
'<')
return false;
481 if(s.at(s.length()-1) !=
'>')
return false;
482 s = s.mid(1, s.length()-2);
484 if(s.section(
' ',0,0) !=
"Mkr")
return false;
487 QString
n = s.section(
' ',1,1);
490 j = (n.contains(
'/') + 3) *
sizeof(
double);
494 VarPos = (
double*)malloc(j);
499 if(!ok)
return false;
503 n = s.section(
' ',2,2);
505 if(!ok)
return false;
507 n = s.section(
' ',3,3);
509 if(!ok)
return false;
511 n = s.section(
' ',4,4);
513 if(!ok)
return false;
515 n = s.section(
' ',5,5);
517 if(!ok)
return false;
519 n = s.section(
' ',6,6);
520 if(n.isEmpty())
return true;
532 if(x_ >=
x1)
if(x_ <=
x1+
x2)
if(y_ >=
y1)
if(y_ <=
y1+
y2)
546 int z = (
nVarPos+2) *
sizeof(
double);
550 pm->
VarPos = (
double*)malloc(z);