formatd.inc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {
  2. Free Pascal port of the OpenPTC C++ library.
  3. Copyright (C) 2001-2006 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. TPTCFormat=Class(TObject)
  19. Private
  20. FFormat : THermesFormat;
  21. Function GetDirect : Boolean;
  22. Function GetBytes : Integer;
  23. Public
  24. Constructor Create;
  25. Constructor Create(ABits : Integer);
  26. Constructor Create(ABits : Integer;
  27. ARedMask, AGreenMask, ABlueMask : Uint32;
  28. AAlphaMask : Uint32 = 0);
  29. Constructor Create(Const format : TPTCFormat);
  30. Destructor Destroy; Override;
  31. Procedure Assign(Const format : TPTCFormat);
  32. Function Equals(Const format : TPTCFormat) : Boolean;
  33. Property R : Uint32 read FFormat.r;
  34. Property G : Uint32 read FFormat.g;
  35. Property B : Uint32 read FFormat.b;
  36. Property A : Uint32 read FFormat.a;
  37. Property Bits : Integer read FFormat.bits;
  38. Property Indexed : Boolean read FFormat.indexed;
  39. Property Direct : Boolean read GetDirect;
  40. Property Bytes : Integer read GetBytes;
  41. End;