~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/ptc/c_api/copy.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Function ptc_copy_create : TPTC_COPY;
2
 
 
3
 
Begin
4
 
  Try
5
 
    ptc_copy_create := TPTC_COPY(TPTCCopy.Create);
6
 
  Except
7
 
    On error : TPTCError Do
8
 
    Begin
9
 
      ptc_exception_handle(error);
10
 
      ptc_copy_create := Nil;
11
 
    End;
12
 
  End;
13
 
End;
14
 
 
15
 
Procedure ptc_copy_destroy(obj : TPTC_COPY);
16
 
 
17
 
Begin
18
 
  If obj = Nil Then
19
 
    Exit;
20
 
  Try
21
 
    TPTCCopy(obj).Destroy;
22
 
  Except
23
 
    On error : TPTCError Do
24
 
      ptc_exception_handle(error);
25
 
  End;
26
 
End;
27
 
 
28
 
Procedure ptc_copy_request(obj : TPTC_COPY; source, destination : TPTC_FORMAT);
29
 
 
30
 
Begin
31
 
  Try
32
 
    TPTCCopy(obj).request(TPTCFormat(source), TPTCFormat(destination));
33
 
  Except
34
 
    On error : TPTCError Do
35
 
      ptc_exception_handle(error);
36
 
  End;
37
 
End;
38
 
 
39
 
Procedure ptc_copy_palette(obj : TPTC_COPY; source, destination : TPTC_PALETTE);
40
 
 
41
 
Begin
42
 
  Try
43
 
    TPTCCopy(obj).palette(TPTCPalette(source), TPTCPalette(destination));
44
 
  Except
45
 
    On error : TPTCError Do
46
 
      ptc_exception_handle(error);
47
 
  End;
48
 
End;
49
 
 
50
 
Procedure ptc_copy_copy(obj : TPTC_COPY; source_pixels : Pointer; source_x, source_y, source_width, source_height, source_pitch : Integer;
51
 
                        destination_pixels : Pointer; destination_x, destination_y, destination_width, destination_height, destination_pitch : Integer);
52
 
 
53
 
Begin
54
 
  Try
55
 
    TPTCCopy(obj).copy(source_pixels, source_x, source_y, source_width, source_height, source_pitch, destination_pixels, destination_x, destination_y, destination_width, destination_height, destination_pitch);
56
 
  Except
57
 
    On error : TPTCError Do
58
 
      ptc_exception_handle(error);
59
 
  End;
60
 
End;
61
 
 
62
 
Function ptc_copy_option(obj : TPTC_COPY; option : String) : Boolean;
63
 
 
64
 
Begin
65
 
  Try
66
 
    TPTCCopy(obj).option(option);
67
 
  Except
68
 
    On error : TPTCError Do
69
 
    Begin
70
 
      ptc_exception_handle(error);
71
 
      ptc_copy_option := False;
72
 
    End;
73
 
  End;
74
 
End;