📄 odbuttons.cpp
字号:
seg->SetSize(SIZE_ANGLE2, 90.0f);
seg->Command(CMD_SEG_FILL, &FillB, 0L);
seg->DoPlot(o);
delete seg;
}
break;
case 502:
pts[0].x = rec->right-8; pts[0].y = rec->top+8;
pts[1].x = ix+4; pts[1].y = iy+2;
pts[2].x = ix+8; pts[2].y = rec->bottom-11;
pts[3].x = ix; pts[3].y = iy+7;
pts[4].x = ix-6; pts[4].y = iy+13;
pts[5].x = ix-5; pts[5].y = iy+5;
pts[6].x = rec->left+10; pts[6].y = iy+2;
pts[7].x = ix-3; pts[7].y = iy-1;
pts[8].x = ix-3; pts[8].y = iy-10;
pts[9].x = ix+2; pts[9].y = iy-4;
pts[10].x = pts[0].x; pts[10].y = pts[0].y;
o->SetFill(&FillY);
o->oPolygon(pts, 11);
break;
case 503:
o->SetFill(&FillR);
o->oRectangle(rec->left+8, rec->top+30, rec->left+12, rec->bottom-3);
o->oRectangle(rec->left+15, rec->bottom-10, rec->left+19, rec->bottom-3);
o->oRectangle(rec->left+22, rec->top+10, rec->left+26, rec->bottom-3);
o->oRectangle(rec->left+29, rec->bottom-35, rec->left+33, rec->bottom-3);
o->oRectangle(rec->left+36, rec->top+30, rec->left+40, rec->bottom-3);
break;
case 504:
o->SetFill(&FillR);
o->oRectangle(rec->left+9, rec->top+30, rec->left+13, rec->bottom-3);
o->oRectangle(rec->right-20, rec->top+10, rec->right-16, rec->bottom-3);
o->SetFill(&FillG);
o->oRectangle(rec->left+13, rec->top+25, rec->left+17, rec->bottom-3);
o->oRectangle(rec->right-16, rec->top+15, rec->right-12, rec->bottom-3);
o->SetFill(&FillB);
o->oRectangle(rec->left+17, rec->top+35, rec->left+21, rec->bottom-3);
o->oRectangle(rec->right-12, rec->top+20, rec->right-8, rec->bottom-3);
break;
case 505:
o->SetFill(&FillY);
o->oRectangle(rec->left+15, rec->bottom-10, rec->left+19, rec->bottom-3);
o->oRectangle(rec->left+22, rec->top+15, rec->left+26, rec->bottom-3);
o->oRectangle(rec->left+29, rec->bottom-30, rec->left+33, rec->bottom-3);
o->oRectangle(rec->left+36, rec->bottom-12, rec->left+40, rec->bottom-3);
o->SetLine(&bLine);
pts[0].x = rec->left +9; pts[0].y = rec->bottom-5; pts[1].x = pts[0].x+1;
for(i = 0; i < (rec->right - rec->left - 18); i++) {
r = ((double)(i+rec->left-ix+7))/8.0;
pts[1].y = rec->bottom - iround(exp(-r*r)*35.0+5.0);
o->oSolidLine(pts);
pts[0].x++; pts[1].x++; pts[0].y = pts[1].y;
}
break;
case 520:
case 521:
if(id == 521) {
pts[0].x = rec->left+13; pts[0].y = rec->bottom-12;
pts[1].x = rec->left+20; pts[1].y = rec->top+18;
pts[2].x = rec->right-19; pts[2].y = rec->top+33;
pts[3].x = rec->right-11; pts[3].y = rec->top+13;
o->oPolyline(pts, 4);
o->SetFill(&FillG);
}
else o->SetFill(&FillR);
o->oCircle(rec->left+10, rec->bottom-15, rec->left+16, rec->bottom-9);
o->oCircle(rec->left+17, rec->top+15, rec->left+23, rec->top+21);
o->oCircle(rec->right-22, rec->top+30, rec->right-16, rec->top+36);
o->oCircle(rec->right-14, rec->top+10, rec->right-8, rec->top+16);
break;
case 522:
o->SetFill(&FillR);
o->oRectangle(rec->left+3, rec->top+8, rec->left+16, rec->top+16);
o->SetFill(&FillG);
o->oRectangle(rec->left+3, iy-4, rec->right-16, iy+4);
o->SetFill(&FillB);
o->oRectangle(rec->left+3, rec->bottom-8, rec->left+26, rec->bottom-16);
break;
case 523:
o->SetFill(&FillR);
o->oRectangle(rec->left+8, rec->top+30, rec->left+16, rec->bottom-3);
o->SetFill(&FillG);
o->oRectangle(ix-4, rec->top+10, ix+4, rec->bottom-3);
o->SetFill(&FillB);
o->oRectangle(rec->right-8, rec->top+20, rec->right-16, rec->bottom-3);
break;
case 524:
o->SetFill(&FillG);
o->oCircle(rec->left+10, rec->bottom-15, rec->left+16, rec->bottom-9);
o->oCircle(ix-9, iy-18, ix+9, iy);
o->oCircle(rec->right-7, rec->top+30, rec->right-17, rec->top+40);
break;
case 525:
pts[0].x = pts[1].x = rec->left +12;
pts[0].y = rec->top+20; pts[1].y = rec->top+40;
o->oPolyline(pts,2);
pts[0].x = pts[1].x = rec->right-12;
o->oPolyline(pts,2);
pts[0].x = pts[1].x = ix;
pts[0].y = rec->top+10; pts[1].y = rec->top+35;
o->oPolyline(pts,2);
o->SetFill(&FillY);
o->oRectangle(rec->left+8, rec->top+25, rec->left+16, rec->top+35);
o->oRectangle(ix-4, rec->top+13, ix+4, rec->top+28);
o->oRectangle(rec->right-8, rec->top+30, rec->right-16, rec->top+35);
break;
case 526:
pts[0].x = rec->left+13; pts[0].y = rec->bottom-12;
pts[1].x = rec->right-11; pts[1].y = rec->top+8;
o->oSolidLine(pts);
o->SetFill(&FillB);
o->oCircle(rec->left+10, rec->bottom-21, rec->left+16, rec->bottom-15);
o->oCircle(rec->left+17, rec->top+20, rec->left+23, rec->top+26);
o->oCircle(rec->right-22, rec->top+25, rec->right-16, rec->top+31);
o->oCircle(rec->right-14, rec->top+15, rec->right-8, rec->top+21);
o->oCircle(rec->right-22, rec->top+9, rec->right-16, rec->top+15);
break;
case 527:
o->oCircle(rec->left+8, rec->top+8, rec->right-8, rec->bottom-8);
o->oCircle(rec->left+16, rec->top+16, rec->right-16, rec->bottom-16);
pts[0].x = rec->left+6; pts[0].y = iy;
pts[1].x = rec->right-6; pts[1].y = iy;
o->oSolidLine(pts);
pts[0].x = ix; pts[0].y = rec->bottom-6;
pts[1].x = ix; pts[1].y = rec->top+6;
o->oSolidLine(pts); o->SetFill(&FillR);
o->oCircle(rec->left+13, rec->top+13, rec->left+19, rec->top+19);
o->oCircle(ix-7, iy+1, ix-1, iy+7);
o->oCircle(rec->right-19, rec->bottom-19, rec->right-13, rec->bottom-13);
o->oCircle(rec->right-19, rec->top+13, rec->right-13, rec->top+19);
break;
case 528:
o->SetFill(&FillY);
o->oRectangle(rec->left+8, iy-2, ix-2, iy+2);
o->oRectangle(ix-2, iy-15, ix+2, iy+15);
o->oRectangle(ix+2, iy-11, ix+6, iy+11);
o->oRectangle(ix+6, iy-5, rec->right-8, iy+5);
break;
case 529:
o->SetLine(&rLine);
pts[0].x = rec->left +9; pts[0].y = iy; pts[1].x = pts[0].x+1;
for(i = 0; i < (rec->right - rec->left - 18); i++) {
pts[1].y = iy-4 + iround(pow(20.0, 1.0+((double)-i)/30.0) * -sin(((double)i)));
o->oSolidLine(pts);
pts[0].x++; pts[1].x++; pts[0].y = pts[1].y;
}
memcpy(&td, &o->TxtSet, sizeof(TextDEF));
memcpy(&otd, &o->TxtSet, sizeof(TextDEF));
td.Align = TXA_HCENTER | TXA_VTOP;
td.Style = TXS_NORMAL;
td.Mode = TXM_TRANSPARENT;
td.ColTxt = 0x00c00000L;
o->SetTextSpec(&td);
o->oTextOut(ix, iy+4, "y=f(x)", 0);
o->SetTextSpec(&otd);
break;
case 530:
o->SetLine(&rLine);
pts[0].x = rec->left +9; pts[0].y = iy+13; pts[1].x = pts[0].x+1;
for(i = 0; i < (rec->right - rec->left - 18); i++) {
pts[1].y = iy+12 + iround(-log10(((double)i)/.4 + 1.0)*15.0);
o->oSolidLine(pts);
pts[0].x++; pts[1].x++; pts[0].y = pts[1].y;
}
o->SetLine(&Line); o->SetFill(&FillG);
o->oCircle(rec->left+8, rec->bottom-15, rec->left+14, rec->bottom-9);
o->oCircle(rec->left+11, iy-1, rec->left+17, iy+5);
o->oCircle(rec->left+17, rec->top+12, rec->left+23, rec->top+18);
o->oCircle(rec->right-22, rec->top+8, rec->right-16, rec->top+14);
o->oCircle(rec->right-14, rec->top+10, rec->right-8, rec->top+16);
memcpy(&td, &o->TxtSet, sizeof(TextDEF));
memcpy(&otd, &o->TxtSet, sizeof(TextDEF));
td.Align = TXA_HLEFT | TXA_VCENTER;
td.Style = TXS_BOLD; td.Mode = TXM_TRANSPARENT;
td.fSize = 7.0; td.iSize = 0;
td.ColTxt = cmd == OD_DRAWSELECTED ? 0x0000f0f0L : 0x00c00000;
o->SetTextSpec(&td);
o->oTextOut(ix-2, iy+3, "?", 0);
o->SetTextSpec(&otd);
break;
case 531:
o->SetLine(&rLine);
pts[0].x = rec->left +9; pts[0].y = iy;
pts[1].x = ix; pts[1].y = rec->top + 9;
pts[2].x = rec->right -9; pts[2].y = iy;
o->oPolyline(pts, 3, 0L);
o->SetLine(&gLine);
pts[0].y -= 15; pts[1].y = iy; pts[2].y -=7;
o->oPolyline(pts, 3, 0L);
o->SetLine(&bLine);
pts[0].y += 9; pts[1].y += 10; pts[2].y = pts[1].y;
o->oPolyline(pts, 3, 0L);
break;
case 532:
pts[0].x = rec->left +13; pts[0].y = rec->top+8;
pts[1].x = rec->left +13; pts[1].y = iy;
o->oSolidLine(pts);
pts[0].x -= 3; pts[1].x += 3;
pts[0].y = pts[1].y = rec->top+8;
o->oSolidLine(pts);
pts[0].y = pts[1].y = iy;
o->oSolidLine(pts);
pts[0].x = ix; pts[0].y = iy-8;
pts[1].x = ix; pts[1].y = rec->bottom-13;
o->oSolidLine(pts);
pts[0].x -= 3; pts[1].x += 3;
pts[0].y = pts[1].y = iy-8;
o->oSolidLine(pts);
pts[0].y = pts[1].y = rec->bottom-13;
o->oSolidLine(pts);
pts[0].x = rec->right -13; pts[0].y = rec->top+10;
pts[1].x = rec->right -13; pts[1].y = iy-6;
o->oSolidLine(pts);
pts[0].x -= 3; pts[1].x += 3;
pts[0].y = pts[1].y = rec->top+10;
o->oSolidLine(pts);
pts[0].y = pts[1].y = iy-6;
o->oSolidLine(pts);
pts[0].x = rec->left+13; pts[1].x = ix; pts[2].x = rec->right-13;
pts[0].y = (rec->top+8+iy)>>1;
pts[1].y = (rec->bottom-13 + iy -8)>>1;
pts[2].y = (rec->top+10+iy-6)>>1;
o->oPolyline(pts, 3, 0L);
o->SetFill(&FillY);
o->oCircle(pts[0].x-3, pts[0].y-3, pts[0].x+3, pts[0].y+3);
o->oCircle(pts[1].x-3, pts[1].y-3, pts[1].x+3, pts[1].y+3);
o->oCircle(pts[2].x-3, pts[2].y-3, pts[2].x+3, pts[2].y+3);
break;
case 540:
o->SetFill(&FillR);
o->oRectangle(rec->left+8, rec->bottom-8, rec->left+16, rec->bottom-3);
o->oRectangle(ix-4, rec->bottom-18, ix+4, rec->bottom-3);
o->oRectangle(rec->right-8, rec->bottom-12, rec->right-16, rec->bottom-3);
o->SetFill(&FillG);
o->oRectangle(rec->left+8, rec->bottom-13, rec->left+16, rec->bottom-8);
o->oRectangle(ix-4, rec->bottom-28, ix+4, rec->bottom-18);
o->oRectangle(rec->right-8, rec->bottom-22, rec->right-16, rec->bottom-12);
o->SetFill(&FillB);
o->oRectangle(rec->left+8, rec->bottom-18, rec->left+16, rec->bottom-13);
o->oRectangle(ix-4, rec->bottom-38, ix+4, rec->bottom-28);
o->oRectangle(rec->right-8, rec->bottom-27, rec->right-16, rec->bottom-22);
break;
case 541:
o->SetFill(&FillR);
pts[0].x = pts[1].x = pts[5].x = rec->left+8;
pts[0].y = pts[4].y =pts[5].y = rec->bottom-4;
pts[1].y = iy+5; pts[2].x = ix; pts[2].y = rec->bottom-5;
pts[3].x = pts[4].x = rec->right-8;
pts[3].y = rec->bottom-12;
o->oPolygon(pts, 6);
o->SetFill(&FillY);
for(i = 1; i < 6; i++) {
pts[i-1].x = pts[i].x; pts[i-1].y = pts[i].y;
}
pts[5].x = pts[0].x; pts[5].y = pts[0].y;
pts[4].x = pts[1].x; pts[4].y = pts[1].y-8;
pts[3].y = rec->bottom-20;
o->oPolygon(pts, 6);
o->SetFill(&FillG);
pts[1].y = pts[4].y; pts[2].y = pts[3].y;
pts[4].y -= 12; pts[3].y -= 3;
o->oPolygon(pts, 6);
break;
case 542:
Line.color = 0x00ff0000L;
o->SetLine(&Line);
pts[0].x = rec->left+6; pts[0].y = rec->bottom-6;
pts[1].x = rec->left+10; pts[1].y = rec->bottom-6;
pts[2].x = rec->left+12; pts[2].y = iy + 8;
pts[3].x = rec->left+14; pts[3].y = rec->bottom-6;
pts[4].x = rec->right-24; pts[4].y = rec->bottom-6;
pts[5].x = rec->right-22; pts[5].y = iy + 4;
pts[6].x = rec->right-20; pts[6].y = rec->bottom-6;
pts[7].x = rec->right-16; pts[7].y = rec->bottom-6;
for(i = 0; i < 4; i++){
o->oPolyline(pts, 8);
for(j = 0; j < 8; j++) {
pts[j].x += 4; pts[j].y -= 4;
}
pts[2].y -= 4; pts[5].y++;
}
break;
case 543:
OD_AxisTempl3D(cmd, par, rec, o, data, 411);
o->SetFill(&FillR);
UtilBarDraw(pts, ix-5, iy-2, rec->bottom-12, o);
UtilBarDraw(pts, ix, iy+3, rec->bottom-11, o);
UtilBarDraw(pts, ix+5, iy-5, rec->bottom-10, o);
UtilBarDraw(pts, ix+10, iy-4, rec->bottom-9, o);
o->SetFill(&FillG);
UtilBarDraw(pts, ix-10, iy+2, rec->bottom-9, o);
UtilBarDraw(pts, ix-5, iy+10, rec->bottom-8, o);
UtilBarDraw(pts, ix, iy+8, rec->bottom-7, o);
UtilBarDraw(pts, ix+5, iy, rec->bottom-6, o);
break;
case 544:
OD_AxisTempl3D(cmd, par, rec, o, data, 411);
for(i = 0; i < 6; i++){
switch(i) {
case 0:
o->SetFill(&FillY);
pts[0].x = ix-5; pts[0].y = iy+1;
pts[1].x = ix; pts[1].y = iy-10;
break;
case 1:
pts[0].x = pts[1].x; pts[0].y = pts[1].y;
pts[1].x = ix+5; pts[1].y = iy -6;
break;
case 2:
pts[0].x = pts[1].x; pts[0].y = pts[1].y;
pts[1].x = ix+10; pts[1].y = iy +4;
break;
case 3:
o->SetFill(&FillR);
pts[0].x = ix-10; pts[0].y = iy-10;
pts[1].x = ix-5; pts[1].y = iy+4;
break;
case 4:
pts[0].x = pts[1].x; pts[0].y = pts[1].y;
pts[1].x = ix; pts[1].y = iy +9;
break;
case 5:
pts[0].x = pts[1].x; pts[0].y = pts[1].y;
pts[1].x = ix+10; pts[1].y = iy +12;
break;
}
pts[2].x = pts[1].x -3; pts[2].y = pts[1].y + 2;
pts[3].x = pts[0].x -3; pts[3].y = pts[0].y + 2;
pts[4].x = pts[0].x; pts[4].y = pts[0].y;
o->oPolygon(pts, 5);
}
break;
case 560:
o->SetFill(&FillY);
#ifdef _WINDOWS
o->oCircle(rec->right-13, rec->top+7, rec->right-19, rec->top+13);
o->oCircle(rec->right-11, iy-3, rec->right-17, iy+3);
o->oCircle(ix, iy+3, ix+6, iy+9);
o->oCircle(rec->left+12, iy+3, rec->left+18, iy+9);
o->oCircle(ix, rec->bottom-6, ix+6, rec->bottom-12);
#else
o->oCircle(rec->right-15, rec->top+7, rec->right-19, rec->top+13);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -