[89] | 1 | #include <stdio.h>
|
---|
| 2 |
|
---|
[2615] | 3 | #include "sopnamsp.h"
|
---|
[89] | 4 | #include "pigraphmac.h"
|
---|
[369] | 5 | #include "UDrawingState.h"
|
---|
[89] | 6 |
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | // #define DEBUG_PIBWDGX Flag pour impression de debug etc ...
|
---|
| 10 |
|
---|
| 11 | /* --Methode-- */
|
---|
| 12 | PIGraphicMac::PIGraphicMac(PIWdg* wdg)
|
---|
| 13 | : PIGraphicGen(wdg)
|
---|
| 14 | {
|
---|
| 15 | mPane = wdg->mPane;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | /* --Methode-- */
|
---|
| 19 | PIGraphicMac::~PIGraphicMac()
|
---|
| 20 | {
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | /* --Methode-- */
|
---|
| 24 | void PIGraphicMac::Erase(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
|
---|
| 25 | {
|
---|
| 26 | if (mPane->FocusDraw()) {
|
---|
| 27 | Rect theRect = {(int)y0, (int)x0, (int)y0+(int)dy, (int)x0+(int)dx};
|
---|
| 28 | ::EraseRect(&theRect);
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | /* --Methode-- */
|
---|
[369] | 33 | void PIGraphicMac::DrawString(PIGrCoord x, PIGrCoord y, char const* s, int /*pos*/)
|
---|
[89] | 34 | {
|
---|
| 35 | if (!mPane->FocusDraw()) {
|
---|
| 36 | ::MoveTo(x, y);
|
---|
| 37 | LStr255 ps = s;
|
---|
[369] | 38 | StTextState saver;
|
---|
| 39 | myFont.Apply();
|
---|
[89] | 40 | ::DrawString(ps);
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | /* --Methode-- */
|
---|
[369] | 45 | void PIGraphicMac::DrawOpaqueString(PIGrCoord x, PIGrCoord y, char const* s, int /*pos*/)
|
---|
[89] | 46 | {
|
---|
| 47 | if (mPane->FocusDraw()) {
|
---|
| 48 | ::MoveTo(x, y);
|
---|
| 49 | LStr255 ps = s;
|
---|
[369] | 50 | StTextState saver;
|
---|
| 51 | myFont.Apply();
|
---|
[89] | 52 | Rect box;
|
---|
| 53 | box.left = x;
|
---|
| 54 | box.bottom = y;
|
---|
| 55 | int iWidth = TextWidth(s,0,strlen(s));
|
---|
| 56 | box.right = box.left + iWidth;
|
---|
| 57 | int z;
|
---|
[369] | 58 | box.top = box.bottom + myFont.GetFontHeight(z,z);
|
---|
[89] | 59 | ::TETextBox(s,strlen(s),&box,teForceLeft);
|
---|
| 60 | }
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 |
|
---|
| 64 | /* --Methode-- */
|
---|
| 65 | void PIGraphicMac::DrawLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2)
|
---|
| 66 | {
|
---|
| 67 | if (mPane->FocusDraw()) {
|
---|
| 68 | ::MoveTo(x1,y1);
|
---|
| 69 | ::LineTo(x2,y2);
|
---|
| 70 | }
|
---|
| 71 | }
|
---|
| 72 |
|
---|
| 73 |
|
---|
| 74 | /* --Methode-- */
|
---|
| 75 | void PIGraphicMac::DrawBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
|
---|
| 76 | {
|
---|
| 77 | if (mPane->FocusDraw()) {
|
---|
| 78 | Rect r = {y0, x0, (int)y0+(int)dy, (int)x0+(int)dx};
|
---|
| 79 | if (r.top > r.bottom) swap(r.top, r.bottom);
|
---|
| 80 | if (r.left > r.right) swap(r.left, r.right);
|
---|
| 81 | r.right++; r.bottom++;
|
---|
| 82 | ::FrameRect(&r);
|
---|
| 83 | }
|
---|
| 84 | }
|
---|
| 85 |
|
---|
| 86 | /* --Methode-- */
|
---|
| 87 | void PIGraphicMac::DrawFBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
|
---|
| 88 | {
|
---|
| 89 | if (mPane->FocusDraw()) {
|
---|
| 90 | Rect r = {y0, x0, (int)y0+(int)dy, (int)x0+(int)dx};
|
---|
| 91 | if (r.top > r.bottom) swap(r.top, r.bottom);
|
---|
| 92 | if (r.left > r.right) swap(r.left, r.right);
|
---|
| 93 | r.right++; r.bottom++;
|
---|
| 94 | ::PaintRect(&r);
|
---|
| 95 | }
|
---|
| 96 | }
|
---|
| 97 |
|
---|
| 98 | /* --Methode-- */
|
---|
| 99 | void PIGraphicMac::DrawCircle(PIGrCoord x0, PIGrCoord y0, PIGrCoord r)
|
---|
| 100 | {
|
---|
| 101 | if (mPane->FocusDraw()) {
|
---|
| 102 | Rect rr = {(int)y0-(int)r, (int)x0-(int)r, (int)y0+(int)r, (int)x0+(int)r};
|
---|
| 103 | if (rr.top > rr.bottom) swap(rr.top, rr.bottom);
|
---|
| 104 | if (rr.left > rr.right) swap(rr.left, rr.right);
|
---|
| 105 | ::FrameOval(&rr);
|
---|
| 106 | }
|
---|
| 107 | }
|
---|
| 108 |
|
---|
| 109 | /* --Methode-- */
|
---|
| 110 | void PIGraphicMac::DrawFCircle(PIGrCoord x0, PIGrCoord y0, PIGrCoord r)
|
---|
| 111 | {
|
---|
| 112 | if (mPane->FocusDraw()) {
|
---|
| 113 | Rect rr = {(int)y0-(int)r, (int)x0-(int)r, (int)y0+(int)r, (int)x0+(int)r};
|
---|
| 114 | if (rr.top > rr.bottom) swap(rr.top, rr.bottom);
|
---|
| 115 | if (rr.left > rr.right) swap(rr.left, rr.right);
|
---|
| 116 | ::PaintOval(&rr);
|
---|
| 117 | }
|
---|
| 118 | }
|
---|
| 119 |
|
---|
[369] | 120 | /* --Methode-- */
|
---|
| 121 | void PIGraphicMac::DrawOval(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
|
---|
| 122 | {
|
---|
| 123 | if (mPane->FocusDraw()) {
|
---|
| 124 | Rect rr = {(int)y0-(int)dy, (int)x0-(int)dx, (int)y0+(int)dy, (int)x0+(int)dx};
|
---|
| 125 | if (rr.top > rr.bottom) swap(rr.top, rr.bottom);
|
---|
| 126 | if (rr.left > rr.right) swap(rr.left, rr.right);
|
---|
| 127 | ::FrameOval(&rr);
|
---|
| 128 | }
|
---|
| 129 | }
|
---|
[89] | 130 |
|
---|
| 131 | /* --Methode-- */
|
---|
[369] | 132 | void PIGraphicMac::DrawFOval(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
|
---|
[89] | 133 | {
|
---|
[369] | 134 | if (mPane->FocusDraw()) {
|
---|
| 135 | Rect rr = {(int)y0-(int)dy, (int)x0-(int)dx, (int)y0+(int)dy, (int)x0+(int)dx};
|
---|
| 136 | if (rr.top > rr.bottom) swap(rr.top, rr.bottom);
|
---|
| 137 | if (rr.left > rr.right) swap(rr.left, rr.right);
|
---|
| 138 | ::PaintOval(&rr);
|
---|
| 139 | }
|
---|
| 140 | }
|
---|
| 141 |
|
---|
| 142 |
|
---|
| 143 | /* --Methode-- */
|
---|
| 144 | void PIGraphicMac::DrawPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc)
|
---|
| 145 | {
|
---|
[89] | 146 | PolyHandle h = MakePoly(x,y,n);
|
---|
| 147 | if (h) {
|
---|
| 148 | ::FramePoly(h);
|
---|
| 149 | ::KillPoly(h);
|
---|
| 150 | }
|
---|
| 151 |
|
---|
| 152 | }
|
---|
| 153 |
|
---|
| 154 | /* --Methode-- */
|
---|
[369] | 155 | void PIGraphicMac::DrawFPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc)
|
---|
[89] | 156 | {
|
---|
| 157 | PolyHandle h = MakePoly(x,y,n);
|
---|
| 158 | if (h) {
|
---|
| 159 | ::PaintPoly(h);
|
---|
| 160 | ::KillPoly(h);
|
---|
| 161 | }
|
---|
| 162 | }
|
---|
| 163 |
|
---|
[369] | 164 |
|
---|
[89] | 165 | /* --Methode-- */
|
---|
[369] | 166 | void PIGraphicMac::DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
|
---|
[2257] | 167 | double degdeb, double deltadeg)
|
---|
[369] | 168 | {
|
---|
| 169 | if (mPane->FocusDraw()) {
|
---|
| 170 | Rect rr = {(int)y0-(int)dy, (int)x0-(int)dx, (int)y0+(int)dy, (int)x0+(int)dx};
|
---|
| 171 | if (rr.top > rr.bottom) swap(rr.top, rr.bottom);
|
---|
| 172 | if (rr.left > rr.right) swap(rr.left, rr.right);
|
---|
[2257] | 173 | ::FrameArc(&rr, degdeb, deltadeg);
|
---|
[369] | 174 | }
|
---|
| 175 | }
|
---|
| 176 |
|
---|
| 177 | /* --Methode-- */
|
---|
| 178 | void PIGraphicMac::DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
|
---|
[2257] | 179 | double degdeb, double deltadeg)
|
---|
[369] | 180 | {
|
---|
| 181 | if (mPane->FocusDraw()) {
|
---|
| 182 | Rect rr = {(int)y0-(int)dy, (int)x0-(int)dx, (int)y0+(int)dy, (int)x0+(int)dx};
|
---|
| 183 | if (rr.top > rr.bottom) swap(rr.top, rr.bottom);
|
---|
| 184 | if (rr.left > rr.right) swap(rr.left, rr.right);
|
---|
[2257] | 185 | ::PaintArc(&rr, degdeb, deltadeg);
|
---|
[369] | 186 | }
|
---|
| 187 | }
|
---|
| 188 |
|
---|
| 189 |
|
---|
| 190 | /* --Methode-- */
|
---|
[89] | 191 | PolyHandle PIGraphicMac::MakePoly(PIGrCoord *x, PIGrCoord *y, int n)
|
---|
| 192 | {
|
---|
| 193 | if (mPane->FocusDraw()) {
|
---|
| 194 | PolyHandle h = ::OpenPoly();
|
---|
| 195 | ::MoveTo(x[0], y[0]);
|
---|
| 196 | for (int i=1; i<n; i++) {
|
---|
| 197 | ::LineTo(x[i], y[i]);
|
---|
| 198 | }
|
---|
| 199 | ::MoveTo(x[0], y[0]);
|
---|
| 200 | ClosePoly();
|
---|
| 201 | return h;
|
---|
| 202 | }
|
---|
| 203 | return NULL;
|
---|
| 204 | }
|
---|
| 205 |
|
---|
| 206 |
|
---|
| 207 | /* --Methode-- */
|
---|
| 208 | void PIGraphicMac::DrawMarker(PIGrCoord x0, PIGrCoord y0)
|
---|
| 209 | {
|
---|
| 210 | int hmsz = mMrkSz/2;
|
---|
| 211 | int dmsz = mMrkSz-hmsz;
|
---|
| 212 | PIGrCoord x[4],y[4];
|
---|
| 213 | PILineAtt clatt;
|
---|
| 214 |
|
---|
| 215 | if (mMrk == PI_DotMarker) {
|
---|
| 216 | ::MoveTo( x0, y0);
|
---|
| 217 | ::Line(0,0);
|
---|
| 218 | }
|
---|
| 219 |
|
---|
| 220 | else
|
---|
| 221 | {
|
---|
| 222 | clatt = mLAtt;
|
---|
| 223 | SelLine(PI_ThinLine);
|
---|
| 224 | switch (mMrk)
|
---|
| 225 | {
|
---|
| 226 | case PI_PlusMarker :
|
---|
| 227 | DrawLine((int)x0-hmsz, y0, (int)x0+dmsz, y0);
|
---|
| 228 | DrawLine(x0, (int)y0-hmsz, x0, (int)y0+dmsz);
|
---|
| 229 | break;
|
---|
| 230 | case PI_CrossMarker :
|
---|
| 231 | DrawLine((int)x0-hmsz, (int)y0-hmsz, (int)x0+dmsz, (int)y0+dmsz);
|
---|
| 232 | DrawLine((int)x0-hmsz, (int)y0+dmsz, (int)x0+dmsz, (int)y0-hmsz);
|
---|
| 233 | break;
|
---|
| 234 | case PI_CircleMarker :
|
---|
| 235 | DrawCircle(x0, y0, hmsz);
|
---|
| 236 | break;
|
---|
| 237 | case PI_FCircleMarker :
|
---|
| 238 | DrawFCircle(x0, y0, hmsz);
|
---|
| 239 | break;
|
---|
| 240 | case PI_BoxMarker :
|
---|
| 241 | DrawBox((int)x0-hmsz, (int)y0-hmsz, mMrkSz, mMrkSz);
|
---|
| 242 | break;
|
---|
| 243 | case PI_FBoxMarker :
|
---|
| 244 | DrawFBox((int)x0-hmsz, (int)y0-hmsz, mMrkSz, mMrkSz);
|
---|
| 245 | break;
|
---|
| 246 | case PI_TriangleMarker :
|
---|
| 247 | x[1] = mMrkSz; y[1] = 0; x[2] = -hmsz; y[2] = -mMrkSz;
|
---|
| 248 | x[3] = -dmsz; y[3] = +mMrkSz; x[0] = (int)x0-hmsz; y[0] = (int)y0+hmsz;
|
---|
| 249 | DrawPolygon(x, y, 4);
|
---|
| 250 | break;
|
---|
| 251 | case PI_FTriangleMarker :
|
---|
| 252 | x[1] = mMrkSz; y[1] = 0; x[2] = -hmsz; y[2] = -mMrkSz;
|
---|
| 253 | x[3] = -dmsz; y[3] = +mMrkSz; x[0] = (int)x0-hmsz; y[0] = (int)y0+hmsz;
|
---|
| 254 | DrawFPolygon(x, y, 4);
|
---|
| 255 | break;
|
---|
| 256 | default :
|
---|
| 257 | ::MoveTo( x0, y0);
|
---|
| 258 | ::Line(0,0);
|
---|
| 259 | break;
|
---|
| 260 | }
|
---|
| 261 | SelLine(clatt);
|
---|
| 262 | }
|
---|
| 263 | return;
|
---|
| 264 | }
|
---|
| 265 |
|
---|
| 266 | /* --Methode-- */
|
---|
| 267 | void PIGraphicMac::DrawMarkers(PIGrCoord *x, PIGrCoord *y, int n)
|
---|
| 268 | {
|
---|
| 269 | int i;
|
---|
| 270 |
|
---|
| 271 | if (n <= 0) return;
|
---|
| 272 | for(i=0; i<n; i++) DrawMarker(x[i], y[i]);
|
---|
| 273 | }
|
---|
| 274 |
|
---|
| 275 |
|
---|
| 276 | /* --Methode-- */
|
---|
| 277 | void PIGraphicMac::DrawPixmap(PIGrCoord x, PIGrCoord y, unsigned char *pix,
|
---|
| 278 | int sx, int sy, PIColorMap* cmap)
|
---|
| 279 | {
|
---|
| 280 | Rect frame;
|
---|
| 281 | SetRect(&frame, 0, 0, sx, sy);
|
---|
| 282 | Rect dstFrame;
|
---|
| 283 | SetRect(&dstFrame, x, y, sx, sy);
|
---|
| 284 | GWorldPtr gWorld;
|
---|
| 285 | ThrowIfOSErr_(NewGWorld(&gWorld, 8, &frame, cmap->GetCTab(), nil, 0));
|
---|
| 286 | PixMapHandle pmh = GetGWorldPixMap(gWorld);
|
---|
| 287 | ::LockPixels (pmh);
|
---|
| 288 | Ptr pmap = GetPixBaseAddr(pmh);
|
---|
| 289 | memcpy(pmap, pix, sx*sy);
|
---|
| 290 | ::ForeColor (blackColor);
|
---|
| 291 | ::BackColor (whiteColor);
|
---|
| 292 | ::CopyBits((BitMap *) (*pmh),
|
---|
| 293 | &mPane->GetMacPort()->portBits,
|
---|
| 294 | &frame, &dstFrame, srcCopy, nil);
|
---|
| 295 | ::UnlockPixels (pmh);
|
---|
| 296 | DisposeGWorld(gWorld);
|
---|
| 297 | }
|
---|
| 298 |
|
---|
| 299 |
|
---|
| 300 |
|
---|
| 301 | /* --Methode-- */
|
---|
| 302 | void PIGraphicMac::SelForeground(PIColors col)
|
---|
| 303 | {
|
---|
| 304 | if (mPane->FocusDraw()) {
|
---|
| 305 | long color;
|
---|
| 306 | switch (col) {
|
---|
| 307 | case PI_Black:
|
---|
| 308 | color = blackColor;
|
---|
| 309 | break;
|
---|
| 310 | case PI_White:
|
---|
| 311 | color = whiteColor;
|
---|
| 312 | break;
|
---|
| 313 | case PI_Red:
|
---|
| 314 | color = redColor;
|
---|
| 315 | break;
|
---|
| 316 | case PI_Blue:
|
---|
| 317 | color = blueColor;
|
---|
| 318 | break;
|
---|
| 319 | case PI_Green:
|
---|
| 320 | color = greenColor;
|
---|
| 321 | break;
|
---|
| 322 | case PI_Yellow:
|
---|
| 323 | color = yellowColor;
|
---|
| 324 | break;
|
---|
| 325 | default:
|
---|
| 326 | color = blackColor;
|
---|
| 327 | }
|
---|
| 328 | ::ForeColor(color);
|
---|
| 329 | mFCol = col;
|
---|
| 330 | }
|
---|
| 331 | }
|
---|
| 332 |
|
---|
| 333 | /* --Methode-- */
|
---|
| 334 | void PIGraphicMac::SelBackground(PIColors col)
|
---|
| 335 | {
|
---|
| 336 | if (mPane->FocusDraw()) {
|
---|
| 337 | long color;
|
---|
| 338 | switch (col) {
|
---|
| 339 | case PI_Black:
|
---|
| 340 | color = blackColor;
|
---|
| 341 | break;
|
---|
| 342 | case PI_White:
|
---|
| 343 | color = whiteColor;
|
---|
| 344 | break;
|
---|
| 345 | case PI_Red:
|
---|
| 346 | color = redColor;
|
---|
| 347 | break;
|
---|
| 348 | case PI_Blue:
|
---|
| 349 | color = blueColor;
|
---|
| 350 | break;
|
---|
| 351 | case PI_Green:
|
---|
| 352 | color = greenColor;
|
---|
| 353 | break;
|
---|
| 354 | case PI_Yellow:
|
---|
| 355 | color = yellowColor;
|
---|
| 356 | break;
|
---|
| 357 | default:
|
---|
| 358 | color = blackColor;
|
---|
| 359 | }
|
---|
| 360 | mBCol = col;
|
---|
| 361 | ::BackColor(color);
|
---|
| 362 | }
|
---|
| 363 | }
|
---|
| 364 |
|
---|
| 365 | /* --Methode-- */
|
---|
| 366 | void PIGraphicMac::SelForeground(PIColorMap& cmap, int cid)
|
---|
| 367 | {
|
---|
| 368 | if (mPane->FocusDraw()) {
|
---|
| 369 | PIColor picol = cmap.GetColor(cid);
|
---|
| 370 | RGBColor qdCol;
|
---|
| 371 |
|
---|
| 372 | qdCol.red = picol.red;
|
---|
| 373 | qdCol.green = picol.green;
|
---|
| 374 | qdCol.blue = picol.blue;
|
---|
| 375 |
|
---|
| 376 | ::RGBForeColor(&qdCol);
|
---|
| 377 | }
|
---|
| 378 | }
|
---|
| 379 |
|
---|
| 380 | /* --Methode-- */
|
---|
| 381 | void PIGraphicMac::SelBackground(PIColorMap& cmap, int cid)
|
---|
| 382 | {
|
---|
| 383 | if (mPane->FocusDraw()) {
|
---|
| 384 | PIColor picol = cmap.GetColor(cid);
|
---|
| 385 | RGBColor qdCol;
|
---|
| 386 |
|
---|
| 387 | qdCol.red = picol.red;
|
---|
| 388 | qdCol.green = picol.green;
|
---|
| 389 | qdCol.blue = picol.blue;
|
---|
| 390 |
|
---|
| 391 | ::RGBBackColor(&qdCol);
|
---|
| 392 | }
|
---|
| 393 | }
|
---|
| 394 |
|
---|
| 395 | /* --Methode-- */
|
---|
| 396 | void PIGraphicMac::SelGOMode(PIGOMode mod)
|
---|
| 397 | {
|
---|
| 398 | if (mod == mGOm) return;
|
---|
| 399 | if (mPane->FocusDraw())
|
---|
| 400 | switch (mod)
|
---|
| 401 | {
|
---|
| 402 | case PI_GOCopy :
|
---|
| 403 | ::PenMode(patCopy);
|
---|
| 404 | mGOm = mod;
|
---|
| 405 | break;
|
---|
| 406 | case PI_GOXOR :
|
---|
| 407 | ::PenMode(patXor);
|
---|
| 408 | mGOm = mod;
|
---|
| 409 | break;
|
---|
| 410 | }
|
---|
| 411 | return;
|
---|
| 412 | }
|
---|
| 413 |
|
---|
| 414 |
|
---|
| 415 | /* --Methode-- */
|
---|
| 416 | void PIGraphicMac::SelFontSzPt(int npt, PIFontAtt att)
|
---|
| 417 | {
|
---|
[369] | 418 | myFont.SetFontSzPt(npt);
|
---|
| 419 | myFont.SetFontAtt(att);
|
---|
[89] | 420 | }
|
---|
| 421 |
|
---|
| 422 | /* --Methode-- */
|
---|
| 423 | void PIGraphicMac::SelFont(PIFontSize sz, PIFontAtt att)
|
---|
| 424 | {
|
---|
[369] | 425 | myFont.SetFontSz(sz);
|
---|
| 426 | myFont.SetFontAtt(att);
|
---|
[89] | 427 | }
|
---|
| 428 |
|
---|
[369] | 429 | /* --Methode-- */
|
---|
| 430 | void PIGraphicMac::SelFont(PIFont & fnt)
|
---|
| 431 | {
|
---|
| 432 | myFont = fnt;
|
---|
| 433 | }
|
---|
[89] | 434 |
|
---|
| 435 |
|
---|
| 436 | /* --Methode-- */
|
---|
[1890] | 437 | void PIGraphicMac::SelLine(PILineAtt const & att)
|
---|
[89] | 438 | {
|
---|
| 439 | if (mPane->FocusDraw()) {
|
---|
| 440 | switch(att) {
|
---|
| 441 | case PI_NormalLine:
|
---|
| 442 | ::PenSize(1,1);
|
---|
| 443 | break;
|
---|
| 444 | case PI_ThinLine:
|
---|
| 445 | ::PenSize(1,1); // Mettre en pointille, ou bien commentaire pour Laser ?
|
---|
| 446 | break;
|
---|
| 447 | case PI_ThickLine:
|
---|
| 448 | ::PenSize(2,2);
|
---|
| 449 | break;
|
---|
| 450 | }
|
---|
| 451 | }
|
---|
| 452 | mLAtt = att;
|
---|
| 453 | }
|
---|
| 454 |
|
---|
| 455 |
|
---|
| 456 | /* --Methode-- */
|
---|
| 457 | void PIGraphicMac::SelMarker(int msz, PIMarker mrk)
|
---|
| 458 | {
|
---|
| 459 | if (msz > 1) { mMrk = mrk; mMrkSz = msz; }
|
---|
| 460 | else { mMrk = PI_DotMarker; mMrkSz = 1; }
|
---|
| 461 | return;
|
---|
| 462 | }
|
---|
| 463 |
|
---|
| 464 |
|
---|
| 465 | /* --Methode-- */
|
---|
| 466 | void PIGraphicMac::SetClipRectangle(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
|
---|
| 467 | {
|
---|
| 468 | //$CHECK
|
---|
| 469 | }
|
---|
| 470 |
|
---|
| 471 | /* --Methode-- */
|
---|
| 472 | void PIGraphicMac::ClearClipRectangle()
|
---|
| 473 | {
|
---|
| 474 | //$CHECK
|
---|
| 475 | }
|
---|
| 476 |
|
---|
| 477 | /* --Methode-- */
|
---|
| 478 | PIColors PIGraphicMac::GetForeground()
|
---|
| 479 | {
|
---|
| 480 | return (mFCol);
|
---|
| 481 | }
|
---|
| 482 |
|
---|
| 483 | /* --Methode-- */
|
---|
| 484 | PIColors PIGraphicMac::GetBackground()
|
---|
| 485 | {
|
---|
| 486 | return (mBCol);
|
---|
| 487 | }
|
---|
| 488 |
|
---|
| 489 |
|
---|
| 490 | /* --Methode-- */
|
---|
| 491 | PIGOMode PIGraphicMac::GetGOMode()
|
---|
| 492 | {
|
---|
| 493 | return (mGOm);
|
---|
| 494 | }
|
---|
| 495 |
|
---|
| 496 | /* --Methode-- */
|
---|
| 497 | PIFontAtt PIGraphicMac::GetFontAtt()
|
---|
| 498 | {
|
---|
[369] | 499 | return (myFont.GetFontAtt());
|
---|
[89] | 500 | }
|
---|
| 501 |
|
---|
| 502 | /* --Methode-- */
|
---|
| 503 | int PIGraphicMac::GetFontSize()
|
---|
| 504 | {
|
---|
[369] | 505 | return (myFont.GetFontSize());
|
---|
[89] | 506 | }
|
---|
| 507 |
|
---|
| 508 | /* --Methode-- */
|
---|
| 509 | PILineAtt PIGraphicMac::GetLineAtt()
|
---|
| 510 | {
|
---|
| 511 | return (mLAtt);
|
---|
| 512 | }
|
---|
| 513 |
|
---|
| 514 | /* --Methode-- */
|
---|
| 515 | PIMarker PIGraphicMac::GetMarker()
|
---|
| 516 | {
|
---|
| 517 | return (mMrk);
|
---|
| 518 | }
|
---|
| 519 |
|
---|
| 520 | /* --Methode-- */
|
---|
| 521 | int PIGraphicMac::GetMarkerSize()
|
---|
| 522 | {
|
---|
| 523 | return (mMrkSz);
|
---|
| 524 | }
|
---|
| 525 |
|
---|
| 526 |
|
---|