# dont perform the libgen and libsocket test in configure for AROS.
[AROS-Contrib.git] / fish / surf / control.c
blob3e484e102f5c5e0dcc98c8dc097573ca0332a5ab
1 #include "bezpt.h"
2 #include "control.h"
3 #include "scrnio.h"
4 #include "mytypes.h"
6 CURMODE CurMode = DRAWPOLY;
8 void DrawBox(int, int, int);
9 void DrawSqr(int, int, int);
10 void ClrWindow(bool);
11 void ClearSegments();
13 void SetFitBez()
15 if( GetNumSegs() < 1 ) {
16 return;
18 ClrWindow(true);
19 CurMode = FITBEZIER;
20 XdrawAllBezSegs();
26 void SetPolyDraw()
28 ClrWindow(true);
29 CurMode = DRAWPOLY;
30 ClearSegments();
33 /* one of Leonaards Additions */
35 void EditStartPt(x,y)
36 int x, y;
38 DrawStartPt();
39 XdrawBezSeg();
41 if( PrevSegNo() != GetNumSegs() ) {
42 PrevSeg();
43 XdrawBezSeg();
44 NextSeg();
47 StartPtX( GetCurSeg()) = x;
48 StartPtY( GetCurSeg()) = y;
50 if( PrevSegNo() != GetNumSegs() ) {
51 PrevSeg();
52 XdrawBezSeg();
53 NextSeg();
56 XdrawBezSeg();
57 DrawStartPt();
60 void EditEndPt(x,y)
61 int x, y;
63 DrawEndPt();
64 XdrawBezSeg();
66 if( NextSegNo() != GetFirstSeg() ) {
67 NextSeg();
68 XdrawBezSeg();
69 PrevSeg();
72 EndPtX( GetCurSeg()) = x;
73 EndPtY( GetCurSeg()) = y;
75 if( NextSegNo() != GetFirstSeg() ) {
76 NextSeg();
77 XdrawBezSeg();
78 PrevSeg();
81 XdrawBezSeg();
82 DrawEndPt();
87 void EditControl0(x,y)
88 int x, y;
90 DrawControl0();
91 XdrawBezSeg();
92 Cntrl1X(GetCurSeg()) = x;
93 Cntrl1Y(GetCurSeg()) = y;
94 XdrawBezSeg();
95 DrawControl0();
98 void EditControl1(x,y)
99 int x, y;
101 DrawControl1();
102 XdrawBezSeg();
103 Cntrl2X(GetCurSeg()) = x;
104 Cntrl2Y(GetCurSeg()) = y;
105 XdrawBezSeg();
106 DrawControl1();