surfaced.inc 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {
  2. Free Pascal port of the OpenPTC C++ library.
  3. Copyright (C) 2001-2003 Nikolay Nikolov ([email protected])
  4. Original C++ version by Glenn Fiedler ([email protected])
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. }
  17. Type
  18. TPTCSurface=Class(TPTCBaseSurface)
  19. Private
  20. {data}
  21. m_width : Integer;
  22. m_height : Integer;
  23. m_pitch : Integer;
  24. m_area : TPTCArea;
  25. m_clip : TPTCArea;
  26. m_format : TPTCFormat;
  27. m_locked : Boolean;
  28. m_pixels : Pointer;
  29. {objects}
  30. m_copy : TPTCCopy;
  31. m_clear : TPTCClear;
  32. m_palette : TPTCPalette;
  33. Public
  34. Constructor Create(_width, _height : Integer; Const _format : TPTCFormat);
  35. Destructor Destroy; Override;
  36. Procedure copy(Var surface : TPTCBaseSurface); Override;
  37. Procedure copy(Var surface : TPTCBaseSurface;
  38. Const source, destination : TPTCArea); Override;
  39. Function lock : Pointer; Override;
  40. Procedure unlock; Override;
  41. Procedure load(Const pixels : Pointer;
  42. _width, _height, _pitch : Integer;
  43. Const _format : TPTCFormat;
  44. Const _palette : TPTCPalette); Override;
  45. Procedure load(Const pixels : Pointer;
  46. _width, _height, _pitch : Integer;
  47. Const _format : TPTCFormat;
  48. Const _palette : TPTCPalette;
  49. Const source, destination : TPTCArea); Override;
  50. Procedure save(pixels : Pointer;
  51. _width, _height, _pitch : Integer;
  52. Const _format : TPTCFormat;
  53. Const _palette : TPTCPalette); Override;
  54. Procedure save(pixels : Pointer;
  55. _width, _height, _pitch : Integer;
  56. Const _format : TPTCFormat;
  57. Const _palette : TPTCPalette;
  58. Const source, destination : TPTCArea); Override;
  59. Procedure clear; Override;
  60. Procedure clear(Const color : TPTCColor); Override;
  61. Procedure clear(Const color : TPTCColor; Const _area : TPTCArea); Override;
  62. Procedure palette(Const _palette : TPTCPalette); Override;
  63. Function palette : TPTCPalette; Override;
  64. Procedure clip(Const _area : TPTCArea); Override;
  65. Function width : Integer; Override;
  66. Function height : Integer; Override;
  67. Function pitch : Integer; Override;
  68. Function area : TPTCArea; Override;
  69. Function clip : TPTCArea; Override;
  70. Function format : TPTCFormat; Override;
  71. Function option(Const _option : String) : Boolean; Override;
  72. End;