Changeset 2754 in Sophya
- Timestamp:
- May 23, 2005, 6:25:18 PM (20 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/piaxes.cc
r2615 r2754 60 60 //| kIntTicks, kExtTicks 61 61 //| kMajTicks, kMinTicks 62 //| kLabelsH, kLabelsV, kLabels 62 63 //| kAxesDflt = kStdAxes = 63 64 //| kBoxAxes | kTicks | | kIntTicks | kLabels … … 149 150 // Les labels 150 151 151 if (flags & kLabels ) {152 if (flags & kLabelsH) { 152 153 double declab = 2*xMajTickLen; 153 154 if (!aYdir) … … 155 156 else 156 157 DrawHLabels(g, y0axes+declab, xMajTicks, PI_VerticalTop); 157 158 declab = 2.*yMajTickLen; 158 } 159 if (flags & kLabelsV) { 160 double declab = 2.*yMajTickLen; 159 161 if (!aXdir) 160 162 DrawVLabels(g, x0axes-declab, yMajTicks, PI_HorizontalRight); … … 209 211 // Les labels 210 212 211 if (flags & kLabels ) {213 if (flags & kLabelsH) { 212 214 double declab = xMajTickLen; 213 215 if (flags & kExtTicks) declab *= 2.; … … 218 220 DrawHLabels(g, g->DeltaUCY(yMax, declab), xMajTicks, PI_VerticalTop); 219 221 } 220 declab = yMajTickLen; 222 } 223 if (flags & kLabelsV) { 224 double declab = yMajTickLen; 221 225 if (flags & kExtTicks) declab *= 2.; 222 226 if (!aXdir) { -
trunk/SophyaPI/PI/piaxes.h
r2522 r2754 15 15 kBoxAxes = 0x0002, 16 16 kTicks = 0x0004, 17 kGridOn = 0x0008, 18 17 19 kIntTicks = 0x0010, 18 20 kExtTicks = 0x0020, 19 kMajTicks = 0x0040, 20 kMinTicks = 0x0080, 21 kLabels = 0x1000, 22 kGridOn = 0x2000, 21 kMajTicks = 0x0030, 22 kMinTicks = 0x0040, 23 24 kLabelsH = 0x1000, 25 kLabelsV = 0x2000, 26 kLabels = kLabelsH | kLabelsV, 27 23 28 // Axes trace par defaut 24 29 kAxesDflt = kBoxAxes | kTicks | kMajTicks | kIntTicks | kLabels, -
trunk/SophyaPI/PI/pieldrw.cc
r2637 r2754 558 558 else if (opts == "nolabels") 559 559 SetAxesFlags(GetAxesFlags() & ~kLabels); 560 else if (opts == "hlabels") 561 SetAxesFlags(GetAxesFlags() | kLabelsH); 562 else if (opts == "nohlabels") 563 SetAxesFlags(GetAxesFlags() & ~kLabelsH); 564 else if (opts == "vlabels") 565 SetAxesFlags(GetAxesFlags() | kLabelsV); 566 else if (opts == "novlabels") 567 SetAxesFlags(GetAxesFlags() & ~kLabelsV); 560 568 else if (opts == "ticks") 561 569 SetAxesFlags(GetAxesFlags() | kTicks); … … 626 634 info += " centeredaxes finecenteredaxes centeredaxesgrid \n"; 627 635 info += " finecenteredaxesgrid grid/nogrid \n"; 628 info += " >> Axe ticks/labels: \n"; 629 info += " labels/nolabels ticks/noticks minorticks/nominorticks \n"; 636 info += " >> Axe ticks/labels (h=horizontal/x, v=vertical/y): \n"; 637 info += " labels/nolabels hlabels/nohlabels vlabels/novlabels \n"; 638 info += " ticks/noticks minorticks/nominorticks \n"; 630 639 info += " extticks/intticks/extintticks nbticks=X_NbTicks,Y_NbTicks \n"; 631 640 info += " tickslen=MajorTickLenFrac,MinorTickLenFraC \n"; -
trunk/SophyaPI/PI/pigratt.cc
r2615 r2754 550 550 else if (mka[0] == "fbox") dmrk = PI_FBoxMarker; 551 551 else if (mka[0] == "triangle") dmrk = PI_TriangleMarker; 552 else if (mka[0] == "ftriangle") dmrk = PI_ TriangleMarker;552 else if (mka[0] == "ftriangle") dmrk = PI_FTriangleMarker; 553 553 else if (mka[0] == "star") dmrk = PI_StarMarker; 554 else if (mka[0] == "fstar") dmrk = PI_ StarMarker;554 else if (mka[0] == "fstar") dmrk = PI_FStarMarker; 555 555 } 556 556 if (mka.size() > 1) dmsz = atoi(mka[1].c_str()); … … 560 560 } 561 561 // decodage de arrowmarker sour forme de arrow=type,size 562 else if (gratt.substr(0, 7) == "arrow=") {562 else if (gratt.substr(0, 6) == "arrow=") { 563 563 PIArrowMarker darr = PI_NotDefArrowMarker; 564 int dasz = 1;564 int dasz = 3; 565 565 vector<string> mka; 566 566 FillVStringFrString(gratt.substr(6), mka, ','); -
trunk/SophyaPI/PI/pitxtdrw.cc
r2615 r2754 12 12 // ---------------------------------------------------------- 13 13 // Classe de representation d'une serie de lignes de texte 14 // eventuelleme t avec marker et bout de ligne14 // eventuellement avec marker ( et bout de ligne <- pas fait) 15 15 // ---------------------------------------------------------- 16 16 // -------------------------------------------------------------------------- … … 22 22 // 23 23 // Classe de representation d'une serie de lignes eventuellement 24 // avec un marker et un bout de ligne24 // avec un marker 25 25 // 26 26 //-- … … 82 82 { 83 83 if (mLines.size() < 1) return; 84 PIGrCoord x,y,dx,dy,fa,fd; 84 PIGraphicAtt siatt = GetGraphicAtt(); 85 PIGraphicAtt catt; 86 87 PIGrCoord x,y,ym,dx,dy,fa,fd; 85 88 x = 0.05; y = 0.95; 86 for(unsigned int k=0; k<mLines.size(); k++) { // Trace des lignes de texte 89 for(unsigned int k=0; k<mLines.size(); k++) { 90 catt = siatt; 91 catt.UpdateFrom(mLines[k].att); 92 SelGraAtt(g); 93 if (mLines[k].att.GetMarker() != PI_NotDefMarker) { 94 x = 0.03; 95 ym = (double)y-(double)(g->GetFontHeight(fa, fd))*0.5; 96 g->DrawMarker(x, ym); 97 double dxu, dyu; 98 double dxpix = g->GetMarkerSize(); 99 g->DGrC2UC(dxpix, 0, dxu, dyu); 100 x = (double)x+dxu+0.02; 101 } 102 else x = 0.05; 103 // Trace des lignes de texte 87 104 g->DrawString(x,y,mLines[k].line.c_str(),PI_VerticalTop); 88 105 y = (double)y-(double)(g->GetFontHeight(fa, fd))*1.1; 89 106 } 90 107 if (fgFrame) { // Trace de cadre 108 SetGraphicAtt(siatt); 109 SelGraAtt(g); 91 110 x = y = 0.; 92 111 dx = dy = 1.;
Note:
See TracChangeset
for help on using the changeset viewer.