Changeset 1538 in Sophya
- Timestamp:
- Jun 18, 2001, 3:08:38 PM (24 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Tests/pit0.cc
r1512 r1538 232 232 233 233 // Gestion des actions en fonctions des messages 234 printf("DBG-PITApp::Process() Msg= %d (%d - %d) - Sender=%lx - %lx\n", 235 (int)msg, (int)UserMsg(msg),(int)ModMsg(msg), (long)sender, (long)this); 234 236 235 237 switch(UserMsg(msg)) { -
trunk/SophyaPI/PI/picmapview.cc
r1512 r1538 122 122 dx = (sx-xc)/(cmap->NCol()-k); 123 123 g->SelForeground((*cmap), k); 124 g->DrawFBox(xc, 0, dx , sy);124 g->DrawFBox(xc, 0, dx+1, sy); 125 125 xc += dx; 126 126 } … … 133 133 yc -= dy; 134 134 g->SelForeground((*cmap), k); 135 g->DrawFBox(0, yc, sx, dy );135 g->DrawFBox(0, yc, sx, dy+1); 136 136 } 137 137 } … … 140 140 if ( (cmap->Type() == CMAP_GREY32) || (cmap->Type() == CMAP_GREYINV32) || 141 141 (cmap->Type() == CMAP_GREY128) || (cmap->Type() == CMAP_GREYINV128) ) g->SelForeground(PI_Red); 142 else g->SelForeground(PI_ Turquoise);142 else g->SelForeground(PI_Green); 143 143 144 144 if (sx > sy) { // horizontal 145 int fsz = (sy < 20) ? sy- 8 : 12;145 int fsz = (sy < 20) ? sy-6 : 14; 146 146 g->SelFontSzPt(fsz, PI_BoldFont); 147 147 char buff[32]; … … 157 157 } 158 158 else { // vertical 159 int fsz = (sx < 40) ? sx/4 : 12;159 int fsz = (sx < 64) ? sx/4 : 14; 160 160 g->SelFontSzPt(fsz, PI_BoldFont); 161 161 char buff[32]; -
trunk/SophyaPI/PI/pigraphps.cc
r1534 r1538 33 33 // "(x0, y0)" détermine l'origine du nouveau bloc rectangulaire sur 34 34 // la page et "dx, dy" l'extension du bloc. 35 // PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx, double ofy )35 // PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx, double ofy, double scale_x, double scale_y) 36 36 // Création d'un objet "PIGraphicPS" à partir d'un objet "PSFIle* psf" 37 37 //| x0 = wdg->XPos()+ofx y0 = wdg->YPos()+ofy 38 //| dx = wdg->XSize() dy = wdg->YSize() 38 //| Extension du bloc dans la page: 39 //| Tx = wdg->XSize()*scale_x Ty = wdg->YSize()*scale_y 39 40 // 40 41 // int kind() … … 48 49 { 49 50 BuildFromPSFile(psf, (double)wdg->XPos()+ofx, (double)wdg->YPos()+ofy, 50 (double)wdg->XSize() , (double)wdg->YSize(),51 (double)wdg->XSize() *scale_x, (double)wdg->YSize()*scale_y );51 (double)wdg->XSize()*scale_x, (double)wdg->YSize()*scale_y, 52 (double)wdg->XSize(), (double)wdg->YSize()); 52 53 } 53 54 -
trunk/SophyaPI/PI/psfile.cc
r684 r1538 472 472 } 473 473 474 //++ 475 // NewPage(double Dx, double Dy, PIOrientation orientation) 476 // Debut de nouvelle page, (Dx,Dy) indique l'extension 477 // (taille) du systeme de coordonnees utilisees pour la page 478 // EndPage() 479 // Fin de page 480 //-- 481 474 482 void PSFile::NewPage(double Dx, double Dy, PIOrientation orientation) { 475 483 … … 642 650 643 651 652 //++ 653 // NewBloc(double x0, double y0, double Tx, double Ty, double Dx, double Dy) 654 // Debut de bloc. 655 //| x0,y0 : position du bloc ds la page 656 //| Tx,Ty : Taille du bloc dans la page 657 //| Dx,Dy : Extension (taille) du systeme de coordonnees utilisateur 658 //| dans le bloc 659 // 660 // EndBloc() 661 // Fin de bloc 662 //-- 663 664 644 665 void PSFile::NewBloc(double x0, double y0, double Tx, double Ty, 645 666 double Dx, double Dy){ … … 857 878 858 879 /* Dessin du fond */ 859 if ( (FillColor != PI_NotDefColor) || (FillColor != mFillColor) ) 860 mFillColor = FillColor; 861 fprintf(mPSFile, "C%d ", mFillColor) ; 880 if ( (FillColor != PI_NotDefColor) || (FillColor != mFillColor) ) { 881 mFillColor = FillColor; 882 fprintf(mPSFile, "C%d ", mFillColor) ; 883 } 862 884 fprintf(mPSFile, "gs n %.2f Ux %.2f Uy %.2f Ux %.2f Uy box f gr\n", 863 885 Tx, Ty, x0, y0) ; 864 886 865 887 /* Dessin du contour (s'il y a lieu) */ 866 if ( (DrawColor != PI_NotDefColor) && (FillColor != DrawColor) ) 888 if ( (DrawColor != PI_NotDefColor) && (FillColor != DrawColor) ) { 867 889 mDrawColor = DrawColor; 868 fprintf(mPSFile, "C%d ", mDrawColor) ; 869 fprintf(mPSFile, "gs n %.2f Ux %.2f Uy %.2f Ux %.2f Uy box s gr\n", 870 Tx, Ty, x0, y0) ; 890 fprintf(mPSFile, "C%d ", mDrawColor) ; 891 fprintf(mPSFile, "gs n %.2f Ux %.2f Uy %.2f Ux %.2f Uy box s gr\n", 892 Tx, Ty, x0, y0) ; 893 } 871 894 } 872 895 … … 971 994 972 995 /* Dessin du fond... */ 973 if ( (FillColor != PI_NotDefColor) || (FillColor != mFillColor) ) 996 if ( (FillColor != PI_NotDefColor) || (FillColor != mFillColor) ) { 974 997 mFillColor = FillColor; 975 fprintf(mPSFile, "C%d ", mFillColor) ; 998 fprintf(mPSFile, "C%d ", mFillColor) ; 999 } 976 1000 fprintf(mPSFile, "%.2f Ux %.2f Uy m\n", x[0], y[0]); 977 1001 int i; … … 981 1005 982 1006 /* ...puis du contour (s'il y a lieu) */ 983 if ( (DrawColor != PI_NotDefColor) && (DrawColor != FillColor) ) 984 mDrawColor = DrawColor; 985 fprintf(mPSFile, "C%d ", mDrawColor) ; 986 fprintf(mPSFile, "%.2f Ux %.2f Uy m\n", x[0], y[0]); 987 for(i = 1; i<n; i++) 988 fprintf(mPSFile, cmd, x[i], y[i]); 989 fprintf(mPSFile, "c s\n"); 1007 if ( (DrawColor != PI_NotDefColor) && (DrawColor != FillColor) ) { 1008 mDrawColor = DrawColor; 1009 fprintf(mPSFile, "C%d ", mDrawColor) ; 1010 fprintf(mPSFile, "%.2f Ux %.2f Uy m\n", x[0], y[0]); 1011 for(i = 1; i<n; i++) 1012 fprintf(mPSFile, cmd, x[i], y[i]); 1013 fprintf(mPSFile, "c s\n"); 1014 } 990 1015 } 991 1016
Note:
See TracChangeset
for help on using the changeset viewer.