Changeset 2243 in Sophya for trunk/SophyaPI/PIext/pistdimgapp.cc
- Timestamp:
- Nov 3, 2002, 10:52:49 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pistdimgapp.cc
r2231 r2243 811 811 ParseDisplayOption(sop, opts); 812 812 PIGraphicAtt gratt(opts); 813 elmgr->ElAddText(xp,yp,txt.c_str(), gratt); 813 unsigned long tpd = 0; 814 gratt.DecodeTextPosDirAtt(opts, tpd, false); 815 elmgr->ElAddText(xp,yp,txt.c_str(), gratt, tpd); 814 816 eld->Refresh(); 815 817 } 816 818 817 819 /* --Methode-- */ 818 void PIStdImgApp::AddLine(double xp1, double yp1, double xp2, double yp2, string const& sop) 820 void PIStdImgApp::AddLine(double xp1, double yp1, double xp2, double yp2, 821 string const& sop, bool fgarrow) 819 822 { 820 823 PIDrawer *eld=CurrentElDrawer(); … … 831 834 ParseDisplayOption(sop, opts); 832 835 PIGraphicAtt gratt(opts); 833 elmgr->ElAddLine(xp1, yp1, xp2, yp2, gratt); 836 if (fgarrow) 837 elmgr->ElAddArrow(xp1, yp1, xp2, yp2, gratt); 838 else elmgr->ElAddLine(xp1, yp1, xp2, yp2, gratt); 834 839 eld->Refresh(); 835 840 } … … 887 892 ParseDisplayOption(sop, opts); 888 893 PIGraphicAtt gratt(opts); 889 890 if (fgfill) elmgr->ElAddFCirc(xc, yc, r, gratt); 891 else elmgr->ElAddCirc(xc, yc, r, gratt); 894 if (r < -0.5) 895 elmgr->ElAddMarker(xc, yc, gratt); 896 else { 897 if (fgfill) elmgr->ElAddFCirc(xc, yc, r, gratt); 898 else elmgr->ElAddCirc(xc, yc, r, gratt); 899 } 900 eld->Refresh(); 901 } 902 903 /* --Methode-- */ 904 void PIStdImgApp::AddArc(double x1, double y1, double x2, double y2, 905 double x3, double y3, string const& sop, bool fgfill) 906 { 907 PIDrawer *eld=CurrentElDrawer(); 908 if (eld == NULL) return; 909 PIElDrawer* eld2 = dynamic_cast<PIElDrawer *>(eld); 910 PIElDrawer3D* eld3 = dynamic_cast<PIElDrawer3D *>(eld); 911 if ((eld2 == NULL) && (eld3 == NULL)) return; 912 PIElDrwMgr* elmgr = NULL; 913 if (eld2) elmgr = &(eld2->ElDrwMgr()); 914 else if (eld3) elmgr = &(eld3->ElDrwMgr()); 915 if (elmgr == NULL) return; 916 917 vector<string> opts; 918 ParseDisplayOption(sop, opts); 919 PIGraphicAtt gratt(opts); 920 if (fgfill) 921 elmgr->ElAddFArc(x1, y1, x2, y2, x3, y3, gratt); 922 else elmgr->ElAddArc(x1, y1, x2, y2, x3, y3, gratt); 892 923 eld->Refresh(); 893 924 }
Note:
See TracChangeset
for help on using the changeset viewer.