fpcdrawh.inc 1.9 KB

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