clear.inc 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Function ptc_clear_create : TPTC_CLEAR;
  2. Begin
  3. Try
  4. ptc_clear_create := TPTC_CLEAR(TPTCClear.Create);
  5. Except
  6. On error : TPTCError Do
  7. Begin
  8. ptc_exception_handle(error);
  9. ptc_clear_create := Nil;
  10. End;
  11. End;
  12. End;
  13. Procedure ptc_clear_destroy(obj : TPTC_CLEAR);
  14. Begin
  15. If obj = Nil Then
  16. Exit;
  17. Try
  18. TPTCClear(obj).Destroy;
  19. Except
  20. On error : TPTCError Do
  21. ptc_exception_handle(error);
  22. End;
  23. End;
  24. Procedure ptc_clear_request(obj : TPTC_CLEAR; format : TPTC_FORMAT);
  25. Begin
  26. Try
  27. TPTCClear(obj).request(TPTCFormat(format));
  28. Except
  29. On error : TPTCError Do
  30. ptc_exception_handle(error);
  31. End;
  32. End;
  33. Procedure ptc_clear_clear(obj : TPTC_CLEAR; pixels : Pointer; x, y, width, height, pitch : Integer; color : TPTC_COLOR);
  34. Begin
  35. Try
  36. TPTCClear(obj).clear(pixels, x, y, width, height, pitch, TPTCColor(color));
  37. Except
  38. On error : TPTCError Do
  39. ptc_exception_handle(error);
  40. End;
  41. End;