2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-12-31 03:21:33 +00:00
< meta name = "generator" content = "ZealOS V1.08" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-10-08 07:06:11 +01:00
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
2021-07-03 05:07:57 +01:00
< / style >
< / head >
< body >
2021-07-05 01:12:38 +01:00
< pre style = "font-family:monospace;font-size:12pt" >
2021-07-04 23:11:34 +01:00
< a name = "l1" > < / a > < span class = cF0 > #< / span > < span class = cF1 > define< / span > < span class = cF0 > ZEROS_NUM < / span > < span class = cFE > 2< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l2" > < / a > < / span > < span class = cF9 > Complex< / span > < span class = cF0 > zeros[ZEROS_NUM] = {< / span > < span class = cF7 > {< / span > < span class = cFE > 10< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF7 > }< / span > < span class = cF0 > , < / span > < span class = cF7 > {< / span > < span class = cF0 > -< / span > < span class = cFE > 30< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF7 > }< / span > < span class = cF0 > };
2021-07-04 23:11:34 +01:00
< a name = "l3" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > POLES_NUM < / span > < span class = cFE > 2< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l4" > < / a > < / span > < span class = cF9 > Complex< / span > < span class = cF0 > poles[POLES_NUM] = {< / span > < span class = cF7 > {< / span > < span class = cF0 > -< / span > < span class = cFE > 20< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF0 > , -< / span > < span class = cFE > 15< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF7 > }< / span > < span class = cF0 > , < / span > < span class = cF7 > {< / span > < span class = cF0 > -< / span > < span class = cFE > 20< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 15< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF7 > }< / span > < span class = cF0 > };
< a name = "l5" > < / a >
< a name = "l6" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > scale;
< a name = "l7" > < / a >
< a name = "l8" > < / a > < / span > < span class = cF9 > Complex< / span > < span class = cF0 > *PoleZeroFind(< / span > < span class = cF9 > I64< / span > < span class = cF0 > x, < / span > < span class = cF9 > I64< / span > < span class = cF0 > y)
< a name = "l9" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l10" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i;
< a name = "l11" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > dd, best_dd = < / span > < span class = cF3 > F64_MAX< / span > < span class = cF0 > ;
< a name = "l12" > < / a > < / span > < span class = cF9 > Complex< / span > < span class = cF0 > *res = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l13" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l14" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < POLES_NUM; i++)
< a name = "l15" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l16" > < / a > dd = < / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (poles[i].x - x) + < / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (poles[i].y - y);
< a name = "l17" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dd < best_dd)
< a name = "l18" > < / a > {
< a name = "l19" > < / a > best_dd = dd;
< a name = "l20" > < / a > res = & poles[i];
< a name = "l21" > < / a > }
< a name = "l22" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l23" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < ZEROS_NUM; i++)
< a name = "l24" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l25" > < / a > dd = < / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (zeros[i].x - x) + < / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (zeros[i].y - y);
< a name = "l26" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dd < best_dd)
< a name = "l27" > < / a > {
< a name = "l28" > < / a > best_dd = dd;
< a name = "l29" > < / a > res = & zeros[i];
< a name = "l30" > < / a > }
< a name = "l31" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l32" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l33" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l34" > < / a > }
< a name = "l35" > < / a >
< a name = "l36" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > < / span > < span class = cF5 > F< / span > < span class = cF0 > (< / span > < span class = cF9 > Complex< / span > < span class = cF0 > *x)
< a name = "l37" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l38" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > m, a;
< a name = "l39" > < / a > < / span > < span class = cF9 > Complex< / span > < span class = cF0 > num, denom, n1;
2021-07-03 05:07:57 +01:00
< a name = "l40" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l41" > < / a > < / span > < span class = cF5 > CPoly< / span > < span class = cF0 > (& num, ZEROS_NUM, zeros, x);
< a name = "l42" > < / a > < / span > < span class = cF5 > CPoly< / span > < span class = cF0 > (& denom, POLES_NUM, poles, x);
< a name = "l43" > < / a > < / span > < span class = cF5 > CDiv< / span > < span class = cF0 > (& n1, & num, & denom);
2021-07-03 05:07:57 +01:00
< a name = "l44" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l45" > < / a > < / span > < span class = cF5 > R2P< / span > < span class = cF0 > (& m, & a, n1.x, n1.y);
< a name = "l46" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cFB > mouse< / span > < span class = cF0 > .rb)
< a name = "l47" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF3 > pi< / span > < span class = cF0 > + a;
< a name = "l48" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l49" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > m;
2021-07-03 05:07:57 +01:00
< a name = "l50" > < / a > }
< a name = "l51" > < / a >
< a name = "l52" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > MPDraw(< / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task)
< a name = "l53" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l54" > < / a > < / span > < span class = cF9 > Complex< / span > < span class = cF0 > xx;
< a name = "l55" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > x, y, w = task-> pix_width, h = task-> pix_height, cx = w / < / span > < span class = cFE > 2< / span > < span class = cF0 > , cy = h / < / span > < span class = cFE > 2< / span > < span class = cF0 > ,
< a name = "l56" > < / a > lo = < / span > < span class = cF5 > Gs< / span > < span class = cF0 > -> num * h / < / span > < span class = cFB > mp_count< / span > < span class = cF0 > , hi = (< / span > < span class = cF5 > Gs< / span > < span class = cF0 > -> num + < / span > < span class = cFE > 1< / span > < span class = cF0 > ) * h / < / span > < span class = cFB > mp_count< / span > < span class = cF0 > ;
< a name = "l57" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > yy, y_total = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l58" > < / a > < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc = < / span > < span class = cF5 > DCAlias< / span > < span class = cF0 > (, task);
2021-07-03 05:07:57 +01:00
< a name = "l59" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l60" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (y = lo; y < hi; y++)
< a name = "l61" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l62" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (x = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; x < w; x++)
< a name = "l63" > < / a > {
< a name = "l64" > < / a > < / span > < span class = cF5 > CEqu< / span > < span class = cF0 > (& xx, x - cx, cy - y);
< a name = "l65" > < / a > yy = scale * < / span > < span class = cF5 > F< / span > < span class = cF0 > (& xx);
< a name = "l66" > < / a > dc-> color = < / span > < span class = cF5 > Clamp< / span > < span class = cF0 > (yy, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 14< / span > < span class = cF0 > );
< a name = "l67" > < / a > y_total += < / span > < span class = cF5 > Clamp< / span > < span class = cF0 > (yy, -< / span > < span class = cFE > 14< / span > < span class = cF0 > , < / span > < span class = cFE > 14< / span > < span class = cF0 > );
< a name = "l68" > < / a > < / span > < span class = cF5 > GrPlot< / span > < span class = cF0 > (dc, x, y);
< a name = "l69" > < / a > }
< a name = "l70" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l71" > < / a > < / span > < span class = cF5 > DCDel< / span > < span class = cF0 > (dc);
2021-07-03 05:07:57 +01:00
< a name = "l72" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l73" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > y_total;
2021-07-03 05:07:57 +01:00
< a name = "l74" > < / a > }
< a name = "l75" > < / a >
< a name = "l76" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > Draw()
< a name = "l77" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l78" > < / a > < / span > < span class = cF9 > CJob< / span > < span class = cF0 > *tmpm[< / span > < span class = cF3 > MP_PROCESSORS_NUM< / span > < span class = cF0 > ];
< a name = "l79" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > y_total, old_y_total = < / span > < span class = cF3 > F64_MAX< / span > < span class = cF0 > ;
< a name = "l80" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, w = < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> pix_width, h = < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> pix_height, cx = w / < / span > < span class = cFE > 2< / span > < span class = cF0 > , cy = h / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l81" > < / a > < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc = < / span > < span class = cF5 > DCAlias< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l82" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l83" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > )
< a name = "l84" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l85" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFB > mp_count< / span > < span class = cF0 > ; i++)
< a name = "l86" > < / a > tmpm[i] = < / span > < span class = cF5 > JobQueue< / span > < span class = cF0 > (& MPDraw, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , i, < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l87" > < / a > y_total = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l88" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFB > mp_count< / span > < span class = cF0 > ; i++)
< a name = "l89" > < / a > y_total += < / span > < span class = cF5 > JobResGet< / span > < span class = cF0 > (tmpm[i])(< / span > < span class = cF1 > F64< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l90" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l91" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!y_total)
< a name = "l92" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l93" > < / a > scale *= < / span > < span class = cFE > 7< / span > < span class = cF0 > * < / span > < span class = cF3 > GR_WIDTH< / span > < span class = cF0 > * < / span > < span class = cF3 > GR_HEIGHT< / span > < span class = cF0 > / y_total;
< a name = "l94" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Abs< / span > < span class = cF7 > (< / span > < span class = cF0 > y_total - old_y_total< / span > < span class = cF7 > )< / span > < span class = cF0 > < < / span > < span class = cFE > 1< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF0 > * < / span > < span class = cF3 > GR_WIDTH< / span > < span class = cF0 > * < / span > < span class = cF3 > GR_HEIGHT< / span > < span class = cF0 > )
< a name = "l95" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l96" > < / a > old_y_total = y_total;
< a name = "l97" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l98" > < / a > dc-> color = < / span > < span class = cFE > 15< / span > < span class = cF0 > ;
< a name = "l99" > < / a > < / span > < span class = cF5 > GrLine< / span > < span class = cF0 > (dc, < / span > < span class = cFE > 0< / span > < span class = cF0 > , cy, w, cy);
< a name = "l100" > < / a > < / span > < span class = cF5 > GrLine< / span > < span class = cF0 > (dc, cx, < / span > < span class = cFE > 0< / span > < span class = cF0 > , cx, h);
< a name = "l101" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < ZEROS_NUM; i++)
< a name = "l102" > < / a > < / span > < span class = cF5 > GrPrint< / span > < span class = cF0 > (dc, cx + zeros[i].x - < / span > < span class = cF3 > FONT_WIDTH< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > , cy - zeros[i].y - < / span > < span class = cF3 > FONT_HEIGHT< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > , < / span > < span class = cF6 > " o" < / span > < span class = cF0 > );
< a name = "l103" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < POLES_NUM; i++)
< a name = "l104" > < / a > < / span > < span class = cF5 > GrPrint< / span > < span class = cF0 > (dc, cx + poles[i].x - < / span > < span class = cF3 > FONT_WIDTH< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > , cy - poles[i].y - < / span > < span class = cF3 > FONT_HEIGHT< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > , < / span > < span class = cF6 > " x" < / span > < span class = cF0 > );
< a name = "l105" > < / a > < / span > < span class = cF5 > DCDel< / span > < span class = cF0 > (dc);
2021-07-03 05:07:57 +01:00
< a name = "l106" > < / a > }
< a name = "l107" > < / a >
< a name = "l108" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > PoleZeros()
< a name = "l109" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l110" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > message_code, arg1, arg2, p11, p22, cx, cy;
< a name = "l111" > < / a > < / span > < span class = cF9 > Complex< / span > < span class = cF0 > *tmpc = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l112" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l113" > < / a > < / span > < span class = cF5 > PopUpOk< / span > < span class = cF0 > (< / span > < span class = cF6 > " Drag the poles and zeros with left mouse.\n" < / span > < span class = cF0 >
< a name = "l114" > < / a > < / span > < span class = cF6 > " Hold right mouse for phase plot.\n" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l115" > < / a >
2021-12-11 11:10:58 +00:00
< a name = "l116" > < / a > < / span > < span class = cF5 > SettingsPush< / span > < span class = cF0 > ; < / span > < span class = cF2 > //See < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/TaskSettings.ZC.html#l3" > < span class = cF4 > SettingsPush< / span > < / a > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l117" > < / a > < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> win_inhibit = < / span > < span class = cF3 > WIG_TASK_DEFAULT< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_FOCUS< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_BORDER< / span > < span class = cF0 > ;
< a name = "l118" > < / a > < / span > < span class = cF5 > GrPaletteSet< / span > < span class = cF0 > (< / span > < span class = cFB > gr_palette_gray< / span > < span class = cF0 > );
< a name = "l119" > < / a > < / span > < span class = cFB > gr_palette< / span > < span class = cF0 > [< / span > < span class = cF3 > WHITE< / span > < span class = cF0 > ] = < / span > < span class = cFE > 0xFF0000< / span > < span class = cF0 > ; < / span > < span class = cF2 > //White is red< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l120" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l121" > < / a > < / span > < span class = cF5 > AutoComplete< / span > < span class = cF0 > ;
< a name = "l122" > < / a > < / span > < span class = cF5 > WinBorder< / span > < span class = cF0 > ;
< a name = "l123" > < / a > < / span > < span class = cF5 > WinMax< / span > < span class = cF0 > ;
< a name = "l124" > < / a > < / span > < span class = cF5 > DocClear< / span > < span class = cF0 > ;
< a name = "l125" > < / a > < / span > < span class = cF5 > DCFill< / span > < span class = cF0 > ;
< a name = "l126" > < / a > scale = < / span > < span class = cFE > 1< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l127" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l128" > < / a > < / span > < span class = cF1 > try< / span > < span class = cF0 >
< a name = "l129" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l130" > < / a > Draw;
< a name = "l131" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > )
< a name = "l132" > < / a > {
< a name = "l133" > < / a > message_code = < / span > < span class = cF5 > MessageGet< / span > < span class = cF0 > (& arg1, & arg2, < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_KEY_DOWN< / span > < span class = cF0 > +
< a name = "l134" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_DOWN< / span > < span class = cF0 > + < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_UP< / span > < span class = cF0 > +
< a name = "l135" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_DOWN< / span > < span class = cF0 > + < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_UP< / span > < span class = cF0 > +
< a name = "l136" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_MOVE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l137" > < / a > pz_message:
2021-07-04 23:11:34 +01:00
< a name = "l138" > < / a > cx = < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> pix_width / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l139" > < / a > cy = < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> pix_height / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l140" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (message_code)
< a name = "l141" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l142" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_L_DOWN< / span > < span class = cF0 > :
< a name = "l143" > < / a > tmpc = PoleZeroFind(arg1 - cx, cy - arg2);
< a name = "l144" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l145" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l146" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_MOVE< / span > < span class = cF0 > :
< a name = "l147" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpc)
< a name = "l148" > < / a > {
< a name = "l149" > < / a > p11 = arg1;
< a name = "l150" > < / a > p22 = arg2;
< a name = "l151" > < / a > < / span > < span class = cF2 > //get to last mouse move< / span > < span class = cF0 >
< a name = "l152" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (message_code = < / span > < span class = cF5 > MessageScan< / span > < span class = cF7 > (< / span > < span class = cF0 > & arg1, & arg2, < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_KEY_DOWN< / span > < span class = cF0 > +
< a name = "l153" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_DOWN< / span > < span class = cF0 > + < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_UP< / span > < span class = cF0 > +
< a name = "l154" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_DOWN< / span > < span class = cF0 > + < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_UP< / span > < span class = cF0 > +
< a name = "l155" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_MOVE< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l156" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (message_code == < / span > < span class = cF3 > MESSAGE_MS_MOVE< / span > < span class = cF0 > )
< a name = "l157" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l158" > < / a > p11 = arg1;
< a name = "l159" > < / a > p22 = arg2;
< a name = "l160" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l161" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l162" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > pz_message;
2021-07-03 05:07:57 +01:00
< a name = "l163" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l164" > < / a > tmpc-> x = p11 - cx;
< a name = "l165" > < / a > tmpc-> y = cy - p22;
< a name = "l166" > < / a > Draw;
< a name = "l167" > < / a > }
< a name = "l168" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l169" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l170" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_L_UP< / span > < span class = cF0 > :
< a name = "l171" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpc)
< a name = "l172" > < / a > {
< a name = "l173" > < / a > tmpc-> x = arg1 - cx;
< a name = "l174" > < / a > tmpc-> y = cy - arg2;
< a name = "l175" > < / a > tmpc = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l176" > < / a > Draw;
< a name = "l177" > < / a > }
< a name = "l178" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l179" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l180" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_R_DOWN< / span > < span class = cF0 > :
< a name = "l181" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_R_UP< / span > < span class = cF0 > :
< a name = "l182" > < / a > Draw;
< a name = "l183" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l184" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l185" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_KEY_DOWN< / span > < span class = cF0 > :
< a name = "l186" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (arg1 == < / span > < span class = cF3 > CH_SHIFT_ESC< / span > < span class = cF0 > || arg1 == < / span > < span class = cF3 > CH_ESC< / span > < span class = cF0 > )
< a name = "l187" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > pz_done;
< a name = "l188" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l189" > < / a > < / span > < span class = cF5 > Refresh< / span > < span class = cF0 > ;
< a name = "l190" > < / a > }
2021-07-03 05:07:57 +01:00
< a name = "l191" > < / a > pz_done:
2021-07-04 23:11:34 +01:00
< a name = "l192" > < / a > < / span > < span class = cF5 > MessageGet< / span > < span class = cF0 > (,, < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_KEY_UP< / span > < span class = cF0 > );
< a name = "l193" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l194" > < / a > < / span > < span class = cF1 > catch< / span > < span class = cF0 >
< a name = "l195" > < / a > < / span > < span class = cF5 > PutExcept< / span > < span class = cF0 > ;
< a name = "l196" > < / a > < / span > < span class = cF5 > SettingsPop< / span > < span class = cF0 > ;
< a name = "l197" > < / a > < / span > < span class = cF5 > DCFill< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l198" > < / a > }
< a name = "l199" > < / a >
< a name = "l200" > < / a > PoleZeros;
< / span > < / pre > < / body >
< / html >