Changeset 1592 in Sophya
- Timestamp:
- Jul 23, 2001, 5:41:15 PM (24 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/piapplgen.cc
r135 r1592 136 136 // void PIApplicationPrefCompSize(int& szx, int& szy) 137 137 // Fonction globale 138 // void PrefCompS z(int& szx, int& szy)138 // void PrefCompSize(int& szx, int& szy) 139 139 // Renvoie la taille préférée pour les composantes standard. "szx,szy" 140 140 // est la taille (en pixels) pour un champ texte, ou un bouton "(PIText, PIButton)" 141 141 // avec l'étiquette ou un contenu de 6 caractères (Ex: Cancel). 142 142 // 143 // void PIApplicationScreenSize( )143 // void PIApplicationScreenSize(int& szx, int& szy) 144 144 // Fonction globale 145 // void ScreenSz(int& szx, int& szy) 146 // Renvoie la taille en pixels de l'écran 145 // void ScreenSize(int& szx, int& szy) 146 // Renvoie la taille de l'écran en pixels 147 // 148 // void PIApplicationScreenSizeMM(int& szx, int& szy) 149 // Fonction globale 150 // void ScreenSizeMM(int& szx, int& szy) 151 // Renvoie la taille de l'écran en mm 152 // 153 // void PIApplicationScreenResolution(int& resolx, int& resoly) 154 // Fonction globale 155 // void ScreenResolution(int& resolx, int& resoly) 156 // Renvoie la resolution de l'ecran en pixels / cm 147 157 // 148 158 //-- … … 151 161 { 152 162 szx = szy = 10; 153 if (curapp) curapp->PrefCompS z(szx, szy);163 if (curapp) curapp->PrefCompSize(szx, szy); 154 164 return; 155 165 } … … 157 167 { 158 168 szx = szy = 500; 159 if (curapp) curapp->ScreenS z(szx, szy);169 if (curapp) curapp->ScreenSize(szx, szy); 160 170 return; 161 171 } 172 void PIApplicationScreenSizeMM(int& szx, int& szy) 173 { 174 szx = szy = 400; 175 if (curapp) curapp->ScreenSizeMM(szx, szy); 176 return; 177 } 178 void PIApplicationScreenResolution(int& resolx, int& resoly) 179 { 180 resolx = resoly = 30; 181 if (curapp) curapp->ScreenResolution(resolx, resoly); 182 return; 183 } -
trunk/SophyaPI/PI/piapplgen.h
r138 r1592 30 30 virtual void AppendMenu(PIMenu *pdm); 31 31 32 virtual void PrefCompSz(int& szx, int& szy) = 0; 33 virtual void ScreenSz(int& szx, int& szy) = 0; 32 virtual void PrefCompSize(int& szx, int& szy) = 0; 33 virtual void ScreenSize(int& szx, int& szy) = 0; 34 virtual void ScreenSizeMM(int& szx, int& szy) = 0; 35 virtual void ScreenResolution(int& resolx, int& resoly) = 0; 34 36 35 37 virtual void RedirectOutStream(PIConsole* cons, unsigned char va= PIVA_Def) = 0; … … 45 47 void PIApplicationPrefCompSize(int& szx, int& szy); 46 48 void PIApplicationScreenSize(int& szx, int& szy); 49 void PIApplicationScreenSizeMM(int& szx, int& szy); 50 void PIApplicationScreenResolution(int& resolx, int& resoly); 47 51 48 52 #endif -
trunk/SophyaPI/PI/piapplx.cc
r1263 r1592 117 117 118 118 int msx,msy; 119 PrefCompS z(msx, msy);119 PrefCompSize(msx, msy); 120 120 msy+=5; 121 121 topwdg->SetSize(sx, sy+msy); … … 279 279 280 280 /* --Methode-- */ 281 void PIApplicationX::PrefCompS z(int& szx, int& szy)281 void PIApplicationX::PrefCompSize(int& szx, int& szy) 282 282 { 283 283 int szf; … … 287 287 288 288 /* --Methode-- */ 289 void PIApplicationX::ScreenS z(int& szx, int& szy)289 void PIApplicationX::ScreenSize(int& szx, int& szy) 290 290 { 291 291 Display * dsp = PIXDisplay(); … … 293 293 szy = DisplayHeight(dsp, DefaultScreen(dsp)); 294 294 } 295 296 /* --Methode-- */ 297 void PIApplicationX::ScreenSizeMM(int& szx, int& szy) 298 { 299 Display * dsp = PIXDisplay(); 300 szx = DisplayWidthMM(dsp, DefaultScreen(dsp)); 301 szy = DisplayHeightMM(dsp, DefaultScreen(dsp)); 302 } 303 304 /* --Methode-- */ 305 void PIApplicationX::ScreenResolution(int& resolx, int& resoly) 306 { 307 Display * dsp = PIXDisplay(); 308 resolx = (int)((double)DisplayWidth(dsp, DefaultScreen(dsp))*10./ 309 (double)DisplayWidthMM(dsp, DefaultScreen(dsp))); 310 resoly = (int)((double)DisplayHeight(dsp, DefaultScreen(dsp))*10./ 311 (double)DisplayHeightMM(dsp, DefaultScreen(dsp))); 312 } 313 314 295 315 296 316 -
trunk/SophyaPI/PI/piapplx.h
r128 r1592 19 19 virtual void SetBlocked(); 20 20 21 virtual void PrefCompSz(int& szx, int& szy); 22 virtual void ScreenSz(int& szx, int& szy); 21 virtual void PrefCompSize(int& szx, int& szy); 22 virtual void ScreenSize(int& szx, int& szy); 23 virtual void ScreenSizeMM(int& szx, int& szy); 24 virtual void ScreenResolution(int& resolx, int& resoly); 23 25 24 26 virtual void RedirectOutStream(PIConsole* cons, unsigned char va= PIVA_Def); -
trunk/SophyaPI/PI/piaxestools.cc
r1589 r1592 80 80 // On definit la taille a partir de la taille par defaut des composantes 81 81 // PIApplicationPrefCompSize(bsx, bsy); 82 par->PrefCompS z(bsx, bsy);82 par->PrefCompSize(bsx, bsy); 83 83 spx = bsx/10; 84 84 spy = bsy/4; -
trunk/SophyaPI/PI/pidrwtools.cc
r1589 r1592 97 97 // On definit la taille a partir de la taille par defaut des composantes 98 98 // PIApplicationPrefCompSize(bsx, bsy); 99 par->PrefCompS z(bsx, bsy);99 par->PrefCompSize(bsx, bsy); 100 100 spx = bsx/10; 101 101 spy = bsy/4; -
trunk/SophyaPI/PI/pigraphgen.cc
r316 r1592 112 112 // Trace la chaîne de caractères "s" à la position "x,y", 113 113 // en utilisant la couleur d'avant-plan (Foreground) 114 // La chaine est trace avec une justification a gauche, ou droite, 115 // ou centree (horzontal) - bas, haut, milieu (vertical), en fonction de 116 // de la valeur du flag "pos" 117 //| PI_HorizontalLeft PI_HorizontalCenter PI_HorizontalRight 118 //| PI_VerticalBottom PI_VerticalCenter PI_VerticalTop 114 119 // void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, int pos = 0) 115 120 // Trace la chaîne de caractères "s" à la position "x,y" . La couleur d' 116 121 // arrière-plan est utilisée pour remplir la zone rectangulaire occupée par 117 122 // le tracé de texte. 123 // La chaine est trace avec une justification a gauche, ou droite, 124 // ou centree (horzontal) - bas, haut, milieu (vertical), en fonction de 125 // de la valeur du flag "pos" 126 //| PI_HorizontalLeft PI_HorizontalCenter PI_HorizontalRight 127 //| PI_VerticalBottom PI_VerticalCenter PI_VerticalTop 118 128 //-- 119 129 -
trunk/SophyaPI/PI/pigraphgen.h
r1034 r1592 27 27 PI_TriangleMarker=7, PI_FTriangleMarker=8, 28 28 PI_StarMarker=9, PI_FStarMarker=10 }; 29 30 enum PIGrPosHorizontal { PI_HorizontalLeft = 0, PI_HorizontalCenter = 1, 31 PI_HorizontalRight = 2 }; 32 enum PIGrPosVertical { PI_VerticalBottom = 32, PI_VerticalCenter = 36, 33 PI_VerticalTop = 40 }; 29 34 30 35 enum PIGOMode { PI_GOCopy = 0, PI_GOXOR = 1, PI_GOInvert = 2 }; -
trunk/SophyaPI/PI/piimgtools.cc
r1512 r1592 63 63 // On definit la taille a partir de la taille par defaut des composantes 64 64 // PIApplicationPrefCompSize(bsx, bsy); 65 par->PrefCompS z(bsx, bsy);65 par->PrefCompSize(bsx, bsy); 66 66 spx = bsx/10; 67 67 spy = bsy/4; -
trunk/SophyaPI/PI/piversion.h
r1564 r1592 2 2 #define PIVERSION_H_SEEN 3 3 4 #define PI_VERSIONNUMBER 2.984 #define PI_VERSIONNUMBER 3.1 5 5 6 6 #endif -
trunk/SophyaPI/PI/psfile.cc
r1573 r1592 293 293 294 294 /* 295 Utilisation de la resolution coordonnees utilisateur (resolution ecran) 296 pour definir correctement la taille des fontes 297 R. Ansari - Juillet 2001 298 */ 299 /* Definition de la resolution coordonnees user par defaut (point/cm ou pixels/cm) */ 300 301 int PSFile::def_user_resol_X = 30; 302 int PSFile::def_user_resol_Y = 30; 303 void PSFile::SetDefaultUserResolution(int resx, int resy) 304 { 305 if ((resx < 1) || (resy < 1)) return; 306 def_user_resol_X = resx; 307 def_user_resol_Y = resy; 308 } 309 void PSFile::GetDefaultUserResolution(int& resx, int& resy) 310 { 311 if ((resx < 1) || (resy < 1)) return; 312 resx = def_user_resol_X; 313 resy = def_user_resol_Y; 314 } 315 316 317 /* 295 318 * PostScript encapsule... 296 319 * -
trunk/SophyaPI/PI/psfile.h
r440 r1592 27 27 #include "pifontgen.h" 28 28 29 #include "pigraphgen.h" // Types enumeres repris de P eida:PIFontSize...29 #include "pigraphgen.h" // Types enumeres repris de PI:PIFontSize... 30 30 #include PICMAP_H 31 31 … … 71 71 72 72 public: 73 /* Definition de la resolution coordonnees user par defaut (point/cm) */ 74 static void SetDefaultUserResolution(int resx, int resy); 75 static void GetDefaultUserResolution(int & resx, int & resy); 76 73 77 /* Production fichier eps */ 74 78 PSFile (const char * FileName, double sc = 1.0); … … 201 205 int mMarkerSize; /* Taille (en points) du marker courant */ 202 206 bool setFontDone ; /* Pour forcer la selection de Marker apres DrawString() */ 207 208 /* resolution coordonnees user (point/cm - pixels/cm) */ 209 static int def_user_resol_X, def_user_resol_Y; 203 210 } ; 204 211
Note:
See TracChangeset
for help on using the changeset viewer.