cvs: gd /libgd/examples windows.c

From: Date: Sun, 20 Jan 2008 16:05:56 +0000
Subject: cvs: gd /libgd/examples windows.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-420@lists.php.net to get a copy of this message
pajoye Sun Jan 20 16:05:56 2008 UTC Modified files: /gd/libgd/examples windows.c Log: - enable the bezier curve and animation of the bezier control points selection http://cvs.php.net/viewvc.cgi/gd/libgd/examples/windows.c?r1=1.2&r2=1.3&diff_format=u Index: gd/libgd/examples/windows.c diff -u gd/libgd/examples/windows.c:1.2 gd/libgd/examples/windows.c:1.3 --- gd/libgd/examples/windows.c:1.2 Sun Jan 20 15:56:21 2008 +++ gd/libgd/examples/windows.c Sun Jan 20 16:05:56 2008 @@ -3,7 +3,7 @@ and assigns to a GD truecolor image. Thanks to Mateusz Loskot (http://mateusz.loskot.net) for the AttachBuffer function! -$Id: windows.c,v 1.2 2008/01/20 15:56:21 pajoye Exp $ +$Id: windows.c,v 1.3 2008/01/20 16:05:56 pajoye Exp $ */ #include <windows.h> #include <gd.h> @@ -264,14 +264,14 @@ 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 @@ // 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 ;

« previous php.gd.cvs (#420) next »