diff options
author | pajoye <none@none> | 2008-01-20 16:05:56 +0000 |
---|---|---|
committer | pajoye <none@none> | 2008-01-20 16:05:56 +0000 |
commit | 50ba0f31c895b2ae343f3bf0ba0b4225f91d31db (patch) | |
tree | 6793754171eccbf897eaf8217a5f3e1c96baac1d /examples/windows.c | |
parent | b7a002a9f62d207f5091b0b58a5e8bd75cbf7542 (diff) | |
download | libgd-50ba0f31c895b2ae343f3bf0ba0b4225f91d31db.tar.gz |
- enable the bezier curve and animation of the bezier control points selection
Diffstat (limited to 'examples/windows.c')
-rw-r--r-- | examples/windows.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/windows.c b/examples/windows.c index e994ee4..100f9dc 100644 --- a/examples/windows.c +++ b/examples/windows.c @@ -264,14 +264,14 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) apt[3].x = 3 * cxClient / 4 ; apt[3].y = cyClient / 2 ; return 0 ; -#if 0 + case WM_LBUTTONDOWN: case WM_RBUTTONDOWN: case WM_MOUSEMOVE: if (wParam & MK_LBUTTON || wParam & MK_RBUTTON) { hdc = GetDC (hwnd) ; - + // alte Kurve löschen (mit Weiß übermalen) SelectObject (hdc, GetStockObject (WHITE_PEN)) ; DrawBezier (hdc, apt) ; @@ -290,19 +290,19 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) // neue Kurve (mit Schwarz) zeichnen SelectObject (hdc, GetStockObject (BLACK_PEN)) ; + gdDrawImage(hdc, &rc); DrawBezier (hdc, apt) ; ReleaseDC (hwnd, hdc) ; } return 0 ; -#endif + case WM_PAINT: hdc = BeginPaint (hwnd, &ps) ; GetClientRect(hwnd, &rc); - - //DrawBezier (hdc, apt) ; gdDrawImage(hdc, &rc); + DrawBezier (hdc, apt) ; EndPaint (hwnd, &ps) ; return 0 ; |