home *** CD-ROM | disk | FTP | other *** search
/ Windows Graphics Programming / Feng_Yuan_Win32_GDI_DirectX.iso / Samples / include / BezierCurve.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-12  |  2.0 KB  |  39 lines

  1. #pragma once
  2. //-----------------------------------------------------------------------------------//
  3. //              Windows Graphics Programming: Win32 GDI and DirectDraw               //
  4. //                             ISBN  0-13-086985-6                                   //
  5. //                                                                                   //
  6. //  Written            by  Yuan, Feng                             www.fengyuan.com   //
  7. //  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
  8. //  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
  9. //                                                                                   //
  10. //  FileName   : beziercurve.h                                                         //
  11. //  Description: Arc/Bezier curve drawing routines                                   //
  12. //  Version    : 1.00.000, May 31, 2000                                              //
  13. //-----------------------------------------------------------------------------------//
  14.  
  15.  
  16. void Label(HDC hDC, int x, int y, const TCHAR * mess);
  17. void Label(HDC hDC, POINT p[], int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
  18.  
  19. void Dot(HDC hDC, int x, int y);
  20.  
  21. void P(POINT & rslt, POINT & p1, POINT p2, double t);
  22.  
  23. void Line(HDC hDC, POINT & p1, POINT & p2);
  24. void Line(HDC hDC, int x0, int y0, int x1, int y1);
  25. void Line(HDC hDC, int x0, int y0, int x1, int y1, HPEN hPen);
  26.  
  27. BOOL AngleArcTo(HDC hDC, int X, int Y, DWORD dwRadius, FLOAT eStartAngle, FLOAT eSweepAngle);
  28.  
  29. void Bezier(HDC hDC, double x1, double y1, double x2, double y2, 
  30.                      double x3, double y3, double x4, double y4);
  31.  
  32. double P(double t, double p1, double p2, double p3, double p4);
  33. double Error(double m, double & et);
  34.  
  35. BOOL EllipseToBezier(HDC hDC, int left, int top, int right, int bottom);
  36.  
  37. BOOL AngleArcToBezier(HDC hDC, int x0, int y0, int rx, int ry, 
  38.                       double startangle, double sweepangle, double * err=NULL);
  39.