paletted.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. TPTCPalette=Class(TObject)
  19. Private
  20. m_locked : Boolean;
  21. m_handle : THermesHandle;
  22. Public
  23. Constructor Create;
  24. Constructor Create(Const _data : Array Of Uint32);
  25. Constructor Create(Const palette : TPTCPalette);
  26. Destructor Destroy; Override;
  27. Procedure Assign(Const palette : TPTCPalette);
  28. Function Equals(Const palette : TPTCPalette) : Boolean;
  29. Function lock : PUint32;
  30. Procedure unlock;
  31. Procedure load(Const _data : Array Of Uint32);
  32. Procedure load(_data : Pointer);
  33. Procedure save(Var _data : Array Of Uint32);
  34. Procedure save(_data : Pointer);
  35. Function data : PUint32;
  36. End;