#help_index "Graphics/Input" public I64 PopUpColor(U8 *header=NULL, Bool allow_transparent=TRUE,Bool allow_dft=TRUE) {//Chooser for 16-color, default or transparent. I64 i; CDoc *doc=DocNew; if (header) DocPrint(doc,"%s",header); if (allow_transparent) DocPrint(doc,"$$MU,\"TRANSPARENT\",LE=TRANSPARENT$$\n"); for (i=0;ix_scale=1.0; tf->y_scale=1.0; tf->z_scale=1.0; tf->é_x=0.0; tf->é_y=0.0; tf->é_z=0.0; tf->x_offset=0.0; tf->y_offset=0.0; tf->z_offset=0.0; if (PopUpForm(tf)) { MemSet(r,0,16*sizeof(I64)); r[0] =tf->x_scale*GR_SCALE; r[5] =tf->y_scale*GR_SCALE; r[10]=tf->z_scale*GR_SCALE; r[15]=GR_SCALE; Mat4x4RotZ(r,tf->é_z*ã/180.0); Mat4x4RotY(r,tf->é_y*ã/180.0); Mat4x4RotX(r,tf->é_x*ã/180.0); r[3] =tf->x_offset*GR_SCALE; r[7] =tf->y_offset*GR_SCALE; r[11]=tf->z_offset*GR_SCALE; return TRUE; } else return FALSE; } #help_index "Graphics/Input" #define PU_SPACING 10 U0 DrawIt(CTask *task,CDC *dc) { I64 i,j,i1,j1; CDoc *doc=DocPut(task); for (j=0;j<17;j++) for (i=0;i<17;i++) { if (j<16) j1=j; else j1=TRANSPARENT; if (i<16) i1=i; else i1=TRANSPARENT; dc->color=j1+i1<<16+ROPF_DITHER; GrRect(dc,i*PU_SPACING,j*PU_SPACING+FramePtr("DitherFrame",task), PU_SPACING,PU_SPACING); } i=(17*PU_SPACING+FONT_WIDTH-1)/FONT_WIDTH; if (doc->max_x>i) i=doc->max_x; WinHorz(task->win_left,task->win_left+i,task); WinVert(task->win_top,task->win_top+doc->max_y+ (17*PU_SPACING+FONT_WIDTH-1)/FONT_WIDTH,task); } I64 DitherColor2(U8 *header=NULL) { I64 msg_code,arg1,arg2,res=-1,i,j; DocClear; "%s",header; DocRecalc(DocPut); FramePtrAdd("DitherFrame",(DocPut->max_y+1)*FONT_HEIGHT); SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$ Fs->draw_it=&DrawIt; do { msg_code=GetMsg(&arg1,&arg2,1<=0 && arg2>=0 && 0<=j<17 && 0<=i<17) { if (j==16) j=TRANSPARENT; if (i==16) i=TRANSPARENT; res=j+i<<16+ROPF_DITHER; goto dc_done; } } } while (!(msg_code==MSG_KEY_DOWN && (arg1==CH_ESC || arg1==CH_SHIFT_ESC))); do GetMsg(&arg1,&arg2,1<