fpcdrawh.inc 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2003 by the Free Pascal development team
  5. TDrawObjects implementation.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. { TFPCustomDrawPen }
  13. procedure TFPCustomDrawPen.DrawLine (x1,y1,x2,y2:integer);
  14. begin
  15. DoDrawLine (x1,y1,x2,y2);
  16. end;
  17. procedure TFPCustomDrawPen.Polyline (points:array of TPoint; close:boolean);
  18. begin
  19. DoPolyLine (points, false);
  20. end;
  21. procedure TFPCustomDrawPen.Ellipse (left,top, right,bottom:integer);
  22. begin
  23. DoEllipse (left,top,right,bottom);
  24. end;
  25. procedure TFPCustomDrawPen.Rectangle (left,top, right,bottom:integer);
  26. begin
  27. DoRectangle (left,top,right,bottom);
  28. end;
  29. { TFPCustomDrawBrush }
  30. procedure TFPCustomDrawBrush.Rectangle (left,top,right,bottom:integer);
  31. begin
  32. DoRectangle (left,top,right,bottom);
  33. end;
  34. procedure TFPCustomDrawBrush.FloodFill (x,y:integer);
  35. begin
  36. DoFloodFill (x,y);
  37. end;
  38. procedure TFPCustomDrawBrush.Ellipse (left,top, right,bottom:integer);
  39. begin
  40. DoEllipse (left,top,right,bottom);
  41. end;
  42. procedure TFPCustomDrawBrush.Polygon (points:array of TPoint);
  43. begin
  44. DoPolygon (points);
  45. end;
  46. { TFPCustomDrawFont }
  47. procedure TFPCustomDrawFont.DrawText (x,y:integer; text:string);
  48. begin
  49. DoDrawText (x,y, text);
  50. end;
  51. procedure TFPCustomDrawFont.GetTextSize (text:string; var w,h:integer);
  52. begin
  53. DoGetTextSize (text, w,h);
  54. end;
  55. function TFPCustomDrawFont.GetTextHeight (text:string) : integer;
  56. begin
  57. result := DoGetTextHeight (Text);
  58. end;
  59. function TFPCustomDrawFont.GetTextWidth (text:string) : integer;
  60. begin
  61. result := DoGetTextWidth (Text);
  62. end;